Viewing 15 posts - 6,481 through 6,495 (of 22,226 total)
Sounds like a great place to put a wrapper proc. Have it have the same name and parameters as your current procedure. Then, inside it, it figures out which of...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 11:14 am
Sean Lange (4/3/2015)
Grant Fritchey (4/3/2015)
Koen Verbeeck (4/3/2015)
It's Friday and I'm grumpy...http://www.sqlservercentral.com/Forums/Topic1674050-3412-1.aspx
OK. Funny, very funny, but a little uncool.
I found it a rather fitting response to somebody who clearly seemed they...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 7:33 am
Koen Verbeeck (4/3/2015)
It's Friday and I'm grumpy...http://www.sqlservercentral.com/Forums/Topic1674050-3412-1.aspx
OK. Funny, very funny, but a little uncool.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 6:37 am
Instead of killing all the processes directly, you could run your query, capture the ones you're going to kill, then simply set the database to restricted user and use rollback...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 6:30 am
You're doing an INSERT and then want to use the values inserted later within the same query? How about using the OUTPUT clause to capture the values into either variables...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 6:24 am
Try rewriting it to:
SELECT @KUR = RATES1 FROM dbo.L_DAILYEXCHANGES WHERE EDATE= @T1 AND CRTYPE =1;
But, it's only going to work if that only returns a single value. If it returns...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 6:21 am
Rather than just killing the processes, understand what those processes are doing and why you're getting "massive" locks from them. And locking is a normal part of inserts, so it's...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 3, 2015 at 6:18 am
Stanley Pagenel (4/2/2015)
Thanks to both of you. I've used tuning advisor and apply the recommendations and I've gain more speed now.
That's good. What did it advise you to do?
For what...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 2, 2015 at 7:05 am
I work for Red Gate
You can use Red Gate SQL Compare[/url] and SQL Data Compare[/url] to look at the backup and retrieve just a table and it's data.
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 2, 2015 at 5:04 am
I don't have specific scripts that I can supply you. However, the documentation is very clear. You can use the HyperV cmdlets to query the hypervisor. You can then use...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 1, 2015 at 7:38 pm
You have to use NEWID() to generate new values for a UNIQUEIDENTIFIER column. You might also want to look at NEWSEQUENTIALID() (in the same documentation).
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 1, 2015 at 4:16 pm
Eirikur Eiriksson (4/1/2015)
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 1, 2015 at 4:13 pm
It's only 238 lines. That's what, two printed pages, maybe three. We don't start talking about how evil a query is until it breaks at least 10 printed pages.
So, we...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 1, 2015 at 4:12 pm
I don't know of any way to query the hypervisor from within T-SQL. Not directly. Assuming the login your SQL Server instance operates under has permission to the hypervisor, it's...
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 1, 2015 at 3:55 pm
Still ought to see some sort of error. Maybe you're just getting a timeout while it waits for a lock to clear? What's calling the truncate statement?
"The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
- Theodore Roosevelt
Author of:
SQL Server Execution Plans
SQL Server Query Performance Tuning
April 1, 2015 at 3:53 pm
Viewing 15 posts - 6,481 through 6,495 (of 22,226 total)