question

ramesh1993 avatar image
ramesh1993 asked

backup database as a t-sql query in sql server 2005

I have a sql server 2005 in Windows server 2003, I want to copy all databases into my local sql server 2014.Backup and restore,import and export methods are not best ways to copy because I accessed Windows server 2005 via remote desktop top(RDP),if I backup the databases copying of backup file to my local system from server takes so much of time .So best method is to get the table data as a query code,then simply past it in my local sql server.So please suggest me,how to get the table data as t-sql query.
backup
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

1 Answer

·
Kev Riley avatar image
Kev Riley answered
Not sure that querying the data out of SQL is going to be any quicker than copying a backup file or export file. How big is this database? However you could use 'Result to file' from SSMS to capture the output of querying the tables. You would also have to script out the table definitions, and then import the data back in. Another option would be to use a data and schema comparison tool to 'sync' the your local database to the remote one.
4 comments
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

ramesh1993 avatar image ramesh1993 commented ·
Each Data base size is 2GB
0 Likes 0 ·
ramesh1993 avatar image ramesh1993 commented ·
In sql server 2005 only schema is available not data
0 Likes 0 ·
Kev Riley avatar image Kev Riley ♦♦ commented ·
You don't have access to view the data?
0 Likes 0 ·
ramesh1993 avatar image ramesh1993 commented ·
No,i have access to view
0 Likes 0 ·

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.