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.
| Author |
Topic |
|
sjchandru
Starting Member
2 Posts |
Posted - 2003-09-25 : 00:21:20
|
| Hi,I would like to import the entire database(all tables)from one server to another, from my vb6 application.My operating system is XP and Sql server version is 7.Of course, both are sql server 7 (running at different locations).Using DTS objects how could I do this? Any sample code?Thanks in advance.Chandramohan. |
|
|
samsekar
Constraint Violating Yak Guru
437 Posts |
Posted - 2003-09-25 : 02:00:38
|
| AFAIK, the best way of copying the entire database is BACKUP and RESTORE. you can write a procedure to do this and call it from your VB application. Check BOL on topic 'BACKUP' & 'RESTORE'Sekar~~~~Success is not a destination that you ever reach. Success is the quality of your journey. |
 |
|
|
Page47
Master Smack Fu Yak Hacker
2878 Posts |
Posted - 2003-09-25 : 07:22:33
|
| I'm not 100% sure, but I don't think SQL 7 DTS has the Copy Database Objects Task. I think that was new for 2K.Jay White{0} |
 |
|
|
tkizer
Almighty SQL Goddess
38200 Posts |
Posted - 2003-09-25 : 12:12:04
|
| I would not use DTS for this, since there are faster ways.The fastest way to copy the databases is to use DETACH/ATTACH method. However when you use this method, the source database will be taken down during the detach. Look up sp_detach_db and sp_attach_db in SQL Server Books Online for more information.The next fastest way is BACKUP/RESTORE as Sekar mentioned.Tara |
 |
|
|
X002548
Not Just a Number
15586 Posts |
Posted - 2003-09-25 : 12:52:49
|
quote: Originally posted by sjchandru from my vb6 application.
Why?Do you have access to SQL Server Client Tools?Brett8-)SELECT @@POST FROM Brain ORDER BY NewId()That's correct! It's an AlphaNumeric! |
 |
|
|
|
|
|