Viewing 15 posts - 376 through 390 (of 1,315 total)
Now that I've seen the longer version of your trigger, I have to agree that the email should be handled outside of the trigger. And if you get rid...
May 13, 2009 at 6:00 pm
Lynn Pettis (5/13/2009)I haven't used save points, but wouldn't you want that outside the transaction you are starting in the TRY CATCH block?
If you mean the SAVE TRAN statement should...
May 13, 2009 at 5:36 pm
Is your SQL Agent service running as a local system account, or a domain account?
When using Windows authentication, the package will use the credentials of the user running the package....
May 13, 2009 at 3:44 pm
The tricky thing about savepoints is that after rolling back to a savepoint you still have to do a COMMIT.
-- Get the initial transaction nesting level (will be at least...
May 13, 2009 at 3:27 pm
I'm using '{COMP}' and '{TBL}' as replacement tags in the template string (I changed the angle brackets to curly braces so this would post correctly). They're just text strings,...
April 17, 2009 at 1:39 pm
The answer you've already got should work, but I would do it slightly differently.
I like to use REPLACE functions to do multiple substitutions in a large string template, rather than...
April 17, 2009 at 6:48 am
Whether you copy the data to a new filegroup with an INSERT/SELECT, or move it by creating and then dropping a clustered index, the entire table has to be read...
April 14, 2009 at 8:40 am
This is more of an UNPIVOT question.
SELECT ColumnName,
CASE ColumnName WHEN 'Col1' THEN col1
WHEN 'Col2' THEN col2
ELSE col3 END AS ColumnValue
FROM MyTable
CROSS JOIN (
SELECT 'Col1' AS ColumnName
UNION ALL
SELECT 'Col2'...
February 18, 2009 at 12:52 pm
One approach to using config files that simplifies debugging is to include variable values instead of step properties, then define properties from those variables using expressions. This way you...
October 22, 2008 at 8:27 am
SQLCMD can run scripts that include CONNECT commands to change server connections, so you could easily write one script that ran BACKUP on one server and RESTORE on another.
You could...
October 16, 2008 at 7:14 am
The SERIALIZABLE isolation level would prevent other users from adding a record to the table in the middle of your transaction. It would lock not just the (previous) last...
September 30, 2008 at 4:26 pm
I'm curious what functions you need to implement that cause you to have a bunch of junior coders writing in CLR. Datareaders force row-by-row operations, if they can be...
September 30, 2008 at 3:51 pm
Storing packages in the file system is usually better for development, primarily because you can use source control. (Hopefully your source control archive is part of a regular backup.)...
September 30, 2008 at 3:30 pm
In a DTS package data transformation step, you are writing VBScript rather than T-SQL. You can't use CAST or CONVERT, there are separate functions such as CDbl(), CInt(), and...
September 11, 2008 at 8:35 am
I have found WITH(NOLOCK) very useful in reporting queries against web databases.
The reports are not critical, they are summarizing user counts and page hits rather than financial or medical info....
September 10, 2008 at 6:18 pm
Viewing 15 posts - 376 through 390 (of 1,315 total)