Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

How can I create a DB Dynamically

6 posts in General Discussion Last posting was on 2003-05-28 21:30:47.0Z
Richard Posted on 2003-05-28 15:51:58.0Z
From: Richard
Date: Wed, 28 May 2003 11:51:58 -0400
Newsgroups: ianywhere.public.general
Subject: How can I create a DB Dynamically
Message-ID: <DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums>
Lines: 15
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:1093
Article PK: 3029

I want to create a database in the fly from a Script to be called by
another App. How do I pass a variable to the CreateDatabase SQL statement
for example:

db-file-name: will be passed in
log-file-name-string: will be passed in

CREATE DATABASE db-file-name
TRANSACTION LOG ON log-file-name-string
PAGE SIZE 4096
JCONNECT ON


Thanks

Richard


Richard Posted on 2003-05-28 16:02:18.0Z
From: Richard
Date: Wed, 28 May 2003 12:02:18 -0400
Newsgroups: ianywhere.public.general
Subject: Re: How can I create a DB Dynamically
Message-ID: <50ABF077A19F6B2D005819F285256D34.005733CA85256D34@webforums>
References: <DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums>
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:1096
Article PK: 3031

In addition...I guess I need to know how to execute the create database
without being connected to a specific database? Is there a statement that
precedes the CREATE DATABASE? When I try to use ISQL I need to loggon to a
database How can I do that when the database is not create?

Thanks
Richard


Chris Keating Posted on 2003-05-28 16:02:54.0Z
From: "Chris Keating" <Spam_Free_keating@iAnywhere.com>
References: <DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums> <50ABF077A19F6B2D005819F285256D34.005733CA85256D34@webforums>
Subject: Re: How can I create a DB Dynamically
Date: Wed, 28 May 2003 12:02:54 -0400
Lines: 20
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <uIZAJOTJDHA.281@forums-2-dub>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: surfec007.sybase.com 199.93.176.7
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub ianywhere.public.general:1098
Article PK: 3030

Use the UTILITY_DB

For example,

dbisql -c "uid=dba;pwd=sql;dbn=utility_db" <script> <parameters>

/ck

<Richard> wrote in message
news:50ABF077A19F6B2D005819F285256D34.005733CA85256D34@webforums...
> In addition...I guess I need to know how to execute the create database
> without being connected to a specific database? Is there a statement that
> precedes the CREATE DATABASE? When I try to use ISQL I need to loggon to
a
> database How can I do that when the database is not create?
>
> Thanks
> Richard


Shuchit Velkar Posted on 2003-05-28 21:30:47.0Z
Subject: Re: How can I create a DB Dynamically
From: Shuchit Velkar <xxx@xxx.net>
References: <DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums> <50ABF077A19F6B2D005819F285256D34.005733CA85256D34@webforums>
Message-ID: <Xns9389B1069D123svelkarNOsybaseSPAMc@10.22.241.106>
User-Agent: Xnews/5.04.25
Newsgroups: ianywhere.public.general
Date: Wed, 28 May 2003 14:30:47 -0700
NNTP-Posting-Host: 172.31.143.230
Lines: 17
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub ianywhere.public.general:1108
Article PK: 3379

Richard wrote in
news:50ABF077A19F6B2D005819F285256D34.005733CA85256D34@webforums:

> In addition...I guess I need to know how to execute the create
> database without being connected to a specific database? Is there a
> statement that precedes the CREATE DATABASE? When I try to use ISQL I
> need to loggon to a database How can I do that when the database is
> not create?
>
> Thanks
> Richard

You could also use the dbinit utility to create the database.

--
Shuchit Velkar
iAnywhere Solutions
Professional Services
Please only post to the newsgroup

EBFs and Whitepapers
http://www.ianywhere.com/developer


Chris Keating Posted on 2003-05-28 15:32:21.0Z
From: "Chris Keating" <Spam_Free_keating@iAnywhere.com>
References: <DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums>
Subject: Re: How can I create a DB Dynamically
Date: Wed, 28 May 2003 11:32:21 -0400
Lines: 23
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1106
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1106
Message-ID: <#iioD9SJDHA.218@forums-2-dub>
Newsgroups: ianywhere.public.general
NNTP-Posting-Host: CPE00045af8ce8c-CM012059936305.cpe.net.cable.rogers.com 24.100.33.132
Path: forums-1-dub!forums-master.sybase.com!forums-2-dub.sybase.com
Xref: forums-1-dub ianywhere.public.general:1094
Article PK: 3371

What is executing the script? If you are executing DBISQL(C), use
parameters.

<Richard> wrote in message
news:DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums...
> I want to create a database in the fly from a Script to be called by
> another App. How do I pass a variable to the CreateDatabase SQL statement
> for example:
>
> db-file-name: will be passed in
> log-file-name-string: will be passed in
>
> CREATE DATABASE db-file-name
> TRANSACTION LOG ON log-file-name-string
> PAGE SIZE 4096
> JCONNECT ON
>
>
> Thanks
>
> Richard


Richard Posted on 2003-05-28 16:43:33.0Z
From: Richard
Date: Wed, 28 May 2003 12:43:33 -0400
Newsgroups: ianywhere.public.general
Subject: Re: How can I create a DB Dynamically
Message-ID: <C25FC4EB220278AC005BE0B085256D34.005A1B7A85256D34@webforums>
References: <DDBA57C96F8FA014005727F585256D34.0057281185256D34@webforums> <#iioD9SJDHA.218@forums-2-dub>
Lines: 7
MIME-Version: 1.0
Content-Type: text/plain; charset="us-ascii"
Content-Transfer-Encoding: 7bit
Path: forums-1-dub!forums-master.sybase.com!webforums.sybase.com!news
Xref: forums-1-dub ianywhere.public.general:1100
Article PK: 3374

I guess I wasn't too clear...I will probably be creating from a custom
component or setup routine where user only supplies location and file
name...or I am taking suggestion at this point. My goal is I don't want
the user to have to go into ISQL and execute scripts.

Thanks for you help!!
Richard