December 19, 2024 at 10:24 pm
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:
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.
December 20, 2024 at 11:08 pm
Thanks for posting your issue and hopefully someone will answer soon.
This is an automated bump to increase visibility of your question.
December 23, 2024 at 1:07 pm
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
December 23, 2024 at 4:42 pm
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?
December 27, 2024 at 7:09 am
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
December 27, 2024 at 7:40 am
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.
January 2, 2025 at 7:13 am
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
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy