Categories

.NET (1) CSS (5) OOP (1) PHP (2) SQL (5) SQL Server (8) TSQL (1)

Tuesday, December 27, 2011

Adventureworks Sample Database ER Diagrams

Adventureworks is the sample database from the Microsoft for the SQL Server. It is very helpful to understand any database if you have its ER diagram. So here is the all the ER diagrams I searched from internet.
ER diagrams



Friday, December 2, 2011

Restoring SQL server database ".bak" file

Right click on the database tab –> All Tasks –> Restore Database –> From device –> Select Devices –> Add your .bak file. Click OK. 
Now click the options tab. Here you will see the logical file name of your database. At its right side there will be a physical path of this file. Make sure this path is redirecting to the location where your database files exist, normally default location is "C:\Program Files\Microsoft SQL Server\MSSQL\Data" at the end of this path concatenate your file name. After concatenation your path should be something like this

C:\Program Files\Microsoft SQL Server\MSSQL\Data\test.mdf
C:\Program Files\Microsoft SQL Server\MSSQL\Data\test_Log.ldf.

Now click ok. Large databse normally takes lot of time.