cancel
Showing results for 
Search instead for 
Did you mean: 
Read only

Copy DB schema into new database.

Former Member
0 Kudos
1,831

How do I copy the schema of an existing database into a brand new database without copying the data ? (so not dbunload -an )

Thanks

Mark

Accepted Solutions (0)

Answers (1)

Answers (1)

justin_willey
Participant

You want -n "Does not unload database data; reload.sql contains SQL statements to build the structure of the database only. If you want the reload.sql file to contain LOAD TABLE or INPUT statements, use -nl instead. "

Then create a new database, connect to it and run the reload.sql script.

http://dcx.sybase.com/index.html#sa160/en/dbadmin/dbunload.html

BTW it's always worth saying which version of SQLA you are running.

VolkerBarth
Contributor
0 Kudos

Just to add:

The initial section of the "reload.sql" file contains a comment with an according CREATE DATABASE statement you can use to build the new database with appropriate settings for page size, collations and the like.