sqlcmd
Error Handling with Batch File & Sqlcmd
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[详细]
2023-03-01 08:44 分类:问答Read in a txt file using sqlcmd?
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[详细]
2023-02-26 23:48 分类:问答SQLCMD :r <path> where path is a variable
Does the SQLCMD command :r support non-constant literal paths? For example: setvar $(path1) \'.\\script.sql\'[详细]
2023-02-25 21:28 分类:问答Return value of SQLCMD
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[详细]
2023-02-19 16:39 分类:问答Executing a stored proc inside a script file using the sqlcmd -i
Need some help with script files. I have an SQL script file in the following format: Begin tran insert..[详细]
2023-02-19 08:23 分类:问答sqlcmd won't run - Is this a config issue?
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\'[详细]
2023-02-13 06:26 分类:问答Can you make SQLCMD immediately run each statement in a script without the use of "GO"?
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?[详细]
2023-02-09 05:29 分类:问答How can I pass data between servers using t-sql and/or sqlcmd?
I\'m trying to write an automated sqlcmd script that creates two identical logins on two different servers. So the relevant steps go:[详细]
2023-02-08 07:53 分类:问答SQLCMD - trying to drop a database with alphanumeric name '14Data' gives Syntax Error
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;[详细]
2023-02-07 03:51 分类:问答Secrutiy permissions problem in SQLCMD from cmd prompt
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.[详细]
2023-02-05 15:51 分类:问答