I have a batch file that runs some SELECT queries using sqlcmd, puts the results into text files, and uploads those files onto an FTP server. That\'s all working just the way it should, which is how I
Is it possible to read in a txt file using sqlcmd, to avoid needing to type every cell by hand? I\'ve been given a txt file with every table row on one line, and every column seperated by a comma. (a
Does the SQLCMD command :r support non-constant literal paths? For example: setvar $(path1) \'.\\script.sql\'
I need to check the exit status (success/failure) of a query run through SQLCMD utility. For example, the server I am connecting doesn\'t have a database name EastWind. Then, the command below fails w
Need some help with script files. I have an SQL script file in the following format: Begin tran insert..
I\'m trying to use sqlcmd to execute some SQL scripts. Using a test command with a simple query like: sqlcmd -S HOSTNAME -d MYDATABASE -Q \'SELECT Names FROM Customers\'
When running a script in SQLCMD, is there a setting, parameter or any other way of making it effect开发者_StackOverflow社区ively run a GO command at the end of each SQL statement?
I\'m trying to write an automated sqlcmd script that creates two identical logins on two different servers. So the relevant steps go:
I am using SQL SERVER 2005 Express. I can delete the database from the query analyzer, what you call Mgmt Studio (ssmsee) by providing double quotes to the database name and things get done;
I\'m trying to create a sqlcmd script to turn on database mirroring between two servers. Most of it is fine, but I\'m having a massive headache with the security step.