command line tool for export data from server to server

In SqlServer Management Studio, if we click on data database there is menu task > export data. This help me to export this database to another server.

However, I need to run this wizard to complete this task and need to specify source and destination sever information every time that I want to use it.

I think it would be convenient if I could use command line to do the same task and write batch file to automate it.

Please could you help me give some suggestion or introduce me a command line program that can do this task since I googled search but not found any useful information.

Thank you so much.

Answers


U can use BCP Utility

BCP Out 
BCP server.schema.TableName out c:\TableName.txt -c -t -T –SServerName -UUsername -Password

BCP In 
BCP server.schema.TableName In c:\TableName.txt -c -t -T –SServerName -UUsername -Password

The 1st statement is to export the data to a csv file and BCP IN is used to import the data from csv file to Destination table

Here -T stands for Trusted connection and -t represents field delimeter

You can write these BCP commands in batch file

Or you can create a simple ssis package for exporting the data


Need Your Help

view all links after pagination

codeigniter pagination codeigniter-2

is it possible to add a view All results link after or before the << First 1 2 3 Last >> links of the pagination?

About UNIX Resources Network

Original, collect and organize Developers related documents, information and materials, contains jQuery, Html, CSS, MySQL, .NET, ASP.NET, SQL, objective-c, iPhone, Ruby on Rails, C, SQL Server, Ruby, Arrays, Regex, ASP.NET MVC, WPF, XML, Ajax, DataBase, and so on.