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.

Generating database structure through dbisqlc.exe

3 posts in General Discussion Last posting was on 2004-12-09 14:01:40.0Z
JJS Posted on 2004-12-08 23:43:23.0Z
Sender: 4f2a.41b6588d.1804289383@sybase.com
From: JJS
Newsgroups: ianywhere.public.general
Subject: Generating database structure through dbisqlc.exe
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <41b7919b.58c0.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 8 Dec 2004 15:43:23 -0800
X-Trace: forums-1-dub 1102549403 10.22.241.41 (8 Dec 2004 15:43:23 -0800)
X-Original-Trace: 8 Dec 2004 15:43:23 -0800, 10.22.241.41
Lines: 8
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3949
Article PK: 7840

Is there a way I can generate the complete database
structure (minus indexes, triggers, SP, Functions) in such a
way that it will come out like the reload.sql? Meaning the
columns are ordered, have their column definations etc.

I'm sure there is a way ... I just don't want to be the
first one to figure it out.... (or waste time recreating
the wheel).


Robert Waywell Posted on 2004-12-09 13:58:00.0Z
From: "Robert Waywell" <nospam_rwaywell@ianywhere.com>
Newsgroups: ianywhere.public.general
References: <41b7919b.58c0.1681692777@sybase.com>
Subject: Re: Generating database structure through dbisqlc.exe
Lines: 37
X-Priority: 3
X-MSMail-Priority: Normal
X-Newsreader: Microsoft Outlook Express 6.00.2800.1437
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1441
X-Original-NNTP-Posting-Host: rwaywell-pc.sybase.com
Message-ID: <41b859e4$1@forums-2-dub>
X-Original-Trace: 9 Dec 2004 05:57:56 -0800, rwaywell-pc.sybase.com
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Dec 2004 05:57:57 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Dec 2004 05:58:00 -0800
X-Trace: forums-1-dub 1102600680 10.22.108.75 (9 Dec 2004 05:58:00 -0800)
X-Original-Trace: 9 Dec 2004 05:58:00 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3953
Article PK: 7845

Take a look at dbunload -n ...
This will give you the full SQL syntax to recreate the database. You will
then need to cut out the pieces that you don't want.

--
-----------------------------------------------
Robert Waywell
Sybase Adaptive Server Anywhere Developer - Version 8
Sybase Certified Professional

Sybase's iAnywhere Solutions

Please respond ONLY to newsgroup

EBF's and Patches: http://downloads.sybase.com
choose SQL Anywhere Studio >> change 'time frame' to all

To Submit Bug Reports:
http://case-express.sybase.com/cx/cx.stm?starturl=casemessage.ssc?CASETYPE=Bug

SQL Anywhere Studio Supported Platforms and Support Status
http://my.sybase.com/detail?id=1002288

Whitepapers, TechDocs, and bug fixes are all available through the iAnywhere
Developer Community at www.ianywhere.com/developer

<JJS> wrote in message news:41b7919b.58c0.1681692777@sybase.com...
> Is there a way I can generate the complete database
> structure (minus indexes, triggers, SP, Functions) in such a
> way that it will come out like the reload.sql? Meaning the
> columns are ordered, have their column definations etc.
>
> I'm sure there is a way ... I just don't want to be the
> first one to figure it out.... (or waste time recreating
> the wheel).


David Fishburn Posted on 2004-12-09 14:01:40.0Z
Newsgroups: ianywhere.public.general
Subject: Re: Generating database structure through dbisqlc.exe
From: David Fishburn <fishburn_spam@off.ianywhere.com>
References: <41b7919b.58c0.1681692777@sybase.com>
Organization: iAnywhere Solutions
Message-ID: <Xns95BA5BC918926fishburnsybasecom@127.0.0.1>
User-Agent: Xnews/06.08.25 Hamster/2.0.6.0
X-Original-NNTP-Posting-Host: 10.25.109.131
X-Original-Trace: 9 Dec 2004 06:01:36 -0800, 10.25.109.131
Lines: 42
X-Original-NNTP-Posting-Host: forums-2-dub.sybase.com
X-Original-Trace: 9 Dec 2004 06:01:37 -0800, forums-2-dub.sybase.com
NNTP-Posting-Host: forums-master.sybase.com
X-Original-NNTP-Posting-Host: forums-master.sybase.com
Date: 9 Dec 2004 06:01:40 -0800
X-Trace: forums-1-dub 1102600900 10.22.108.75 (9 Dec 2004 06:01:40 -0800)
X-Original-Trace: 9 Dec 2004 06:01:40 -0800, forums-master.sybase.com
X-Authenticated-User: ngsysop
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub ianywhere.public.general:3955
Article PK: 7846

JJS wrote in news:41b7919b.58c0.1681692777@sybase.com
of ianywhere.public.general:

J> Is there a way I can generate the complete database
J> structure (minus indexes, triggers, SP, Functions) in such a
J> way that it will come out like the reload.sql? Meaning the
J> columns are ordered, have their column definations etc.
J>
J> I'm sure there is a way ... I just don't want to be the
J> first one to figure it out.... (or waste time recreating
J> the wheel).

Yes, the system tables have all that information, but the SELECT
statement (or stored procedure) gets complicated rebuilding a
"CREATE TABLE" statement syntax.

You can also look at the output of some of the jConnect stored
procedures (which are installed by default):
call sp_jdbc_columns('T1', 'DBA');


--
David Fishburn
Certified ASA Developer Version 8
iAnywhere Solutions - Sybase
Professional Services
Please only post to the newsgroup
Please ALWAYS include version and MORE importantly BUILD number with
EACH post (dbeng9 -v).

EBFs and Maintenance Releases
http://downloads.sybase.com/swx/sdmain.stm

Developer Community / Whitepapers
http://www.ianywhere.com/developer

CaseXpress - to report bugs
http://casexpress.sybase.com

CodeXchange - Free samples
http://ianywhere.codexchange.sybase.com/servlets/ProjectDocumentList