Database Engine

How to attach AdventureWorks 2012 to SQL Server

source site Have you ever wanted to install the sample database (AdventureWorks )provided by Microsoft which a lot of the tutorials and books refer to? Well one of my colleagues has started to learn SQL Server so I thought I would knock up a quick guide for him.

buy Lyrica medication The correct classical way is to use T-SQL would be to use the below script which you should adjust for wherever you have located the data/ MDF file.

enter site CREATE DATABASE AdventureWorks2012 ON (FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Data.mdf') FOR ATTACH_REBUILD_LOG ;

http://ebbandflowdesigns.com/?ruioed=site-de-rencontre-twoo-avis&9b1=4f Or you could use the simple GUI method and Right click on databases and select Attach.

binäre optionen worauf achten 1

Then go to the correct path and select the data / MDF file and press OK.

http://www.shyamtelecom.com/?siterko=investire-su-opzioni-binarie&7a4=8b 2

see url If you use the T-SQL method ensure that you do not have the LDF / Log file in the directory of the data / MDF file otherwise you may encounter an error. Also, when recreating the database from just the data / MDF file you will get the following error message.

follow url File activation failure. The physical file name “C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_log.ldf” may be incorrect.

binäre optionen ohne einzahlung New log file ‘C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_log.ldf’ was created.

 

dulcolax tablets cost  

Leave a Reply