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:-
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:-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:-
Note:-In above, i have mentioned my drive path of Database.mdf file.
Step 3:-Now proceed to Connect your SQL Server Management studio as shown below:-
Step 4:- Now Right click on Database --> Click Attach as shown below:-
Step 5:- Now Click Add Button --> Select Database.mdf file from your computer as shown below -->OK
Step 6:- After press OK, you will see Database.mdf added in window which is shown below -->Now click OK Button-->done....
Step 7:- Now Expand your Database in sql server --> and find table data of attached Database.mdf file as shown below:-
Note:-You can see database.mdf file working properly in sql server.if any problem comment it.
For More...
- How to implement view concepts in sql server
- How to implement join concepts in sql server
- How to use threading concepts in c# application
- How to implement transaction concepts in sql server
- How to handle date format in sql server easily
- How to implement stored procedure in sql server
- Difference between delete and truncate statement in sql server
- How to copy data from one table to another table in sql server easily
- How to make identity column in sql server database
- How to create default constraints in sql server
- How to create check constraints in sql server
- How to implement data integrity concepts in sql server
- Real knowledge of sql server different queries
- Different Tokens of c# language
0 comments:
Post a Comment