Local Variables in "Create Database" and "Alter Database" - How? 
Author Message
 Local Variables in "Create Database" and "Alter Database" - How?

Without success, I have tried to use local variables to set the size of a
new database and its log, as well as to increase the size of an existing
database. I found that using an environmental variable directly would not
work since Sybase didn't recognize it as an "int". What is the secret?

Here is a reconstruction of the code I am using in a Bourne shell. I have
already done a "disk init" separately for the log.

################################
#!/bin/sh
SIZE=20
SIZE_LOG=5
SIZE_INC=5

/opt/sybase/bin/isql -Usa -P -SSYBASE << SIZE_1





go




go

SIZE_1

###############################
Any suggestions would be greatly appreciated.

Rick Tuey
Geodynamics Corp

(703) 691-3600 x197



Thu, 09 Jul 1998 03:00:00 GMT
 Local Variables in "Create Database" and "Alter Database" - How?

Since your work is within a shell, the value of the shell
variables are converted before execution so during execution
it's as if you really typed just the number.

So,  just replace the number with the shell variable and
you should be fine.

Example:

        create database test on test_device=$MEG
        go

STK
--
+=========================================+
|   Stephen Keeran         _____________  |
| Imonics Corporation     /             \ |

|   (919) 461-6272        \_____________/ |
+=========================================+



Fri, 10 Jul 1998 03:00:00 GMT
 
 [ 2 post ] 

 Relevant Pages 

1. max of ("...","...","..")

2. CREATE DATABASE creates "memory leak"

3. "database altered..translog not appied"

4. "LOCAL SHARE" and multiuser Paradox databases

5. How to make a "decimal"-field to an "integer"-field

6. "."and ","

7. "."and ","

8. Difference between "alter database archivelog" and "alter system archive log start"

9. The ""string""

10. aReport."Field".SetFilter("this")?

11. The+instruction+at+"0x1f90db9b"+referenced+memory+at+"0x7fa03794"+The+memory+cou


 
Powered by phpBB® Forum Software