Click here to Skip to main content
15,885,869 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i have larger size sql script file i want to execute using command prompt

The script file size has 613354 KB


i tried shows error


C:\windows\system32>sqlcmd -d spyder -i"c:/users/documets/script.sql"
sqlcmd error microsoft ODBC Driver 13 for sql server login failed for user
sql cmd error microsoft odbc driver cannot open database spyder


how to fix this error

What I have tried:

i have larger size sql script file i want to execute using command prompt

The script file size has 613354 KB


i tried shows error


C:\windows\system32>sqlcmd -d spyder -i"c:/users/documets/script.sql"
sqlcmd error microsoft ODBC Driver 13 for sql server login failed for user
sql cmd error microsoft odbc driver cannot open database spyder


how to fix this error
Posted
Updated 2-Jul-18 17:33pm

1 solution

Read the error message again. It has nothing to do with the size of the file.

It's telling you the credentials specified, or in your case NOT specified, did not work to login to the database "spyder".

You're probably going to have to tell sqlcmd the credentials to use to login to the database:
sqlcmd -d spyder -U username -P password -i "C:\users\username\documents\script.sql"
 
Share this answer
 
Comments
Krunal Rohit 3-Jul-18 1:08am    
Sure 5!


KR

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900