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.
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.