Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Transact-SQL (2005)
 Setting T-SQL Priority

Author  Topic 

mdkottman
Starting Member

7 Posts

Posted - 2007-05-07 : 10:39:17
Does anyone know how to set SQL priority? I have a sql script that will create an index on a new table, so there will be deadlock issues, but I want it to run in the background so it won't affect the production processes.

Thanks




Cogito ergo spam -- I'm pink therefore I'm Spam

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-07 : 12:55:40
You can build index online in sql2k5 enterprise edition.
Go to Top of Page

dinakar
Master Smack Fu Yak Hacker

2507 Posts

Posted - 2007-05-07 : 13:21:35
or if you do not want to enable online indexing, run it at night or whenever your app is expected to have least/no load or during your maintenance window.

Dinakar Nethi
SQL Server MVP
************************
Life is short. Enjoy it.
************************
http://weblogs.sqlteam.com/dinakar/
Go to Top of Page

kzimmerm
Starting Member

1 Post

Posted - 2007-05-17 : 10:32:48
This poses an interesting question. I too would like to lower the priority of a maintenance job that I run nightly. I have 3 separate .com systems that runs 24/7 and I have to wedge in my maintenance jobs during the low periods of utilization. What would be nice is to drop the priority of my job (and I know that can get very complex) so it minimizes the impact on the SQL Server box. The problem is when my maint. job fires off it kind of takes up most all resources of the box whereby slowing down the .com app.

It appears, from my readings, there isn't anything like this that exists. I could be wrong.



Kurt W. Zimmerman
Database Administrator
RHWI
Poughkeepsie, NY
Go to Top of Page

rmiao
Master Smack Fu Yak Hacker

7266 Posts

Posted - 2007-05-17 : 16:07:09
No, can't do that in sql.
Go to Top of Page

Kristen
Test

22859 Posts

Posted - 2007-05-19 : 07:04:26
We Defrag tables only if their fragmentation indicates that it is needed.

We use loops with SET ROWCOUNT to process a "reasonable" number of records each iteration.

We use WAITFOR on such loops to allow other processes to run.

We run such tasks during quiet times

That's about it!

Kristen
Go to Top of Page
   

- Advertisement -