This is on sql server 2005: I created an agent job and I want to be able to notify people by email when it completes and when it fails. I first wanted to test the notification for when it completes. I created an operator and entered the E-mail name. In the job properties, I selected this operator in the Notifications page.
The job runs an ETL process. When I run the job, after it completes,
the email is not sent. This seems straight-forward. The email address is valid, I tested the email address and it does get sent when I do it from Outlook 2007.
HI, Does any one know how I could send all the alerts, email notifications from the SQL Server to my Sprint PCS Phone. Is there any software for that. I know that it can be done by MSN mobile. Just checking whether it can be directly sent to my phone rather than going to hotmail which is then forwared to my cell phone. Let me know. Thanks, Cinday
I have several alerts set up and a job setup to notify via email if alerts occur. There are times when I might be doing maintenace on a box that may generate alerts but I don't want to get emailed or paged for these "dummy" alerts. I thought first of setting the enabled column of sysalerts to 0 - that doesn't work. I still get notified. Then I thought I'd set the enabled column in sysjobs for my notification job to 0 while I'm doing the work. But as soon as I re-enable the job I get an alert. It seems that as soon as the job is re-enabled it checks the NT application log and sees that an alert was fired and somehow knows that there was no notification sent so sends one. If I purge the NT application log before re-enabling the job is solves the problem. But that is a very in-ellegant solution and I don't want to loose all the info stored in the event log any way. Does anyone know how SQL SErver aggent keeps track of this stuff? (ie. that an alert was fired but it's response job is disabled and to check once a job is re-enabled to see if any alerts occured while it was disabled?) I did a Profiler trace while re-enabling the job but didn't see anything pertinant in there.
Platform: Win2000 SP3, SQL 7.00 - 7.00.1063I have a SQL-authenticated user with the following permissions:"Process Administrators" server role"db_owner" and "TargetServersRole" for msdb database"db_owner" for master database.The problem is that when this user opens up any job (i.e. owned by anyuser) in the SQL Server Agent, and goes to the Notifications tab, thefirst three alerts (Email, Page and Net send) are greyed out, i.e.these cannot be set.The other options are available (Write to Windows application eventlog, Automatically delete job).The only way I can achieve this is to give this user the "SystemAdministrators" server role, i.e. sa.But this of course gives absolutely full access, which I don't want.Is there a way for a user to see/change Notifications of jobs whichonly he owns?
Just set up my first Service Broker test. Wanted to send an Event Notification from one instance to another. Finally, the message arrives but profiler shows that the message is still being continously resent (and rejected as being duplicate). What am I doing wrong?
With best regards,
Artus
--
/* Local Event Source.sql */
USE master GO
CREATE DATABASE NotificationDB GO
ALTER DATABASE NotificationDB SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE; GO
CREATE ENDPOINT BrokerEndpoint STATE = STARTED AS TCP ( LISTENER_PORT = 5554 ) FOR SERVICE_BROKER ( AUTHENTICATION = WINDOWS, ENCRYPTION = DISABLED ) GO
USE NotificationDB GO
CREATE EVENT NOTIFICATION TestEN ON DATABASE FOR CREATE_TABLE TO SERVICE 'ExpressService', 'AFEDD339-AD3D-4865-AF3C-299B0A0784C6' GO
CREATE ROUTE ExpressRoute WITH SERVICE_NAME = 'ExpressService' , BROKER_INSTANCE = 'AFEDD339-AD3D-4865-AF3C-299B0A0784C6', ADDRESS = 'TCP://localhost:5555' GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Pa$$w0rd'; GO
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY; GO
USE master GO
SELECT service_broker_guid FROM sys.databases WHERE database_id = DB_ID() GO
/* Remote Service.sql */
USE master GO
CREATE DATABASE Test GO
ALTER DATABASE Test SET ENABLE_BROKER WITH ROLLBACK IMMEDIATE; GO
CREATE ENDPOINT BrokerEndpoint STATE = STARTED AS TCP ( LISTENER_PORT = 5555 ) FOR SERVICE_BROKER ( AUTHENTICATION = WINDOWS, ENCRYPTION = DISABLED ) GO
USE Test GO
CREATE QUEUE ExpressQueue WITH STATUS = ON GO
CREATE SERVICE ExpressService ON QUEUE ExpressQueue ( [http://schemas.microsoft.com/SQL/Notifications/PostEventNotification] ); GO
GRANT SEND ON SERVICE::ExpressService TO [public] GO
CREATE ROUTE ExpressServiceRoute WITH SERVICE_NAME = 'ExpressService', BROKER_INSTANCE = 'AFEDD339-AD3D-4865-AF3C-299B0A0784C6', ADDRESS = 'LOCAL' GO
CREATE MASTER KEY ENCRYPTION BY PASSWORD = 'Pa$$w0rd'; GO
ALTER MASTER KEY ADD ENCRYPTION BY SERVICE MASTER KEY; GO
SELECT service_broker_guid FROM sys.databases WHERE database_id = DB_ID() GO
I am trying to set up event notifications via email (MS Exchange). Following the instructions here... http://msdn2.microsoft.com/en-us/library/ms190724.aspx
I have an outlook profile created on my sql server for the same domain account which starts up SQLSERVERAGENT. I can send/recieve emails in this account, and running xp_sendmail in Query Analyzer works as expected.
However, when trying to set up an "operator" and testing the email ability, I get the error... Error 22022: SQLServerAgent Error: The SQLServerAgent mail session is not running; check the mail profile and/or the SQLServerAgent service startup account in the SQLServerAgent Properties dialog.
I am running Outlook 2003 using Exchange. I seem to be having the same problem as this person. http://www.experts-exchange.com/Databases/Microsoft_SQL_Server/Q_21627245.html
However, it makes reference to MSExchangeIS which I cannot find on my SQL Server. I would assume this to be a service of Exchange which would be on a seperate server entirely. If this is just some type of "connector" service that can be installed on any server, then how would I go about installing it? I presume that I need this service to get these mail notifications working, no?
This must be a very common situation since everyone needs to know when their jobs are working or not. Any help is greatly appreciated.
I am working with alerts and trying to see if there is a way that I can control the message on the notification. I have the job set to send an email and a net message when the job succeeds. Since this message will be going to the user, I owuld like to be able to make the message as clear as possible for them. Does anyone know if the message being sent can be modified or altered with an alert? And how?
In the notifications tab of the job I have e-mail operator selected. Click on the box with the elipses to enter the email addresses. It will let me enter 2 email addresses in the e-mail name field. It looks like the field has a limited length...is there a way to manually enter several addresses?
I have a sql server 2000 sp3a box with 4 named instances.
I have read all of the articles and I cannot get the 'send mail' stuff working.
I have a mailbox associated with the Domanin account that starts the sql server and sql server agent services. I installed Outlook and created a mail profile for this account. I bounced the SQL server agent on one of the Instances but when I go into the properties for the Agent, on the General Tab, the option to choose a mail profile is GREYED out. I tried 'xp_startmail' and I get this error: xp_startmail: failed with mail error 0x80040111
Assistance PleaseI have a couple of scheduled jobs that are failing to e-mailnotifications on completion (via SQL Agent Mail).I can send a Test e-mail without any problems. I can run the jobsmanually, and the e-mail notification works effectively.Left to run according to the schedule, and no e-mail notification isgenerated.Any assistance greatly appreciated.Thanks*** Sent via Developersdex http://www.developersdex.com ***
I am trying to send out notifications when jobs complete (fail or succeed). I have database mail working fine on my DEV server, but I am having issues with it on my PROD server. I am currently having people look into if McAfee may be blocking it.
I am able to send out a test email from SSMS>Management>Database Mail, but when I set a Notification for a job, the job will complete and in the history, it will say "NOTE: Failed to notify 'User' via email."
I have created an Operator and set up Profiles and Accounts, just as I did on my DEV server.
We have SQL Server 2000 Standard and recently moved from Exchange 5.5to Exchange 2003. This problem occurred both before and after thee-mail change.We would like to send notifications of failed jobs to multiple peoplein case one person happens not to be in on the day there is a problem.Setting up an operator with an e-mail name that combines twoaddresses seems to work ok as long as we use a format like thefollowing:smith_john; jones_maryorJoin Bytes!; Join Bytes!However, when we add a third name, we start getting problems. Thefirst and third accounts listed get the message but the second onedoes not -- apparently because the address gets corrupted. Forexample (based on the message received at one of the good addresses),a message sent to:Join Bytes!; Join Bytes!;Join Bytes!goes to Smith and Jackson successfully but Jones' address is corruptedto:Join Bytes!omand, of course, fails.From some other testing, it appears that the last three characters ofthe first address always get appended to the end of the secondaddress.Has anyone else run across this? If so, is there a known fix? I hadhoped Exchange 2003 would fix the problem. Most likely, we will trysetting up a personal distribution list under the account from whichthe messages are sent. I just wanted to give one more shot to findingthe problem -- both because I would like to know and because beingable to string together addresses is a little easier than having to gothrough the person who can give us access to the account to set thePDL.Thanks.Jonathan LevyChicago Department of Public Health
I have set up thresholds for time behind and I'm getting an event 32040 in the eventlog when the threshold has been exceeded. I have also set up a SQL Agent Alert with a email operator. However the alert is never generated (and no email sent). Shouldn't it be possible to alert an operator as described in http://www.microsoft.com/technet/prodtechnol/sql/2005/mirroringevents.mspx also??? The email profile is working and also setup on the SQL Agent, and the SQL Agent has been restarted (just in case that's necessary).
I have spent all day reading microsoft material and reading through this site to figure out what is wrong with my schedule job without success. I have come to the point where I can't take it no more. Would someone pleaseee help out a sister?
This is the situation: I created a very simple package on my server A. This package pull data from server B and load into server C:
B====> C
I deployed and copy and install the package successfully to the target server c. When
Now, I can run the package from either MSDB and file system storage.
My problem is when I schedule this package. It failed with the log below.
All my server are on the same domain and I have a domain account. When I schedule and run the job with my domain account, I get the following error: I have administrative rights in all the servers.
Job Name DW_DataImport Step Name (Job outcome) Duration 00:00:00 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0
Message The job failed. Unable to determine if the owner (Weblogeomon) of job Dw_DataImport has server access (reason: Could not obtain information about Windows NT group/user 'Weblogeomon', error code 0x5. [SQLSTATE 42000] (Error 15404) The statement has been terminated. [SQLSTATE 01000] (Error 3621)).
When I change it to sa, I get the following:
Date 3/16/2006 2:25:05 PM Log Job History (Dw_DataImport)
Step ID 0 Server DW_Server3 Job Name Dw_DataImport Step Name (Job outcome) Duration 00:01:55 Sql Severity 0 Sql Message ID 0 Operator Emailed Operator Net sent Operator Paged Retries Attempted 0
Message The job failed. The Job was invoked by User sa. The last step to run was step 1 (Dw_DataImport).
Worst yet, I created
CREATE CREDENTIAL [SSISCredential] WITH IDENTITY = 'Weblogeomon',
Greetings We're having trouble getting the Agent started. The service is set to login as NT AUTHORITY/System. In an effort to attempt to diagnose the problem we changed the service (using Service Control Manager) to login as a user with Administrator rights on the server and we got the same error, except for that user.
[298] SQLServer Error: 18456 Login failed for user NT AUTHORITYSYSTEM [SQL STATE 28000] [298] SQL Server Error: 4060 Cannot open database "EP_SessionState" requested by the login. The login failed [SQL STATE 42000]
I'm sure this is a common problem with an easy solution however I can not find out much about EP_SessionState through Google and was hoping someone could help.
I have a series of jobs in the SQL server Agent that will begin and appear to run fine, but will never finish. Is there a way to limit the time that a job will run in the agent, for instance stop with failure if not completed within 1 hour?
Hi All, I am not able to see any of the jobs in the enterprise manager that are scheduled on one of our production servers. Have any body seen this type of behaviour of SQL server.. The jobs are there in the SQL as I can query sysjobs table to see there entry.. The jobs are being executed properly when they are supposed to.. Thanks Ajay
Hi Guys, Can you please advice me on if there is a limitation on SQL agent Jobs. If then how many jobs can SQL server accomedate. If there is a limit, then is there are any ways to increase it? I appreciate your quick response. Thanks
I have several users that are a member of a Windows Nt group. I want to be able to allow this group to create, update, and delete SQL Agent Jobs. But I do not want them to be members of the SYSADMIN role. Everything that I have found states that they must be members of this server role to perform these actions. Does anyone have an idea on how to accomplish this? or point me in some kind of direction to explore.
Hello all, we just moved our databases over from a SQL 2000 server onto a new SQL 2005 server. We had no problem migrating them over, but was wondering if there was a way to migrate the jobs over as well. We have about 20 of them and would prefer not to hav to create them all again on the new server.
This seems to happen just after our backups run. the result is that the SQL Server Enterprise Manager can be brought up the next day but nothing can be accessed or inquired of. The service is still running, the server is still up and rebooting the server resolves the problem.
98/08/06 20:32:31.68 kernel dpdb_asyncread: mirror: Operating system error 6 (The handle is invalid.) encountered
Is anybody else using Arcserve Backup Agent for SQL Server for Windows NT, RAID 5? Have you seen this? I`ve been to MS home page and on technet. No mention of this problem. Next stop is Arcserve home page, if they have one. I have read the error logs and this is the second time this has happened this week. Both times since we added Arcserve to manage our MS SQL Server Database backups.
I have been trying to set up transactional replication between an OLTP SQL Server 2005 Standard edition server and a BI SQL Server 2005 Enterprise edition server. I am using a pull subscription. I was able to establish the replication from the developement server to the BI server however when I tried setting up the replication between the production environment and the BI server, using the same configuration settings, I ran into a problem. The production server had been renamed after it was initially set up. I used the sp_dropserver and sp_addserver to solve this issue and was able to run the replication wizard. However once the wizard finishes the snapshot agent doesn't initialize the publication. When I look at the replication monitor it has a status of "never run". I try to run it manually and it appears to run for a few seconds then stops and still has the status of "never run". I don't get any error messages and can't find anything in the log. I am wondering if this is related to the server rename? I am hoping to find a soultion that doesn't involve uninstalling SQL Server and reinstalling since this is a production environment.
I'm trying to deploy a SSIS package and am having issues getting it to execute from a SQL Agent job. I've read this article http://support.microsoft.com/?kbid=918760 over and over and although it's helpful I must still be missing something.
The SSIS package uses a configuration file for connection string information and the ProtectionLevel is set to DontSaveSensitive. I'm using a proxy account with the appropriate permissions. I can execute the package from SQL Management Studio and from dtexec.exe just fine. I even copied the command line out of the job and used that to execute it with dtexec.exe and it worked.
I'm not sure what to try next. It's like it's not even getting to the SSIS package. I have logging turned on in the package and I"m not getting back any errors from it. Any ideas? One thing that I think is strange is that the job is running on an instance of SQL but Integration Services doesn't seem to support instances. Could that be the issue?
I don't know what else to try at this point...any advice is greatly appreciated!
Hi Group, Is it possible to schedule and execute sql jobs from an asp page. I am developing an application that requires an administration section. In this section the admin would like to change / update the schedule of the sql job and also run the jobs ad hoc. Basicall y they would like the functionality of sql agen in enterprise manager to be available from their web application.
Has anbody done this before ? All information / solutions shall be psoted back to the group as I reckon this would be pretty useful functionality.
The SQL Server Agent process is running. When I use EM to start a database integrity check job, it fails with an error message of 22029 and the following:
[LOG] SQLServerAgent security context does not have server-autorestart privileges
I can not find error 22029 in Books on Line. I will go to Microsoft Knowledge base and research this problem.
In the mean time if someone can help, it is much appreciated.
I am trying to write a T-SQL script to change about 200 SQL Agent jobs to send notification to a different email notification list. I could do this manually but it would take me a lot more time. Is there a way to script this out in T-SQL? Thanks!
Hello, I need to document all SQL Server Agent Jobs with full description of dependencies - database, table, stored procedure, etc. Is there are a tool that I can download for that particular use???
I have a job with a single ActiveX step that I have setup and am having problems running.
If i set the SQL Server Agent to run as an Administrator then my job processes fine however under the default setup which has the SQL Server Agent running as Local System I get an error.
I assume this is permissions problem so I created a basic windows user called ABC. I then created a credential called ABC linked to the windows user ABC. I then created a proxy that uses the credential ABC and then ticked the box that allows the proxy to run ActiveX scripts. I then set the ABC as a principle of the proxy.
I then set my single job step to be run under the ABC credential.
Still no luck. This is the first time i've worked with this sort of thing so I'm not sure if I'm going about it in the right way.
Please explain how i can have a job that runs as an active X script. I understand running sql server agent as administrator is bad for security so what are the alternatives?