I am using windows7 os and i have a database on MSSQL server 2005 i am using following codes to import database
sqlcmd -S [server instance name] -d [database name] -i [filename you want to import]
i want to export database something like above command if any?
Best Answer
Assuming you've the right permissions, try:
Note: Instead of
-E
, you can use-U
and-P
to specify user credentials.Then to restore, use the following syntax:
Source: Backup and Restore Your SQL Server Database from the Command Line.
To export specific data, see: How to export data as CSV format from SQL Server using sqlcmd?