-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
There seems some buffer limitation when use sqlcmd to run query #47
Comments
25bobby
changed the title
sqlcmd can only read limited line of code at one time?
There seems some buffer limitation when use sqlcmd to run query
Feb 19, 2022
opened a PR for the driver fix denisenkom/go-mssqldb#723 |
Thank you very much for the fix. Btw, do you know when the release build might be ready if the PR is checked in? Thanks. |
I can turn around a new sqlcmd release fairly quickly once go-mssqldb takes the fix. |
Sounds great. Please post a comment when the new release is ready. Thanks. |
Please try v0.4.0 |
Thank you. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
There seems some kind of buffer limitation when using the sqlcmd tool to run query.
Problem:
When I use sqlcmd to run restore database sql query, it will hang if I keep the
STATS=5
keyword in the query (seemanual_testing_setup_script.sql
below). Also, when use the sqlcmd to run query files with bunch ofupdate
query statement, I can only run 4 update statements at a time and it will hang at the fifth update statement.Reproduce:
Below is the log when try to reproduce the issue. In the Dockerfile, besides copies the sql query file and download the sqlcmd to the container, I will start the server and run a simple restore database query but when it does that, it will hang and stop at
30 percent processed
.For this test, I used Microsoft northwind.bak file.
this is my sql query in the
manual_testing_setup_script.sql
fileIf I removed the
STATS = 5
in my query, the build will succeed.Below is the content in my restore_db_test.sh file
The same issue also happened when I try to run multiple DB update statements. I will need to break them down into smaller batches, then it can run successfully without hanging.
Finally, the same issue doesn't happen when I use the Azure Data Studio sqlcmd tool to run the query or to restore the database.
Thank you for your time and help. Please let me know if you need more information.
Original question: #36 (reply in thread)
The text was updated successfully, but these errors were encountered: