![]() An invalid SqlSamplesSourceDataPath path will generate an error that the bulk load steps failed because the. Before running this script in SSMS, You should uncomment setvar commands of both path variables and also both path variables should be set with necessary and appropriate values(As specified in Fig. SqlSamplesDatabasePath will take path of the folder where AdventureWorks database files will be stored after installation while SqlSamplesSourceDataPath should be set with the actual path of “AdventureWorks 2008 OLTP Script” folder where you have all the csv files in your system. This script depends on two path variables SqlSamplesDatabasePath and SqlSamplesSourceDataPath. 1 shows instawdb.sql DDL script file in SSMS. Update the DDL script path variables (See Fig 1).įig. ![]() Open instawdb.sql DDL Script File in SQL Server Management Studio.ĥ. csv files and one AdventureWorks DDL script file named “instawdb.sql”.Ĥ. ![]() In the Script folder you will find collection of. Extract zip file into “ AdventureWorks 2008 OLTP Script” folder.ģ. Download AdventureWorks 2008 OLTP Script.zip file from below link.Ģ. So now, having followed the above guidance, you can start to following through some of the Microsoft examples and try stuff out fro yourself.1. The third and fourth lines show that SQL Server is upgrading the database from version 705 (SQL 2012 RC0) to version 706 (SQL 2012 RC1/RTM).įor more information on the versions of the MDF file and SQL Server product version, please see Pranavs blog post “ How to determine version of Local Sql Instance and your database“. The file activation failure is simply saying that the log file could not be found, you can see on the second line that SQL has created the required log file for you. Database 'AdventureWorks2012' running the upgrade step from version 705 to version 706. ![]() Converting database 'AdventureWorks2012' from version 705 to the current version 706. New log file 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQL_2012\MSSQL\DATA\AdventureWorks2012_log.ldf' was created. The physical file name "C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL\DATA\AdventureWorks2012_Log.ldf" may be incorrect. The following message is displayed (this could vary if you’re not using SQL Server 2012): File activation failure. ![]() Next, add the database by running the following SQL (amend the filename to reflect the location of the file on your system): CREATE DATABASE AdventureWorks2012 ON ( FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQL_2012\MSSQL\DATA\AdventureWorks2012_Data.mdf') With SSMS open, connect to your database server and click New Query from the toolbar. For OWNER RIGHTS check that Full control is ticked, if not, tick it and then hit Apply and OK through the remaining dialog windows. To check and rectify this, browse to the file using Windows Explorer and right-click the datafile, select Properties, Security tab then Edit. Some users have noted that if you’re using Windows 7 or 8 then you need to start SSMS as Administrator, I’m using Windows 7 and have had no problem running it up normally but it’s worth bearing in mind if you do hit an error.Īlso, you may encounter an “Access is denied” message when attempting to access the datafile – this is possibly the level of permissions on the data file itself. Once the download has completed, it is advisable to copy the data file to your DATA folder, in my case, this is located here: C:\Program Files\Microsoft SQL Server\MSSQL11.MSSQL_2012\MSSQL\DATA. To get the datafile, browse to the Microsoft SQL Server Samples page on CodePlex and take the AdventureWorks2012 Data File. After installing SQL Server 2012, it is a good idea to download and add the sample database to your SQL Server instance. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |