Export Data to Another Database (Using SQL Server Management Studio – SSMS)
Export Data to Another Database (Using SQL Server
Management Studio – SSMS)
Follow the steps below to export tables or data from one
database to another using the Export Data Wizard in SSMS.
We can use this to deploy tables from one server to
another.
Step 1: Open SQL Server Management Studio (SSMS)
- Connect
to the SQL Server instance where your source database is located.
Step 2: Select the Source Database
- In Object
Explorer, expand the server.
- Expand
Databases.
- Right-click
the database you want to export data from.
Step 3: Open the Export Wizard
- Go
to Tasks.
- Click
Export Data…
(This opens the SQL Server Import and Export Wizard.)
Step 4: Choose the Data Source
- The
source database will be auto selected.
- Verify:
- Server
Name
- Database
Name
- Authentication
Method (Username & Password)
- Click
Next.
Step 5: Choose Destination Database
- Select
where you want to export the data:
- Another
SQL Server database
- Azure
SQL database
- Flat
file
- Excel
- For
exporting to another SQL Server:
- Select
SQL Server Native Client.
- Enter
Destination Server Name.
- Select
the Destination Database.
- Click
Next.
Step 6: Select What to Export
You will get two options:
1. Copy
data from one or more tables or views
o Select
tables you want to export.
2. Write
a query to specify the data to transfer
o Use
a SELECT query to export filtered/custom data.
Choose an option based on your requirement, then click Next.
3. SELECT
table to specify the data to transfer
Step 7: Column Mapping (Optional)
- Review
column mappings.
- Adjust
data types or column settings if needed.
- Click
Next.
Step 8: Run the Export
- Review
summary of actions.
- Click
Finish to start the export.
Step 9: Verify Export
After export completes:
- Go
to the destination database.
- Open
the table.
- Run
a verification query:
- SELECT
TOP 100 * FROM DestinationTable;
- Confirm
that the data is correctly transferred.
Insightful
ReplyDeleteUsefull
ReplyDelete