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
 SQL Server 2005 Forums
 Transact-SQL (2005)
 SQLCMD Problem

Author  Topic 

microsql
Starting Member

9 Posts

Posted - 2007-07-06 : 09:45:59
Has anybody seen an issue with SQLCMD when executing an extended stored procedure which does not return the output in SQLCMD but executes the procedure succesfully.

We issue a backup command through SQLCMd through an extended stored procedure. The backup is created succesfully but SQLCMD does not return any output, although running that command from Query Analyser does return some messages when the command is completed.

Osql is succesful with the same command and returns messages succesfully.

Any ideas?

TIA

Haywood
Posting Yak Master

221 Posts

Posted - 2007-07-06 : 10:19:11
What options are you passing to sqlcmd? You may want to try the -Q ("Cmdline query" and exit) option when you pass in your extened procedure call. This will allow sqlcmd to immediately exit after executing the procedure instead of waiting for return output/call/whatever.

Go to Top of Page

microsql
Starting Member

9 Posts

Posted - 2007-07-06 : 10:24:33
I have tried -Q as well with the -o parameter. This has the same problem. The query result is not output to the file. The extended stored procedure is configured so that once a backup takes place a message is displayed. I'm finding that with SQLCMD it creates the backup file but the output is not displayed and i would like it to be displayed. I'm thinking it's a configuration on this one machine since it works on another machine.
Go to Top of Page
   

- Advertisement -