Tag Archives: XP_CMDSHELL

Create Excel File Using OPENROWSET and XP_CMDSHELL

Create Excel File Using OPENROWSET and XP_CMDSHELL Create PROCEDURE MCA_SP_CREATE_EXCEL @File_Name as varchar(50) = ” AS BEGIN SET NOCOUNT ON declare @File_Name as varchar(50) DECLARE @Cmd varchar(1000) DECLARE @fn varchar(500) DECLARE @provider varchar(100) DECLARE @ExcelString varchar(100) – New File Name … Continue reading

Posted in Uncategorized | Tagged , , , | Leave a comment

Using XP_CMDSHELL on SQL Server 2005

So in order to use xp_cmdshell whether you are a sysadmin or a regular user you need to first enable the use of xp_cmdshell.  Doing this is similar to what was done when enabling the dedicated administrator connection.  This can … Continue reading

Posted in Uncategorized | Tagged , | Leave a comment

What is XP_CMDSHELL

XP_CMDSHELL – extended stored procedure. With this extended stored procedure you have the ability to run any command line process within your SQL script, so you can embed this within your stored procedures, jobs or batch processing. In SQL Server … Continue reading

Posted in Uncategorized | Tagged , , | Leave a comment

XP_CMDSHELL – Extended Stored Procedure

“xp_cmdshell” is an extended stored procedure provided by Microsoft and stored in the master database. This procedure allows you to issue operating system commands directly to the Windows command shell via T-SQL code. If needed the output of these commands … Continue reading

Posted in Uncategorized | Tagged | Leave a comment