Viewing 15 posts - 7,141 through 7,155 (of 7,631 total)
Yeah, it's definitely going to the wrong directory.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 16, 2008 at 7:57 am
FYI, it is ALWAYS possible to construct a mathematical expression that will fit ANY finite set of numbers. for instance:
WHERE (month(dob)-2) * (month(dob)-6) * (month(dob)-7) * (month(dob)-8) *...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 16, 2008 at 7:55 am
You should try the query that I posted, it is highly parallel also.
If you need a working version of Jeff's query, here is one that I modified but is only...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 16, 2008 at 7:23 am
Anybody leave part of this cow for me?
This seems to me to be the most obvious approach, though perhaps not the fastest (when I needed this kind of query to...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 15, 2008 at 6:39 am
I agree with Matt. You cannot do expressions in an EXEC statement.
As a general rule only [font="System"]Select[/font] and the major DML statements can have actual scalar expressions. The...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 5:29 pm
Hey Art, as long as you are here, ...
I notice that you post a lot of code on the forums, which is great, however, it would help some of...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 5:13 pm
berto (4/14/2008)
If some queries run fast in SQL 2000 and very slow in SQL 2005 how we can be sure that our application will run without performance degradation after migration?
The...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 5:02 pm
Try executing:
SET QUOTED_IDENTIFIER ON
GO
first.
Apparently, the author assumed this setting was already on, though it is not normally on and a bad practice in any event, IMHO.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 4:55 pm
Actually, upon further reflection, it seems likely that you need to add your backup directory name to the DIRectory command:
Insert into #BakDir exec xp_cmdshell 'dir D:\BKUP\Demo /B'
declare @file varchar(max)
Select @File...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 4:50 pm
Add the print statements and tell us what they say:
Insert into #BakDir exec xp_cmdshell 'dir /B'
declare @file varchar(max)
Select @File = FileName from #BakDir
Print 'Restoring from file:'
Print @file
Print '--======'
RESTORE DATABASE [Demo]...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 4:43 pm
As for you SQL code, I think that you need one change:
Insert into #BakDir exec xp_cmdshell 'dir /B'
declare @file varchar(max)
Select @File = FileName from #BakDir
-- you do not need the...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 1:29 pm
Jonathan Beck (4/14/2008)
Msg 15281, Level 16, State 1, Procedure xp_cmdshell, Line 1
SQL Server blocked access to procedure 'sys.xp_cmdshell' of component 'xp_cmdshell' because this component is turned...
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 1:24 pm
b.carlson (4/14/2008)
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 12:49 pm
Thanks!
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 14, 2008 at 6:33 am
Please post this in an appropiate forum.
[font="Times New Roman"]-- RBarryYoung[/font], [font="Times New Roman"] (302)375-0451[/font] blog: MovingSQL.com, Twitter: @RBarryYoung[font="Arial Black"]
Proactive Performance Solutions, Inc. [/font][font="Verdana"] "Performance is our middle name."[/font]
April 13, 2008 at 11:20 pm
Viewing 15 posts - 7,141 through 7,155 (of 7,631 total)