Forum Discussion

CEdward0764's avatar
CEdward0764
Copper Contributor
Dec 23, 2024

Adventureworks data does not load in SSMS

Hello,

I am a new member here so forgive me if I am not posting in the right spot.

I have been trying to load data using a script for the AdventureWorks database. I used the creation script from the following link:

https://learn.microsoft.com/en-us/sql/samples/adventureworks-install-configure?view=sql-server-ver16&tabs=ssmsver

After executing the script, I get "Query completed with errors", but I do not actually know what the errors are. The database was added and I see all of the tables, but when I query the tables, there is no data.

For context, I am using a macOS and running a virtual machine with Windows 11 and SQL Server 2019. I am also using SSMS 2022.

3 Replies

  • rodgerkong's avatar
    rodgerkong
    Iron Contributor

    Was your installation following the description of script?

    It is located at the beginning of the script file. This 'How to...' is come from _DW script. If you were using another script, check the same place. 

    /*
     * HOW TO RUN THIS SCRIPT:
     *
     * 1. Enable full-text search on your SQL Server instance. 
     *
     * 2. Open the script inside SQL Server Management Studio and enable SQLCMD mode. 
     *    This option is in the Query menu.
     *
     * 3. Copy this script and the install files to C:\Samples\AdventureWorks, or
     *    set the following environment variable to your own data path.
     */
     :setvar SqlSamplesSourceDataPath "C:\Samples\AdventureWorks\"
    
    /*
     * 4. Append the SQL Server version number to database name if you want to
     *    differentiate it from other installs of AdventureWorks.
     */

     

    • CEdward0764's avatar
      CEdward0764
      Copper Contributor

      I don't understand your question? Are you saying that a DW script may be inappropriate?

      • rodgerkong's avatar
        rodgerkong
        Iron Contributor

        I mean, before you run the script, read the instructions at the beginning of the script file.

Resources