Use db not working on azure

Tes Gam 81 Reputation points
2020-12-05T05:40:54.263+00:00

I'm using SQLCMD in bash script and it works well. But when I do target Azure SQL Server I got an error for using statement. Here is my command:

sqlcmd.exe -S DBserverName -U username -P p@ssword -i "C:\query.sql"  
 
Azure SQL Database
0 comments No comments
{count} votes

Accepted answer
  1. YASER SHADMEHR 781 Reputation points
    2020-12-05T05:44:55.677+00:00

    Using command not working on Azure DB. Remove all Using and use -d on you command. For example:

    sqlcmd.exe -S DBserverName -U username -P p@ssword -i "C:\query.sql" -d your-db-name
    

0 additional answers

Sort by: Most helpful