Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Programming
 sqlcmd

Author  Topic 

ori_davidson
Starting Member

15 Posts

Posted - 2014-09-19 : 10:58:20
hello,
i'm trying to export a query to a csv file from a batch file.

batch file:
sqlcmd -S loni-sbs -d lonikahn0207 -E -Q "select * from ael" -o "AELORI.csv" -h-1 -s"," -w 700

BUT, I'm getting a user name and password issue inside the csv file:
Cannot open database "lonikahn0207" requested by the login. The login failed.
Msg 18456
Login failed for user 'LONIBOOKS\Administrator'.

ori_davidson
Starting Member

15 Posts

Posted - 2014-09-19 : 14:00:28
ANYONE???HELP
Go to Top of Page
   

- Advertisement -