Viewing 15 posts - 9,091 through 9,105 (of 13,469 total)
Toric what you want to do is to look in the scripts section here on SSC, and find some of the examples that script out roles and users, and their...
July 9, 2010 at 6:20 am
Jim is right, there is no hidden field anywhere that tracks WHEN an item was inserted or updated. if you don't have a column for it, you'll have to add...
July 9, 2010 at 6:13 am
thanks for the explanation!
yeah...you can use dynamic SQL in a trigger to do what you want, but if you have 50 databases, don't you need the same trigger on the...
July 9, 2010 at 6:06 am
well, before you go and do that, read this thread, where the original poster is having trouble because his procs don't work the same way anymore when TRY...CATCH is added.
July 9, 2010 at 5:53 am
wouldn't it fail anyway if your table doesn't exist in the database as you are going thru them with a cursor?
if you explain your process, we might be able to...
July 9, 2010 at 5:38 am
Oh man I hated that too;
it's not obvious, but under Scripting options, change "Include IF NOT EXISTS Clause" from true to false...then all your objects will script normally instead of...
July 9, 2010 at 5:35 am
you need to change it to refer to each database individually, and use a full three part naming convention to get to each database, I think:
INSERT INTO Production.dbo.AuditTable ....FROM INSERTED
INSERT...
July 9, 2010 at 5:29 am
dan don't forget a CTE is just a named sub select...you can move the CTE equivalent into the query as a sub query.
;with CTE AS (select other stuff...)
select stuff from...
July 8, 2010 at 2:38 pm
a perfect example of why you should not use the old ansi syntax, and only the new ones with the JOIN keyword.
your query never connects the table FWXProductClassification to anything...
July 8, 2010 at 1:56 pm
just checking the basics...SYSUTCDATETIME() is SQL 2008 only...could it be the server you ran the script on is 2005 and the trigger is failing with invalid column name?
July 8, 2010 at 1:48 pm
Paarth no, you can't assign a column value as a default...it has to be a constant or results of a function.
i think you want to either use a calculated column(MyCol...
July 8, 2010 at 10:52 am
I'd also suggest looking at parameter sniffing and whether statistics are updated on the production servers as well...both of those things can lead to bad performance.
July 8, 2010 at 10:00 am
river i don't think you need to check it before hand , just change it...
if xp_cmdshell is already enabled you just get this message anyway:
Configuration option 'xp_cmdshell' changed from 1...
July 8, 2010 at 9:38 am
that requirement reads like the person who wrote it already knows the answer/how to do it...this isn't a homework question or anything, is it?
July 8, 2010 at 9:25 am
http://en.wikipedia.org/wiki/AutoRun
autorun is an option to call a specific executable on a CDROM, if the user has permitted it(registry settings are checked)
so you could create an executable that is called...
July 8, 2010 at 9:04 am
Viewing 15 posts - 9,091 through 9,105 (of 13,469 total)