[IQUG] How can I drop one of IQ_SYSTEM_MAIN and IQ_SYSTEM_TEMP dbspaces?

Mark Mumy markdmumy at gmail.com
Tue Jul 17 18:26:22 MST 2018


OK, I had it backwards.  DON’T touch the files before creating.

Here’s a sample on my system:

1> alter dbspace IQ_SYSTEM_MAIN add file test_file 'test_file' size 100MB
2> go
[sap at localhost demo]$ ls -la *test_file*
-rw-r--r--. 1 sap sap 104857600 Jul 17 18:17 test_file

If we see that a file exists we add .iq.  This happens with raw devices, too, when permissions don’t allow writing to the raw device.  I thought we did away with this logic, to be honest.  When I try to create a dbfile when the file already exists at the OS level, I get an error:

1> alter dbspace IQ_SYSTEM_MAIN add file test_file2 'test_file2' size 100MB
2> go
Msg 21, Level 14, State 0:
SQL Anywhere Error -1010000: The file '/home/sap/IQ16/IQ-16_1/demo/test_file2' already exists.
-- (stcxtlib/st_database.cxx 3212)

When we see that a file exists, we add .iq to it so that we are guaranteed a unique name and a file that doesn’t exist. The net is that we don’t know why the file exists, but it does, so we will do everything to preserve the file that exists, hence adding the .iq.

I am running IQ 16.1 SP2 PL2, so maybe we fixed that in the 16.1 line or maybe it is platform specific????
	SAP IQ/16.1.020.552/10613/P/sp02.02/Linux/Linux64 - x86_64 - 2.6.18-194/64bit/2017-10-13 11:11:32

Mark


> On Jul 17, 2018, at 8:02 PM, Steve Shen <sshen at sscinc.com> wrote:
> 
> Mark,
>  
> I did touch two files the way I wanted before creating the database; but IQ still automatically created two new files and plugged in “.iq’ and ‘.iqtmp’.
>  
> Tomorrow I will try what you suggested on those two system database spaces.
>  
> Thank you.
>  
> Regards,
> Steve Shen
> 
> From: Mark Mumy [mailto:markdmumy at gmail.com] 
> Sent: Tuesday, July 17, 2018 8:44 PM
> To: Steve Shen
> Cc: iqug at iqug.org; Mumy, Mark
> Subject: Re: How can I drop one of IQ_SYSTEM_MAIN and IQ_SYSTEM_TEMP dbspaces?
>  
> If it’s a multiplex you need to bring it up in simplex mode.  
>  
> Mark the file as read only with alter dbspace alter file.  Then run sp_iqrelocate on the file.  Once done, use alter dbspace drop file to drop it.  
>  
> For filesystem devices we have always defaulted to adding the .iq. I think you can touch the file before doing anything in IQ.  Then we see that it exists and use it.  In theory.....
>  
> Mark
>  
> ========================
>  
> Sent from my mobile device
> 
> On Jul 17, 2018, at 19:10, Steve Shen <sshen at sscinc.com <mailto:sshen at sscinc.com>> wrote:
> 
> Topic:  How can I drop one file from IQ_SYSTEM_MAIN and IQ_SYSTEM_TEMP dbspaces at IQ version 16.x?
>  
> At the IQ database creation time using file systems at Linux, IQ automatically plugged in suffix “.iq” on IQ_SYSTEM_MAIN and “.iqtmp” to IQ_SYSTEM_TEMP.
> Refer to the following:
>  
> sybase at hrs1sybprd32: /iq_main_temp_store/siqcgsuat_cognosdw ==> ls -tl $PWD/cognosdw_system_main*
> -rw-r----- 1 sybase sybase 53687091200 Jul 17 19:42 /iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_system_main.iq
>  
> sybase at hrs1sybprd32: /iq_main_temp_store/siqcgsuat_cognosdw ==> ls -lt $PWD/cognosdw_temp1*
> -rw-r----- 1 sybase sybase 53687091200 Jul 17 19:42 /iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_temp1.iqtmp
>  
> This default behavior was not desirable from my perspective.  I had no way to override this behavior at the database creation time.
> IQ engineers should not have modified the physical file names even if I put single quotes to the physical paths.
> If you knew that there was a way to override this undesirable behavior, please let me know.
>  
> So I added one more file, cognosdw_system_main, to IQ_SYSTEM_MAIN.
>  
> I also added one more file, cognosdw_temp1, to IQ_SYSTEM_TEMP.
>  
> Refer to the following:
>  
> sybase at hrs1sybprd32: /iq_main_temp_store/siqcgsuat_cognosdw ==> ls -tl $PWD/cognosdw_system_main*
> -rw-r----- 1 sybase sybase 53687091200 Jul 17 19:42 /iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_system_main.iq
> -rw-r----- 1 sybase sybase 53687091200 Jul 17 19:42 /iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_system_main
>  
> sybase at hrs1sybprd32: /iq_main_temp_store/siqcgsuat_cognosdw ==> ls -lt $PWD/cognosdw_temp1*
> -rw-r----- 1 sybase sybase 53687091200 Jul 17 19:42 /iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_temp1.iqtmp
> -rw-r----- 1 sybase sybase 53687091200 Jul 17 19:42 /iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_temp1
>  
> Is there an easy way to drop “/iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_system_main.iq” from IQ_SYSTEM_MAIN?
>  
> Is there an easy way to drop “/iq_main_temp_store/siqcgsuat_cognosdw/cognosdw_temp1.iqtmp” from IQ_SYSTEM_TEMP?
>  
> Notes: I have not begun using RLV yet.
>  
> Please advise.  Thank you.
>  
> Regards,
> Steve Shen
> 
> 
>  
> This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.
> This email with all information contained herein or attached hereto may contain confidential and/or privileged information intended for the addressee(s) only. If you have received this email in error, please contact the sender and immediately delete this email in its entirety and any attachments thereto.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://iqug.org/pipermail/iqug/attachments/20180717/f5802ed7/attachment.html>


More information about the IQUG mailing list