Viewing 15 posts - 37,306 through 37,320 (of 49,552 total)
Unlikely.
Oddly enough, row-by-row code doesn't usually suffer badly from parameter sniffing. Parameter sniffing is worst when the optimiser compiles a statement thinking that there's a very small number of...
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
August 1, 2009 at 9:06 am
Then try explicitly casting your dates to string before concatenating them, use the CONVERT function.
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
August 1, 2009 at 9:04 am
If you replace the exec with a print statement in to print the full text of the dynamic SQL, what does it print?
Print 'SELECT databasename,starttime,eventclass,LoginName,TargetUsername,Objectname
FROM ' + @server + '.TRACEDB.dbo.TraceTable...
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
August 1, 2009 at 8:23 am
manoj2001 (8/1/2009)
My Question here is does this code works in SQl Server 2000
That code will work in SQL 2000. The SQL 2000 parser was rather lax in what it allowed...
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
August 1, 2009 at 6:39 am
Unless you had a trace running or a trigger on the table that captured that info, as far as I'm aware, you can't.
You should be able to get the uid...
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
August 1, 2009 at 3:41 am
Bear in mind that the transaction log was not intended as an audit log. It's used for SQL to do transaction rollbacks and to ensure database integrity.
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
August 1, 2009 at 2:47 am
No, and even if there was, you still wouldn't be able to get the host name. That information is not in the transaction log.
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
August 1, 2009 at 2:45 am
You can't kill system spids. The BRKR TASK sessions on my SQL box are sessions 10, 15 and 16. All system processes.
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
August 1, 2009 at 2:40 am
Jeff Moden (7/31/2009)
Sounds like interview questions... if I answer correctly, do I get the job?
Question is, do you want the job?
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
August 1, 2009 at 2:16 am
Jeff Moden (7/31/2009)
I'm always amazed at that... users not checking to see their own posts.
During that major problem a few weeks back, I had one guy post 15 times. After...
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
August 1, 2009 at 2:16 am
Also asked here: http://www.sqlservercentral.com/Forums/Topic763521-6-1.aspx
No replies to this thread 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
August 1, 2009 at 2:13 am
Are you using SQL Log rescue? If so, I don't think the host name is saved in the transaction log. It's unnecessary for what the transaction log is - 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
August 1, 2009 at 2:10 am
Jeffrey Williams (7/31/2009)
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
August 1, 2009 at 2:05 am
Adam Angelini (7/31/2009)
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
August 1, 2009 at 2:04 am
As I said, you should take the order by out completely. In SQL 2005 and above, order by in a view is not honoured. SQL will ignore that TOP 100%...
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
August 1, 2009 at 2:01 am
Viewing 15 posts - 37,306 through 37,320 (of 49,552 total)