Ramblings of a DBA

Tara Kizer
posts - 166, comments - 837, trackbacks - 75

My Links

Advertisement

News

Subscribe
Search this Blog

Archives

Post Categories

Work

March 2004 Blog Posts

xp_cmdshell

Why is it that you can pass a built string to xp_cmdshell but you can't build your string at the same time.  What I mean is this: This is legal: DECLARE @cmd VARCHAR(255)DECLARE @ServerName SYSNAME SET @ServerName = 'Server1'SET @cmd = 'copy C:\temp\test.txt \\ + @ServerName + '\SomeShare\' EXEC master.dbo.xp_cmdshell @cmd   This is not legal: DECLARE @ServerName SYSNAME SET @ServerName = 'Server1' EXEC master.dbo.xp_cmdshell 'copy C:\temp\test.txt \\ + @ServerName + '\SomeShare\'  Output: Server: Msg 170, Level 15, State 1, Line 5Line 5: Incorrect syntax near '+'.Any comments?

posted @ Monday, March 29, 2004 2:22 PM | Feedback (18) | Filed Under [ SQL Server - General ]

TechNet Webcast: Authoring Reports in SQL Server 2000 Reporting Services – Level 200

TechNet Webcast: Authoring Reports in SQL Server 2000 Reporting Services – Level 200 April 1, 2004 10:00 AM - 11:30 AM Pacific Time Jason Carlson, Product Unit Manager SQL Server, Microsoft Corporation, Doug Harts, Cizer Software   SQL Server 2000 Reporting Services further extends the business intelligence capabilities of SQL Server by providing great new capabilities for getting information out of data stored in many disparate locations. This webcast will focus on the report authoring requirements and how both Microsoft and partners provide the tools to get the most out of Reporting Services. Join Jason Carlson,...

posted @ Friday, March 26, 2004 9:47 AM | Feedback (1) | Filed Under [ MS Webcasts ]

Analog Clock

Duane Dicks has a script that can display an analog clock in Query Analyzer. Make sure your results are in text and your font is Courier.

posted @ Monday, March 15, 2004 1:46 PM | Feedback (3) | Filed Under [ SQL Server - General ]

Powered by:
Powered By Subtext Powered By ASP.NET