Open Source RDBMS - Seamless, Scalable, Stable and Free

한국어 | Login |Register

Scripting cubrid createdb from command line

CUBRID Official Forum » CUBRID Apps & Tools » Scripting cubrid createdb from command line

author
message
[Level:0]cristiroma

Post subject: Scripting cubrid createdb from command line

registered: 03/01/2011

IP: *.9.55.194

views: 30

Hi,

I want to create a script that explores the cubrid command line utility to do the following things:

1. drop a database
2. create again a new database
3. load the data inside the database from a previous "unloaddb"

At step 2, I have an issue: the "cubrid createdb" command line utility creates the new database files in the current directory, and not inside the server's 'databases' directory under database_name folder. This means that writing a script that runs on any other machine is not possible since would be tied to my local installation paths.


mkdir /var/local/cubrid-8.3.1/databases/my_db

cubrid createdb -s /var/local/cubrid-8.3.1/databases/my_db/schema - s ....

<meta http-equiv="content-type" content="text/html; charset=utf-8">



Is there any workaround for this?


cristian

</meta>

Quote
[Level:8]CUBRID

# Post subject:Re: Scripting cubrid createdb from command line

profile

registered: 03/29/2010

IP: *.91.139.51

Why don't you try to use $CUBRID_DATABASES environment variable? This would save your new database files into the same directory all other database are stored in.

Quote




You are either using a very old browser or a browser that is not supported.
In order to browse cubrid.org you need to have one of the following browsers:



Internet Explorer: Mozilla Firefox: Google Chrome: