Viewing 15 posts - 6,361 through 6,375 (of 7,636 total)
Sorry, I just noticed that you wanted a SQL2000 version as well. This is only SQL2005 and the SQL2000 version would be significantly different. Possibly simpler though.
[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]
July 7, 2008 at 8:41 pm
Oops, found a bug.
Corrected version:
Alter Proc spLogin_OwnedObjects ( @login as SYSNAME ) As
/*
Display all objects in all DBs owned by the Login.
2008-07-06 RBarryYoung Created.
Test:
spLogin_OwnedObjects 'sa'
*/
declare @sql varchar(MAX), @DB_Objects varchar(512)
Select @DB_Objects...
[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]
July 7, 2008 at 8:38 pm
OK, here is a much simplified version that should work for you:
Create Proc spCreate_MultiDBView As
declare @sql varchar(MAX)
Set @sql = 'CREATE VIEW v_student_addresses As
'
...
[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]
July 7, 2008 at 7:57 pm
I just posted a way to do somethng very similar, without cursors:
Create Proc spLogin_OwnedObjects ( @login as SYSNAME ) As
--spLogin_OwnedObjects 'sa'
declare @sql...
[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]
July 7, 2008 at 7:39 pm
I'd have to see the whole procedure to answer that.
[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]
July 7, 2008 at 5:02 pm
Harder than I thought, but try this:
alter Proc spLogin_OwnedObjects ( @login as SYSNAME ) As
--spLogin_OwnedObjects 'sa'
declare @sql varchar(MAX), @DB_Objects varchar(512)
Select @DB_Objects = ' L.name as Login, U.*
From %D%.sys.objects o
...
[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]
July 7, 2008 at 4:30 pm
These are server level triggers.
Does this 3rd party software provide/control a database or the whole server? While possible, that would be unusual. 3rd party software usually only provides/controls...
[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]
July 7, 2008 at 3:19 pm
The other thing that you should consider is making an index for the columns on your WHERE clause.
[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]
July 7, 2008 at 3:12 pm
OK, I checked it out. It still doesn't look right to me. I might use this approach for SQL 2000, but not SQL 2005. I've also seen...
[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]
July 7, 2008 at 3:10 pm
I am not aware of one, but you could certainly write one.
i would suggest creating DDL Login Events triggers/event notifications on the production box. when one of these fires,...
[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]
July 7, 2008 at 1:25 pm
I must be missing something.
Why can't you just do this in a loop:
DELETE TOP 1000
FROM PRTran
WHERE TranAmt = 0 and Qty = 0 and UnitPrice =...
[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]
July 7, 2008 at 1:10 pm
Heh. I don't mean to laugh, but I just spent the last three days trying to figure out the same thing.
First, credit where credit is due: Jeff Moden...
[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]
July 7, 2008 at 9:50 am
Heh. It's amazing how the OP not putting their requirements in the first post, then putting them in their second post, can result in a 100+ replies. And...
[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]
July 7, 2008 at 8:33 am
Yeah, I was wondering about that, but he also said "sent as one Varchar(max) parameter...", so it's a little contradictory. Anyway, I'm pretty sure that I'm going to fall...
[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]
July 7, 2008 at 12:56 am
I am parsing 1MB strings in about 6 seconds on my laptop with the following function:
ALTER function [dbo].[fnSplit3](
...
[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]
July 7, 2008 at 12:28 am
Viewing 15 posts - 6,361 through 6,375 (of 7,636 total)