How to Attach .mdf or .sdf database file in SQL Server Management Studio easily

By
Hi Friends ! Today, i am going to attached .mdf or .sdf database  file in sql server.It is very process. You can easily attached your .mdf or .sdf database file in sql server .In previous tutorial,i have explained "how to add .mdf database in asp.net website".If you are facing any problem to add .mdf or .sdf file in website read here. Now I will add this .mdf database in my sql server.When you will attached your .mdf or .sdf database in sql server then you can perform all query operations (inset,delete,update etc) easily.You can easily take backup of your .mdf  or .sdf database also. There are some basics steps to perform this task which are given below:-
Step 1:- First open your Computer Icon -->C:\Users\Ramashanker\Documents\Visual Studio 2010\WebSites\WebSite37\App_Data --> You will see .mdf file as shown below:-

.mdf file

Note:-In above, i have mentioned my drive path of Database.mdf file.
Step 2:- Now Open your SQL Server Management Studio as Administrator mode as shown below:-
administrative mode

Step 3:-Now proceed to Connect your SQL Server Management studio as shown below:-


connection

Step 4:- Now Right click on Database --> Click Attach as shown below:-


database

Step 5:- Now Click Add Button --> Select Database.mdf file from  your computer as shown below -->OK
.mdf file

Step 6:- After press OK, you will see Database.mdf added in window which is shown below -->Now click OK Button-->done....


attached database.mdf

Step 7:- Now Expand your Database in sql server --> and find table data of attached Database.mdf file as shown below:-


.mdf
Note:-You can see database.mdf file working properly in sql server.if any problem comment  it.
For More...
  1. How to implement view concepts in sql server
  2. How to implement join concepts in sql server
  3. How to use threading concepts in c# application
  4. How to implement transaction concepts in sql server
  5. How to handle date format in sql server easily
  6. How to implement stored procedure in sql server
  7. Difference between delete and truncate statement in sql server
  8. How to copy data from one table to another table in sql server easily
  9. How to make identity column in sql server database
  10. How to create default constraints in sql server
  11. How to create check constraints in sql server
  12. How to implement data integrity concepts in sql server
  13. Real knowledge of sql server  different queries 
  14. Different Tokens of c# language

0 comments:

Post a Comment

Powered by Blogger.