Setting Database Priority
May 9, 2006
Hi all.
Does anyone know how to set a database priority? I have a SQL Server that contains multipule databases. One of the databases is very high priority. I need to make sure that no matter what is running on the server that this database's processes take priority and nothing slows it down.
Thanks.
View 2 Replies
ADVERTISEMENT
May 27, 2005
Hello. I'm still a newbie in using MSSQL 2000. Got a code here in this site for sending formatted email usp_send_cdosysmail? How do i set the priority of the email?
View 1 Replies
View Related
Oct 29, 2007
Hi all,
I have a stored proc. which is going to run 3 days long. So , i was looking for some setting (or) priority , which i can set in the stored proc.
so that, if someone else is using the server, they should get high CPU Priority, and my process ( Stored Proc) should remain in suspended state, until CPU & Disk activity is low.
Note : The only way others are getting affected is because of hardware resources, because nobody is using those tables which is being used by STORED PROCEDURE.
Can anybody tell plz, how to achieve this.
Thanks.
View 10 Replies
View Related
Sep 8, 2004
Hi,
Im using a stored procedure to send an email using CDOSYS. Im using the code i got here
http://support.microsoft.com/defaul...;312839&sd=tech
I can successfully send an email, but would like to know how i can add additional fields like setting the importance or priority of the how email. How would i change this stored procedure to do this.
here is the code...
CREATE PROCEDURE [dbo].[sp_send_cdosysmail]
@From varchar(100) ,
@To varchar(100) ,
@Subject varchar(100)=" ",
@Body varchar(4000) =" "
/************************************************** *******************
This stored procedure takes the parameters and sends an e-mail.
All the mail configurations are hard-coded in the stored procedure.
Comments are added to the stored procedure where necessary.
References to the CDOSYS objects are at the following MSDN Web site:
http://msdn.microsoft.com/library/d...s_messaging.asp
************************************************** *********************/
AS
Declare @iMsg int
Declare @hr int
Declare @source varchar(255)
Declare @description varchar(500)
Declare @output varchar(1000)
--************* Create the CDO.Message Object ************************
EXEC @hr = sp_OACreate 'CDO.Message', @iMsg OUT
--***************Configuring the Message Object ******************
-- This is to configure a remote SMTP server.
-- http://msdn.microsoft.com/library/d...n_sendusing.asp
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value','2'
-- This is to configure the Server Name or IP address.
-- Replace MailServerName by the name or IP of your SMTP Server.
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value', 'MailServerName'
-- Save the configurations to the message object.
EXEC @hr = sp_OAMethod @iMsg, 'Configuration.Fields.Update', null
-- Set the e-mail parameters.
EXEC @hr = sp_OASetProperty @iMsg, 'To', @To
EXEC @hr = sp_OASetProperty @iMsg, 'From', @From
EXEC @hr = sp_OASetProperty @iMsg, 'Subject', @Subject
-- If you are using HTML e-mail, use 'HTMLBody' instead of 'TextBody'.
EXEC @hr = sp_OASetProperty @iMsg, 'TextBody', @Body
EXEC @hr = sp_OAMethod @iMsg, 'Send', NULL
-- Sample error handling.
IF @hr <>0
select @hr
BEGIN
EXEC @hr = sp_OAGetErrorInfo NULL, @source OUT, @description OUT
IF @hr = 0
BEGIN
SELECT @output = ' Source: ' + @source
PRINT @output
SELECT @output = ' Description: ' + @description
PRINT @output
END
ELSE
BEGIN
PRINT ' sp_OAGetErrorInfo failed.'
RETURN
END
END
-- Do some error handling after each step if you have to.
-- Clean up the objects created.
EXEC @hr = sp_OADestroy @iMsg
go
View 3 Replies
View Related
Sep 8, 2004
Hi,
Im using a stored procedure to send an email using CDOSYS. Im using the code i got here
http://support.microsoft.com/default.aspx?scid=kb;en-us;312839&sd=tech
I can successfully send an email, but would like to know how i can add additional fields like setting the importance or priority of the how email. How would i change this stored procedure to do this.
here is the code...
CREATE PROCEDURE [dbo].[sp_send_cdosysmail]
@From varchar(100) ,
@To varchar(100) ,
@Subject varchar(100)=" ",
@Body varchar(4000) =" "
/************************************************** *******************
This stored procedure takes the parameters and sends an e-mail.
All the mail configurations are hard-coded in the stored procedure.
Comments are added to the stored procedure where necessary.
References to the CDOSYS objects are at the following MSDN Web site:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_messaging.asp
************************************************** *********************/
AS
Declare @iMsg int
Declare @hr int
Declare @source varchar(255)
Declare @description varchar(500)
Declare @output varchar(1000)
--************* Create the CDO.Message Object ************************
EXEC @hr = sp_OACreate 'CDO.Message', @iMsg OUT
--***************Configuring the Message Object ******************
-- This is to configure a remote SMTP server.
-- http://msdn.microsoft.com/library/default.asp?url=/library/en-us/cdosys/html/_cdosys_schema_configuration_sendusing.asp
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/sendusing").Value','2'
-- This is to configure the Server Name or IP address.
-- Replace MailServerName by the name or IP of your SMTP Server.
EXEC @hr = sp_OASetProperty @iMsg, 'Configuration.fields("http://schemas.microsoft.com/cdo/configuration/smtpserver").Value', 'MailServerName'
-- Save the configurations to the message object.
EXEC @hr = sp_OAMethod @iMsg, 'Configuration.Fields.Update', null
-- Set the e-mail parameters.
EXEC @hr = sp_OASetProperty @iMsg, 'To', @To
EXEC @hr = sp_OASetProperty @iMsg, 'From', @From
EXEC @hr = sp_OASetProperty @iMsg, 'Subject', @Subject
-- If you are using HTML e-mail, use 'HTMLBody' instead of 'TextBody'.
EXEC @hr = sp_OASetProperty @iMsg, 'TextBody', @Body
EXEC @hr = sp_OAMethod @iMsg, 'Send', NULL
-- Sample error handling.
IF @hr <>0
select @hr
BEGIN
EXEC @hr = sp_OAGetErrorInfo NULL, @source OUT, @description OUT
IF @hr = 0
BEGIN
SELECT @output = ' Source: ' + @source
PRINT @output
SELECT @output = ' Description: ' + @description
PRINT @output
END
ELSE
BEGIN
PRINT ' sp_OAGetErrorInfo failed.'
RETURN
END
END
-- Do some error handling after each step if you have to.
-- Clean up the objects created.
EXEC @hr = sp_OADestroy @iMsg
go
View 2 Replies
View Related
Apr 17, 2001
whenenver i run cold fusion, it automatically gets my tables out of the master database instead of the new one i have created. i've added a user that has a default to the new database instead of the master, but i need to know how to use that new user correctly, and what i will need to do once i start adding more databases so that cold fusion will go to the appropriate database and not to the master.
View 3 Replies
View Related
Nov 27, 2006
Hi,
consider my table,
s.no priority status
1 2 pending
2 3 pending
3 0 completed
4 1 pending
5 0 completed
Now, if I insert a record as,
6 1 pending
the priority must be reset as follows,
s.no priority status
1 3 pending
2 4 pending
3 0 completed
4 2 pending
5 0 completed
6 1 pending
Im using c# and sql server. How can i do it?
Thanks,
Jasmeeta.
View 2 Replies
View Related
Jan 19, 2001
Hi guys.
Is there anyway to increase the priority of a Service in NT services in processing like we have in SQL Server.
-MAK
View 1 Replies
View Related
Mar 8, 2004
Hi,
Is it possible to change/set the priority of databases? (Win2K, SQL 2K)
We have an evnironment which is somewhat lacking in resource, and would like to place the priority of one of the databases lower than the other so that the processing on the main database is carried out before the secondary one.
If there isn't any way to do this for the database level - is it possible for a specific user?
Hopefully I havnt been too vague here - but if there is any more info I should be passing on let me know.
Thanks in advance.
Cheers
View 4 Replies
View Related
Jul 19, 2006
Hi,
In my Sequence container task, I have 3 data flow task ( one data flow task is based on the constraint option Expression). 3 are running simultaneously, is there a way to assign a priorty which one should finish first before the other starts.
If I make all of them in one sequence then the conditional task come in between which may stop the execution of the 3rd task depending upon condition.
Please Guide.
View 4 Replies
View Related
Feb 11, 2008
Hi
We are in the process of moving some data from one structure to another. The complete script takes very long time to complete in out production environment.
The script can maybe filtered even more, so it can run in small steps. The only problem here is that we would like it to be transactional.
But i came to wonder - are there any way to tell before starting a t-sql statement that it should run with low priority? This way it could run for 2 days, without having any severe impact on the production environment?
Best regards
/Anders
View 5 Replies
View Related
Apr 7, 2007
I have been using MySQL as the back end of my .Net 2.0 applications for a while using a custom membership provider without any problems.Having now switched to a new webhost which supports both MySQL and MS SQL Server 2005 and also creating a new site thought I should set up the new site to use MS SQL..... I am having trouble however setting up the SQL server to act as the membership provider. Following the advice on here I tried using aspnet_regsql.exe... Firstly, when trying to get the list of databasses on the remote server I get the following error: Failed to query a list of database names from the SQL Server. Invalid object name 'Sysdatabases' If I then just type in the name of my database and go through to the end I get the following error:Exception:An error occurred during the execution of the SQL file 'InstallCommon.sql'. The SQL error number is 8152 and the SqlException message is: String or binary data would be truncated. I can connect to my MS SQL server remotely without any problem using the likes of MS SQL Server Management Studio Express. Is there any other way I can setup the databases needed for user and roles access control or is the usage of MS SQL much more complicated than what MySQL was?
View 4 Replies
View Related
Dec 9, 2004
. The BPA recommend that the model database setting for the items below be set to on. I can accomplish this task through the query analyzer and run the set command. (Set ANSI_NULLS on). The response is positive but when I re-run the report the setting are back off.
Why???
•QUOTED_IDENTIFIER
•ANSI_NULLS
•ANSI_WARNINGS
•ANSI_PADDING
•ANSI_NULL_DFLT_ON
•CONCAT_NULL_YIELDS_NULL
View 5 Replies
View Related
Feb 20, 2006
Hi people,
I'm in the process of trying to set up my first SQL Server database and things aren't going as per the book! (surprise, surprise).
The 'Identity Specification' option during Table creation, is 'greyed out' and won't let me set (Is Identity) to 'Yes' or anything else for that matter.
I guess that there's a simple answer to this one, but as a newbie to SQL Server ( and VB 2005) I'm curently at a loss.
Can anyone point me in the right direction?
Niknek
View 1 Replies
View Related
Jul 31, 2000
Is it possible in SQL Server to set the priority at which a query will run
for certain users. I have some users who's queries I never want to
take over the database. These queries may take 10's of mintes to complete,
and will slow down the server and affect the performance of more important queries. Is there a way to keep this from happeneing?
Thanks
View 3 Replies
View Related
Jun 10, 2004
Hi,
I have a table which contains a Create datetimefield which has a default on the current date , a priorityfield and another datetimefield which will be the due date and has to be calculated by the first date and the priority field,
How can i do this and what fields must i have.
Does someone does this?
can someone help me with this?
Kind regards Wim
View 6 Replies
View Related
Mar 2, 2008
Hi, when there are lot of processes executing the select statement on a table, and I KILL all these processes (KILL spid) and drop the table, is the KILL statement have the first priority to execute and drop table can be done in short time? I am afraid that the select statement will take long time to be roll back if the table is huge...please advise.
View 11 Replies
View Related
Dec 14, 2006
I've searched enough to know that this ability probably doesn't existin our current setup, thus the reason I'm coming to the community now.When doing a database backup in Enterprise Manager (SQL Server 2000sp4), is there a priority level setting so that I can put less load onthe CPU? Our small office uses one server for everything and when I doa 12:00 pm full backup of our live DB, the server slows to a crawl forabout 4 or 5 minutes. I'd like to see the backup take longer but putless load on the server so we can to use it. If this setting doesn'texist, I may need to explore another backup method...but that's anothertopic for another day.Thanks,Gabe
View 9 Replies
View Related
Jun 19, 2007
I have a report with a category that filters for "top N" categories, but it is preventing the entire data set from being evaluated so that the series subtotals are incorrect. Is there a way to change the precedence, so that the subtotals are computed across the entire data set, and the "top N" is evaluated afterwards?
View 4 Replies
View Related
Apr 4, 2008
I'm having trouble changing data in my database. It is actually a VB cuestion, but you see, i just finished lesson 9 of the begginers Visual Basic 2005 video series and in my last run i can't save the data i've changed into the database. no errors are shown, it just does't change the values.
i know for a fact that the code is well written and there is no problem with the configuration of buttons and such, because i folowed the steps 50 times so I believe it must be a SQL configuration problem.
does anybony have any insight on what the problem might be.
THX malcolm
View 2 Replies
View Related
Jan 29, 2004
we have a database that only serves Select requests (no OLTP) for our very high traffic websites.
what are the benefits of turning on read-only setting for the database if there are no transactions occuring in the database?
does sql server put locks on tables for SELECT statements?
is it the same as using HINT (NOLOCK) ?
thanks
stephane
View 1 Replies
View Related
Feb 23, 1999
Hi,
There has been a lot of discussion about moving single databases or devices in same server. Can someone suggest the most simplest method to set up a identical server with all the logins, permissions and password etc?
Building a new server with sp_help_revdatabase and dumps/loads is relatively easy but moving the master is confusing to me. I should run the new server and databases for a little testing period (with diffrent server name, of course) and then go live by dropping the old and by adding the new. I remember someone said that this would be as easy as copying master.dat to new machine (when servers are identical), any experience or other suggestions?
TIA,
Al
View 2 Replies
View Related
Mar 18, 2015
Is there any practical downside to setting ANSI_NULLS and QUOTED_IDENTIFIER to ON at the database level? Almost all devs will simply leave these default settings at the top of a stored proc script anyway.
View 2 Replies
View Related
Feb 14, 2007
I want to query my databases to find out if Auto Shrink is set. I know the status column in sysdatabases holds this value as a bit setting but I don't know how can I check this value using a query.
Canada DBA
View 1 Replies
View Related
Nov 28, 2007
Hello everyone, I am fairly new to SQL Server Express and I have a question I was hoping someone could help with. I know this will sound very wacky but please entertain the possibility of such scenario taking place...
Is it possible to connect to an instance of an SQL Server Express 2005, using asp, without having a database created and without configuring anything such as permits or users first ?
The SQL Server Express was installed on a PC that runs a web server as well but nothing else was done, I only have the instance name and I know the SQL Server is configured for local access only.
I was hoping to create a database and begin using it with an asp file that runs SQL commands I can input on a text window, but I can't find connection strings that work without specifying a database name, and also I don't know which user and password to use because it is set to windows authentication.
I thought the code would go something like this:
Set cn = Server.CreateObject("ADODB.Connection")
cn.Open "Driver={SQL Server};Server=SQLinstance;Address=localhost,port;Database=;Uid=;Pwd="
To top things out the web server is configured to send out a generic error message, so I can't see what the error I'm getting actually is...
Any thoughts ?
Thanks.
View 2 Replies
View Related
Jul 23, 2005
Hi,When I create a new database from Enterprise Manager (right click ondatabases > New Database) I noticed that I am not prompted to create apassword or user name. Can I take it then that all databases under thesame local group will have the same password and user name?I have tied to access the newly created database using the samepassword and username but haven't had any luck.Thanks
View 3 Replies
View Related
Oct 26, 2007
I have created a snapshot
CREATE DATABASE AdventureWorks_Snapshot1200 ON
(NAME = N'AdventureWorks_Data', FILENAME=
N'C:Program FilesMicrosoft SQL ServerMSSQL.1MSSQLDataAW_1200.ss')
AS SNAPSHOT Of AdventureWorks
I changed the records
AddressLine1
from 1970 Napa Ct. to 1970 Napa Ct. Apt 1
When i run
select * from Person.Address
AventureWorks_Snapshot1200 where addressid = '1'
select * from Person.Address
AventureWorks where addressid = '1'
Both appear as 1
When i change Apt to 2 and run it both appear 2
Changed again to 3 both appeared as 3 too.
I was under the impression that the snapshot would remain as 1 when the new update 2 has been performed.
Any light be appreciated.
View 4 Replies
View Related
Mar 31, 2008
Hi all :-)
I am new to Sql server and hope that someone in here might be able to help me out with a little advice on how to go about how to achive the following.
My boss wants me to set up a copy of one of our production databases, the copy is supposed to be used for running questions against thru businessobjects. There will be aprox 10 simultanious users, the original and the copy must never be further apart in time then 15 min. The database is today about 25 gigs and to make it even more complicated the copy must be available at all time during business hours (8-17). The solution is also supposed not to influence the production databases perfommance to much (really low impact to the performance is a key issue).
The options I have thought of is:
1. Use mirroring and then take a snapshot of the mirror for the users to connect to.
2. Replicate only the data that is needed.
3. Log shipping in a combination with the online restore option in sql 2005 server.
4. Log shipping and then take a snapshot of the copy for the users to connect to.
I have also thought about if the need for current data is that high it might even be better to let them run their questions directly against the production db instead since there will not be so many simultanious users.
Any of you guys that have any ideas, all tips will be very appreciated!
Thanks in advance :-)
/Wandy
View 8 Replies
View Related
Jul 13, 2006
Hello,
I have a long stored procedure that performs some inserts and updates on the table that users are accessing through a user interface. We this stored procedure runs users experience slowness, is there any way I can get the stored procedure runs with a lowest priority so that user will be able to perform their tasks first.
View 2 Replies
View Related
Aug 24, 2007
I have a table.
Highlight-------------
Id
Name
Detail
StartDate
EndDate
Priority
I want to make a query which returns 1 Highlight in the current date.
But remember I have already set the Hightlight Priority 1 to 5. And I want that Hight Priority rows select more times than Low Priority Rows.
View 23 Replies
View Related
Aug 1, 2015
DECLARE @Table TABLE
(minv_code INT,
alert_msg varchar(10),
alert_time Datetime)
INSERT INTO @Table VALUES
(873939, 'Reverse', '7/24/2015 3:31:18'),
(873939, 'Tamper', '7/24/2015 3:30:00'),
(873939, 'Meter', '7/24/2015 3:31:22'),
(873940, 'Reverse', '7/24/2015 3:30:00'),
(873940, 'Tamper', '7/24/2015 3:31:22')
I want to select the data priority wise . The o/p should look like
first row - 873939, 'Meter', '7/24/2015 3:31:22'
second row - 873939, 'Tamper', '7/24/2015 3:30:00'
third row - 873939, 'Reverse', '7/24/2015 3:31:18'
fourth row -873940, 'Tamper', '7/24/2015 3:31:22'
fifth row - 873940, 'Reverse', '7/24/2015 3:30:00'
View 1 Replies
View Related
Jul 23, 2005
Is there a way to give a particular query greater system resources,such as share of the processor?I have two queries that were started from Query Analyzer. One is verylong, the other rather short. However the long one is taking almostall the processor resources and not allowing the short one to complete.I'd like to allocate more of the processor to the short one until itis done.I am the admin on this system and have access to Enterprise Mgr.Thanks.
View 1 Replies
View Related
Dec 3, 2007
Not sure if this is the forum to post this question to - if there's a more appropriate forum please let me know.
I have a SQL Server 2005 box which gets accessed in two ways - an application with it's own login and sprocs which get accessed through reporting services with its own login. What I've found is that the application will get timeouts on its queries when people are running reports which use time intensive sprocs (> 1 minute to run).
Is there a way to give a particular login a higher priority so that it won't timeout when other logins access these sprocs?
Thanks!
Craig
View 1 Replies
View Related