I have a .sql file in my linux machine. I would like to connect to MS SQL database in the remote windows machine and run the .sql file in that databas ...
I have a .sql file in my linux machine. I would like to connect to MS SQL database in the remote windows machine and run the .sql file in that databas ...
I am trying to convert OSQL comamnd to SQLCMD as below. The OSQL command is working fine,but converted SQLCMD is throwing below error, Please help. O ...
I got a laptop on which SQL Server Express is already installed. The server name is SRH\SQLEXPRESS and the version is 10.0.2531.0. The operating syste ...
I am trying to re-create a database (MyDB) from one SQL server (Source) to another one (Target). Source is located on my local machine and is SQL Serv ...
I am busy experimenting with ADODB as a means to write prepared scripts on customers' databases as it is infinitely better than batch scripting with s ...
When executing any one of the following commands: I am getting the following error: However, I am able, without issue to login and run SELECT qu ...
I have a stored procedure which runs as a scheduled job on SQL Server 2008, and I am trying to migrate this to SQL Server 2014. The procedure generat ...
I am executing some sql queries using OSQL through inno setup. I am using following code to run OSQL. This is just for example purpose This works f ...
Looked everywhere... to no avail. I am trying to do a basic select using SQLCMD from the command line: sqlcmd -S myServer -d myDB -E So far so good ...
I am running OSQL command in .bat file and I am running my SQL script and generating the output in a text file, however the data in the file is scatte ...
I am trying to audit the network, to find and clean out old databases that may have been tested and forgotten. Right now, I know I can use SQLCMD -L ...
So I am working on my first batch script that utilizes a OSQL query. Here is my current code: The idea is that names.txt has a list of sql queries ...
I am automating various EXEs via a batch file, including calling an existing batch file which in turn executes various TSQL statements via OSQL.exe. ...
I have a batch script which runs an sql query on multiple databases and appends the results to a .dat file. The script is adding 3 blank lines under t ...
So we use osql to run in stored procedures as part of our build process. We use a project with an sp folder that gets published with applications as p ...
When i run this command: sqlcmd -S server -U sa -P xxxxxxx -i d:clients.sql -o D:\clients.txt but in file i have x rows affected, "1> 2> 3> 4 ...
I am writing an installer which should perform some MSSQL database operations. These operations are in a .cmd file and are performed through OSQL.exe ...
Im having trouble getting a certain query to work outside SSMS. The query gathers all the user defined data types and creates IF EXISTS statements and ...
I have a script file in a folder.I want to use TSQL to run this script without opening it in SSMS as I will be using SSIS to run this script to genera ...
I created a batch file which execute a sql command. Let's see the piece of code The above part of code returns always 0 and Sorry, could not compl ...