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
 General SQL Server Forums
 New to SQL Server Programming
 Need HELP!!!!!!

Author  Topic 

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2010-02-19 : 11:50:24
I accidentally drop a table that have several dependencies. I have the same table in another database that we don't longer use. How can I restore/copy the table and all its dependencie into the new database to replace the one deleted.

Thanks,

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-19 : 11:54:27
yup. you can copy table from other db. you cant restore a single table alone. use Transfer SQL Objects task for that

http://msdn.microsoft.com/en-us/library/ms142159.aspx

you might need to recreate all constraints, etc once you finish copy to maintain dependencies

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2010-02-19 : 11:56:20
Sorry, I am new to this Database Architecture. I don't understand what are the instructions. Please let me know step by step.

Thanks
Go to Top of Page

X002548
Not Just a Number

15586 Posts

Posted - 2010-02-19 : 12:02:47
OK...are you on SQL Server?

What are the names of the 2 databases?

Are they on the same server?

What is the name of the server(s)?



Brett

8-)

Hint: Want your questions answered fast? Follow the direction in this link
http://weblogs.sqlteam.com/brettk/archive/2005/05/25/5276.aspx

Add yourself!
http://www.frappr.com/sqlteam



Go to Top of Page

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2010-02-19 : 12:02:55
http://www.kodyaz.com/articles/transfer-sql-server-objects-task.aspx

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

osirisa
Constraint Violating Yak Guru

289 Posts

Posted - 2010-02-19 : 12:13:45
Ok. There are not in the same server.
The table that I need to copy is on DEVTEX (server), Universal (database), table name is (Approvers) - This is the one that has all the dependencies that I need to copy.
The one that I deleted was on PRODTEX (server), Universal (database), table name was (Approvers)

Thanks for the Help.
Go to Top of Page
   

- Advertisement -