Question: how to export data from sql server in sql file?
Answer: In SQL Server Management Studio, connect to an instance of the SQL Server Database Engine.
Expand Databases.
Right-click a database.
Point to Tasks.
Click one of the following options. Import Data. Export Data.