The simplest method to copy database from one SQL Server to other:
Example: Copy a database named 'ACW' to a SQL Server on ABC-PC from a SQL Server on XYZ-PC.
Open the SQL Server folder(wherever it is saved) on XYZ-PC and go to:
"Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA"
Here you will find all the databases.
XYZ-PC
Copy the file having 'database' and 'database_log' name. In our case they are 'ACW' and 'ACW_log'.
Now copy and save these files onto some external device which you could attach to other PC and get these files onto that PC.
Now the next step is to create a database in the Server where you are going to implement/paste the copied database. Give this database the same name of the copied database. In our example: Create a database named 'ACW' in the SQL server on ABC-PC.
ABC-PC
Now open the SQL Server folder(wherever it is saved) on ABC-PC and go to:
"Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA"
Here you will find all the databases.
Now paste the database files(ACW and ACW_log) here that we copied from XYZ-PC. On notifying 'The files with the same name already exists. Do you want to replace it?' accept yes and replace the files. Now open the SQL server on ABC-PC and you will find the ACW database there with all the data.
Example: Copy a database named 'ACW' to a SQL Server on ABC-PC from a SQL Server on XYZ-PC.
Open the SQL Server folder(wherever it is saved) on XYZ-PC and go to:
"Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA"
Here you will find all the databases.
XYZ-PC
Copy the file having 'database' and 'database_log' name. In our case they are 'ACW' and 'ACW_log'.
Now copy and save these files onto some external device which you could attach to other PC and get these files onto that PC.
Now the next step is to create a database in the Server where you are going to implement/paste the copied database. Give this database the same name of the copied database. In our example: Create a database named 'ACW' in the SQL server on ABC-PC.
ABC-PC
Now open the SQL Server folder(wherever it is saved) on ABC-PC and go to:
"Microsoft SQL Server\MSSQL10.SQLEXPRESS\MSSQL\DATA"
Here you will find all the databases.
Now paste the database files(ACW and ACW_log) here that we copied from XYZ-PC. On notifying 'The files with the same name already exists. Do you want to replace it?' accept yes and replace the files. Now open the SQL server on ABC-PC and you will find the ACW database there with all the data.
No comments:
Post a Comment