Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 Creating Database and Tables

Author  Topic 

russray
Starting Member

27 Posts

Posted - 2008-02-06 : 13:05:34
I am very new to SQL Server 2005 so please excuse my mandune queastion.

First what I accomplished was I created several tables within SQL Server 2000 using the Database and Table Wizards. I also created all the relationships the same way. Next, I had SQL Server 2000 and had the tool reverse engineer the SQL for this new database with all the relationships.

My next step was to run this newly created SQL script on my local box with SQL Server 2005 (SMSS). What I did was create the database first and then assign the users to the new database. From here, I moved to running the sql script. While it was not 100% perfect, it did create all the tables and relationships with no problems.

Now, I am trying to accomplish the same process one a development instance of SQL Server 2005, but the script fails. The data base error says the new database created does not exist. When we go back and look at the database within SMSS, it is GONE!

I am at a lost at how to replicate the database I have on my local box. Any suggestions would be greatly appreciated.

Russ

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2008-02-07 : 00:07:45
Creating db then apply script should work, and you can also do backup/restore.
Go to Top of Page

russray
Starting Member

27 Posts

Posted - 2008-02-07 : 10:04:25
First and foremost, thank you to all who read my post and the reply I received. What I discovered was the tables were created within the Master db. I next used SMSS and created the SQL script to drop the constraints and the tables from Master db, and then used SMSS to create the script for creating the database and tables in the correct location.
Go to Top of Page
   

- Advertisement -