Adventureworks data does not load

  • 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.

     

    • This topic was modified 3 months, 1 week ago by  Meditation.
    • This topic was modified 3 months, 1 week ago by  Meditation.
    Attachments:
    You must be logged in to view attached files.
  • Thanks for posting your issue and hopefully someone will answer soon.

    This is an automated bump to increase visibility of your question.

  • Hi,

    did you change the query window to SQLCMD Mode?

    * 2. Open the script inside SQL Server Management Studio and enable SQLCMD mode.

    * This option is in the Query menu.

    And can you show the error messages?

    good luck,

    Andreas

  • The query window was in SQLCMD Mode as evidenced by the grey highlight showing up over the text.

    I attached the log file, but there doesn't seem to be any errors?

    • This reply was modified 3 months, 1 week ago by  Meditation.
    Attachments:
    You must be logged in to view attached files.
  • Hm,

    I would delete your account and servername from your log.

    Did you try to use the *.bak file to restore the database from a current backup from the link listet in our first post?

    I only knew creation scripts for a database. If you try to put all the data in a simple script, the script will be big.

    In a bak-file the sql server is able to compress all the needed data.

    Good luck,

    Andreas

  • You can download any of the MSFT databases (AdventureWorks etc) from Github.

    See this article: https://learn.microsoft.com/en-us/sql/samples/sql-samples-where-are?view=sql-server-ver16

    I'd go the backup file (.bak) route. Super easy.

  • This was removed by the editor as SPAM

Viewing 7 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic. Login to reply