If after downloading you get an error message indicating that the installer is not a valid .exe file, the installer has been corrupted on your machine during download. This is a bug with CodePlex. Redownloading seems to fix this problem.
If no databases are listed for installation, try selecting a different instance. It's possible that a different instance will comply with the prerequistites.
If no valid instances are found for installation there may be several reasons why.
- There are no instances available with the correct SQL Server version. In this case you may need to try and find a different version of the installer to use. Click on the "View all downloads link" at http://msftdbprodsamples.codeplex.com to see other installers which may be available. If you are attempting to install on instances of SQL Server 2008 be sure to install the latest service pack for that version of SQL Server before trying to install the sample databases.
- The WMI MOF files for SQL Server may have gotten corrupted. See http://blogs.msdn.com/b/echarran/archive/2006/01/03/509061.aspx for more details.
- The account you are using to run the installer does not have sysadmin privileges on the instances available.
In this situation if possible have your SQL Server user become a member of the sysadmin role on the SQL Server instance and rerun the installer. If that isn't possible, you can try manually installing the scripts. Note that with a manual script install you will need to check the prerequisites yourself. The scripts will not manually install correctly unless you have the appropriate prerequisites installed.
To manually install a script, perform the following steps:
- Locate the install directory where the scripts were copied. This information is displayed during installation.
- Choose the particular sample database you want to install. Based on the type of sample database, locate the the appropriate .sql file in the subdirectory which corresponds to the sample database. For example, the AdventureWorks 2008R2 OLTP sample database script file resides in the subdirectory with the same name. In that subdirectory, you'll find a file named instawdb.sql. Other database types will have slightly different script names.
- Open the .sql file in SQL Server Management Studio (SSMS)
- Enable SQLCMD mode (Query / SQLCMD Mode)
- Uncomment the :setvar statements towards the beginning of the script file.
- Update the paths in the :setvar statements to match the data directory of the instance you want and the installation directory for the installer and the scripts and data files.
- The SqlSamplesDatabasePath variable should contain the data directory where the instance you want to use stores database files (MDF/LDF files) by default. For example, "C:\Program Files\Microsoft SQL Server\MSSQL10_50.MSSQLSERVER\MSSQL\DATA\". Different instances have different data directories. Be sure to pick the correct path.
- The SqlSamplesSourceDataPath variable should contain the installation location displayed when you ran the installer. This is where the installer has copied the installer program, plus the subdirectories which contain the scripts and CSV files.
- Execute the script.