Viewing 15 posts - 47,611 through 47,625 (of 49,552 total)
My ASP is rusty but ....
Ray M (1/23/2008)
'str = "if not exists (SELECT * FROM Checklist_Justify WHERE iAsmtID="&iAsmtID&")"'str = "INSERT INTO Checklist_Justify (iAsmtID, sQuest, sJustify) VALUES ("&iAsmtID&","&sQuest&",'Testing')"
Unless I'm very mistaken,...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 11:53 am
Switch trace flag 1204 on. That makes SQL write the deadlock graph into the error log. It's not as pretty as the profiler version, but it will work.
If you're unsure...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 11:44 am
Jeff Moden (1/19/2008)
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 11:34 am
Shouldn't make a difference. Certainly won't cause a hash-operation. Probably they're queries someone 'wrote' using enterprise manager, which puts that in by default.
In the exec plan, you should see the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 8:09 am
dsc (1/23/2008)
There is a high degree of fragmentation on the indexes.
Rebuilding your indexes is an obvious suggestion.
Can you post the table structure, indexes and the code that's causing the table...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 8:04 am
One of the things to watch for with table-valued functions (especially the multi-statement table valued functions) is that the resultant table, just like a table variable) has no column statistics...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 8:02 am
I haven't tried it, but it should be possible to recover all the way.
Full backups don't truncate the transaction log (only tran log backups do that) so you should...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 2:01 am
And the code you're using to check existence and insert also, please.
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 23, 2008 at 1:48 am
You're looking for a left outer join (to get all rows from tab1 even where there aren't matches) and a case statement to construct the WorkFlag depending on the existence...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 19, 2008 at 10:04 am
Count (*) will give you the total number of rows in the result set. Count(column name) give you the number of non-null values in the column.
If there are nulls in...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 19, 2008 at 10:00 am
If you have an explicit transaction and within that transaction you reference a remote server, the transaction will be promoted to a distributed transaction.
From the error, it looks like the...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 19, 2008 at 9:56 am
Terry Gamble (1/18/2008)
The table being imported into is indexed against duplicates based on cust_id field.
What I'm thinking...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 19, 2008 at 9:54 am
Terry Gamble (1/18/2008)
truncate table [LM_Date1]
insert into [LM_Date1]
select
...
Order by H.[Sold_Date] DESC
Order bys have no real use in an insert statement. The 'order' that the data's stored in the table depends...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 19, 2008 at 9:51 am
It looks like it gets the trace ID from the nic_aud_trace table. Check that table, see what's in there
declare get_traces cursor for
select curr_trace_id from nic_aud_trace
Also, it's not tracing to a...
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 19, 2008 at 9:47 am
Not with the native SQL backup/restore. I know litespeed can restore a single table from a backup. It's a time-intensive operation on a larger DB, but it can be done....
Gail Shaw
Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability
January 18, 2008 at 11:51 am
Viewing 15 posts - 47,611 through 47,625 (of 49,552 total)