I am executing xp_cmdshell from the SQL query editor to delete a file in a folder but getting a two rows as result; the first row contains a me开发者_StackOverflow社区ssage \"The system cannot find th
I have a requirement to automatically print an ssrs report to a specific printer on the network whenever a n开发者_运维百科ew row is inserted into a database table.There is a trigger on the database t
I have this TSQL code that dumps data from tables using BCP.It looks complicated, but it simply creates a @command string to be executed once for each table, then BCP dump the table records to disk.It
I am running SQL Server 2005 on Windows Server 2003 machine. I have a requirement to accumulate small text files into a bigger one.
It was created console application that has two param: one is a command like \"send\"and second is a xml string like \"<Messages><msg>My message</msg></Messages>\". Console app
I am looping through all my databases and aggregating the results into an aggregates database. In my loop I call
I am trying to check the state of services when SQL Server is started. I am using xp_cmdshell and \'sc query SQLServerAgent | FIND \"STATE\"\' for example to load the output to a global temp table. It
declare @servername varchar(2000) set 开发者_如何学Go@EmriServerit=(select @@servername) declare @dbname varchar(2000)
I am seeing an error message when trying to execute xp_cmdshell from within a stored procedure. xp_cmdshell is enabled on the instance. And the execute permission was granted to my user, but I am sti