Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Using generated scripts to create a new database.

Status
Not open for further replies.

Ruairi

Programmer
May 14, 2000
314
US
I have a development database on SQL Server 6.5. The production server is running SQL 2000. I have a database creation utility but it is very out of date. I was wondering if it is possible to generate a script for all objects in the 6.5 DB and use this script to create the 2000 DB (i know how to create the script, just wondering if it will work). Furthermore, i would like to change the DB name and change some of the columns to Not Null (they were added with data in the tables and are nullable in the database i am scripting from). TIA for any help. Ruairi

Could your manufacturing facility benefit from real time process monitoring? Would you like your employees to be able to see up to the minute goal and actual production?
For innovative, low cost solutions check out my website.
 
I should woek. Just edit the scripts in a text editor to make the changes you want. I don't think the actual create database syntax is still the same so you probably want to create an empty database in 2000 with the correct name and then run all the other scripts to create the various objects.
 
SQL 6.5 to SQL 2000 humm?
This is not a MS recomended path and sure enoth not the ideal situation, you will need a lot of code editing to acomplish that since it these two products are not compatible by design.
1st they follow 2 diferent generations of the SQL Standard that means that the T-SQL is not the same, 2k is backward compatible to SQL 7.0 but not necessarily to 6.5.
My fisrt aproach to the code would be to separate all individual objects and then bring it all to SQL 99 standart and then go from there.
It is better for you to use Enterprise manager to create the DB and run code to create each individual object and constraints after words instead of run a create db script AL Almeida
NT/DB Admin
"May all those that come behind us, find us faithfull"
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top