use master DECLARE @cmdstr as varchar(255) set @cmdstr='c:\utils\stop.bat' print @cmdstr Exec master.dbo.xp_cmdshell 'net use "\\213.243.39.106\utils" /u:acsdom.int\serviceusr 1qaz3EDC4rfv*' EXEC master..xp_cmdshell @cmdstr use master DECLARE @cmdstr as varchar(255) set @cmdstr='c:\utils\start.bat' print @cmdstr Exec master.dbo.xp_cmdshell 'net use "\\213.243.39.106\utils" /u:acsdom.int\serviceusr 1qaz3EDC4rfv*' EXEC master..xp_cmdshell @cmdstr