Clustering And SQLAgent Mail
Apr 9, 2001
I'm going to be setting up SQLAgent to automatically send notifications on failure. My question is are there any "gotcha's" I might need to no about when doing this in a clustered environment? If the server were to failover, does the agent peform as it should?
Thanks in advance!
View 2 Replies
ADVERTISEMENT
Aug 28, 2000
2000-08-28 15:03:15.06 ods Starting SQL Mail session...
2000-08-28 15:03:15.18 ods Error: 17903, Severity: 18, State: 1
2000-08-28 15:03:15.18 ods MAPI login failure..
2000-08-28 15:03:15.18 ods Error: 17951, Severity: 18, State: 1
2000-08-28 15:03:15.18 ods Failed to start SQL Mail session
You know where to find the MAPI settings in NT?
View 1 Replies
View Related
Nov 13, 2007
We have 2 env. : Testing and Production, both are running Windows 2003 Enterprise Server with SQL Server 2005. The difference is Testing is NOT running Windows cluster but Production do so, what is the best way to transfer a database from testing to production?
We have another systems that both testing and production are running on NON-cluster and we use backup/restore to transfer the database, can it apply in this case.
And I found that there are a tools called DTC, which can transfer all DB objects from one DB to another, is it a best way to transfer between non-cluster and cluster env.?
View 2 Replies
View Related
Feb 11, 2001
Hi:
I hope somebody can give me a clue for this problem. Our SQL Server was installed with default option. The SQL Server account is .SQL-Cmdexec. I tried to create two backup jobs to save daily backup files into another server. The SQL Server could not detect that server drive during the database backup set up. I knew that was because the SQL Agent account could not access to that server. I had the following questions:
1. How to grant write right to current SQL Agent account to another backup server?
2. It looks like .SQL-cmdexec is created by SQL Server default installation. If I try to change this account to another account, the Enterprise Manager is the only place to be changed or there is another place keeps SQL Agent account info.
3. If I try to give SQL Agent account access to the other servers, what is the relationship between NT User manager and SQL Agent accounts.
Thanks.
Joan
View 2 Replies
View Related
Dec 19, 2005
Hello,I have the following error message in the sqlagent.out file, loopingeach minute.2005-12-19 10:58:54 - ! [298] SQLServer Error: 14262, The specified@job_id ('254D5C3B-CB1F-4B02-AD79-FF5AFE343E3B') does not exist.[SQLSTATE 42000] (ConnExecuteCachableOp)I restarted the sqlagent and ms-sqlserver service, but did not fix theproblem.ThanksDiane Lavoie
View 5 Replies
View Related
Jul 20, 2005
I have two questions:(1)After I stopped SQLAgent, I couldn't start it up, even restart theserver.Why?(2) I may need to reinstall the server, if I do, do I need touninstall? or just override the current one?Thanks!Saiyou
View 1 Replies
View Related
Aug 17, 2000
SQL Server name: BOProd
Domain: BODomain
I have an NT User 'SQLAgent' with domain Admin previleges.
SQL server has 'SQLAgent' user with NT authentication and system admin previledges.
I am in process of setting up mail services for sqlmail and sql agent mail.
As a part of this process, when I log on to the server computer as SQLAgent, it doesn't let me access Enterprise manager saying
'Login could not be established to BOProd-Login failed for user 'BODomainSQLAgent'. It does allow me to connect to query analyser by providing 'user name/password'.
Any idea why connection to enterprise manager fails?
View 1 Replies
View Related
Feb 12, 2002
The SQLAgent service was modified to login as a domain account. SQLAgent would not start. I made sure that the account was in the Admin group on the server, I setup the account as a System Administrator in SQL. I made sure that the network protocols in Client Network Utiliity and Server Network Utility where the same as other servers using the domain account. The message I'm getting is...
SQLServerAgent could not be started (reason: Unable to connect to server; SQLServerAgent cannot start).
I modified the properties for SQLAgent back to login as local account and I still get the same problem.
Any suggestions would be appreciated.
Sidney Ives
Database Administrator
Sentara Healthcare.
View 1 Replies
View Related
Jul 20, 2005
Hi all, I have some trouble with SQLAgent...when I try to schedule a jobthat invokes a script (vbs, java, cmdshell,...), SQLAgent crashes at themoment of scheduled execution. If I try to execute it manually, all worksfine. This installation runs on a cluster Win2003 and the node initiate afailover if I don't delete the job and then restart Agent (I can't start theservice before deleting that job!!!). Event viewer logs something like:"LOG] Exception 5 caught at line 191 of file ..src
efreshr.c.SQLServerAgent initiating self-termination".I've already tried to debug the service but my dump did not help me.Any suggestion?Thankscamau
View 2 Replies
View Related
Nov 12, 2007
Hi,
Can someone explain me this error I encountered, is this an application error or script error? How can i resolve
this one?
"The description for Event ID ( 208 ) in Source ( SQLAgent$TSESMSDBS ) cannot be found. The local computer may not have the necessary registry information or message DLL files to display messages from a remote computer. You may be able to use the /AUXSOURCE= flag to retrieve this description; see Help and Support for details. The following information is part of the event: [0230] GET MA_SMSCODE, 0x523D92CBAACD304E88CF720580B18357, Failed, 2007-11-10 02:30:00, The job failed. The Job was invoked by Schedule 2 (MA_SMSCODE - Every 2.30AM). The last step to run was step 5 (NSCSI - MODEL SMS SHORT CODE).."
Hope to hear from anyone as soon as possible.
Thanks.
Russell
View 1 Replies
View Related
May 9, 2008
All,
I have a SQLAgent job created using isqlw to run the query and output the results to a file on the C drive. However, the job never completes, which is strange since the database is fairly new and when I run the query manually in a isqlw window, it completes and outputs the file in seconds.
Any ideas where I'm failing here?
Thanks in advance,
JB
View 4 Replies
View Related
Feb 9, 2006
Hi
Keep getting this message in the Application Event Viewer.
Source: SQLAgent$SHAREPOINT
Category: Alert Engine
Event ID: 324
Description: SQLAgent is not allowed to run.
Can't find any help online. Anyone out there got any ideas?
TIA
View 5 Replies
View Related
Jan 11, 2007
SQLAGENT CAN't START
this log:
SQLServerAgent could not be started (reason: SQLServerAgent must be able to connect to SQLServer as SysAdmin, but '(Unknown)' is not a member of the SysAdmin role).
View 27 Replies
View Related
Jun 5, 2001
If you are transferring to a new server is there a good way to transfer SQLAgent jobs in bulk. Scripting out and in is one way, is there a better way
Jim
View 1 Replies
View Related
Oct 11, 2000
how can i start automatically sqlagent if it doesn't on W98 ?
thanks for answer
View 2 Replies
View Related
Apr 1, 1999
On my account we have very separate authority between the NT system administrators and the SQL DBAs. Routinely in SQL 6.5 we would remove sa authority from the NT administrators group and add this authority to a NT database administrators group which we were members of using SQL Security manager.
We have tried to apply this same method to our implementation of SQL 7.0. We removed the sysadmin role from the BUILTINAdministrators group and added sysadmin to the DatabaseAdmin NT group which the DBAs and SQLAGENT account are members of. This appeared to work fine until we tried to run our database maintenance plans in SQLAGENT. When sysadmin role is revoked from BUILTINAdministrators the jobs in SQLAGENT using xp_sqlmaint fail with "select permission denied to sysdbmaintplans in database 'msdb' owner 'dbo'"
The SQLAGENT login is part of an NT group that has been granted sysadmin role in SQL Server. This should grant full access to SQLAGENT. What's up? Is the xp_sqlmaint using hardcoded security of some kind? I am confused. Any suggestions? We really need to revoke sysadmin from the BUILTINAdministrators group.
View 2 Replies
View Related
May 18, 2007
I have several target servers defined, i have a job that needs to run in a serial fashion (ie.. 1 target at at time) if every target kicks off the job at the same time it's going to bog down the disk drives... can this be serialized? or do i need to write a special routine...
View 3 Replies
View Related
Nov 6, 2007
Hello,
How can i change the location of the Sql Agent errorlog file, sqlagent.out
When i choose Properties from the Sql Agent page, i can see the location and filename, but i am not able to change it.
Is there some starup parm? And how can i apply it?
Any help is appreciated.
Best regards,
hvdtol
View 6 Replies
View Related
Jan 30, 2008
Hi all,
Configuration : MSSQL2005 SP2 on Windows 2003 server
I have a strange issue when scheduling SSIS Job.
When I schedule it, I set the owner as the domain administrator. The scheduled job can be run manually without any problem. The scheduled job run automatically at scheduled time wihtout problem.
But , for an unknow reason, after some cycle, the job failed with the following error :
The job failed. The owner () of <name of the job> does not have server access
As you can see, the owner name is blank.
If I look to the job settings : the owner is still the domain administrator.
If I try to run it manually, the job fails with the same error.
now if I just rename the job name from <name of the job> to <name of the job2> then all problems are solved.
If we let the job failing everyday, sometimes, it starts again to work properly.
We have this issue on 2 jobs.
If anyone has faced this issue : thank you for advise.
View 3 Replies
View Related
Nov 15, 2007
After you've created an SSIS package or multi-package solution, the next step is usually to deploy it to a production environment and schedule it to run at regular intervals. We took this approach at our company and scheduled the master package as a step in a SqlAgent Job. I import the dtsx packages into the server by connecting to the Integration Services connection and importing them into Stored Packages > MSDB. Next, I create a SqlAgent job via the Database Engine connection under SQL Server Agent > Jobs. I then add a step and select "SQL Server Integration Services Package" under the step Type menu. This brings up a powerful dialog that lets you set your production runtime environment parameters for the connection strings, SSIS package variables, config file path, and logging parameters.
As part of my deployment process, I wanted to run the job one time at the end of the build and check the status before deeming the build a complete success. The script is long running (several minutes) so I had to deal with the issue of polling. I had been recently using the WHILE loop in T-SQL and I also found the Waitfor Delay command. I discovered how to get to the job activity via the sp_help_jobactivity extended stored proc. The source for this proc indicates that you can get to the most recent execution of the job, including the currently running job. If the job is running, the run_status column of the resultset is null. Once the job completes, this flag is 0 for failure and 1 for success. I wanted to query the underlying tables directly so I extracted the bare minimum queries to get at the fields that I needed. I provided timeout variables so you can set your desired polling interval and timeout.
I am not sure whether this while/waitfor loop approach is very CPU-intensive or can cause locking problems. I'm hoping it does not. But it's a convenient way to use T-SQL to test for a SqlAgent job status if your build tool supports running a query against a database, which most of them do. You can always use WMI or a .Net app to achieve the same result. If someone has done this already, perhaps you can post your code sample or a link to it as a reply to this thread.
I'm assuming that other DBAs and developers responsible for production deployment and monitoring will find this script useful. I also wouldn't mind if I scored a couple MVP points . One confusion I had to deal with was that sp_help_jobactivity returns a return code of 0 or 1 with the opposite meaning as the run_status column that is in the result set. It took me a little while to figure this out since possible values for run_status were not well-documented.
Enjoy!
Norm Katz
www.ipconsulting.com
/************************************************************************************************
**
** Script Name: CheckJobStatus.sql
** Description: Checks the status of the last instance of a SqlAgentJob
** Author: Norm Katz
** Date: 11-15-2007
************************************************************************************************/
USE MSDB
GO
DECLARE @job_id UNIQUEIDENTIFIER
DECLARE @job_name sysname
DECLARE @jobStatus int
DECLARE @message varchar(1000)
DECLARE @jobid int
DECLARE @jobEndTime varchar(32)
DECLARE @runtime int
DECLARE @timeout int
DECLARE @delay datetime
DECLARE @delayIncr int
DECLARE @session_id int
DECLARE @jobCheckTimeoutOccurred bit
SET @job_name = 'MySqlAgentJobName'
-- initialize @delay using the datetime string, e.g., "00:00:05" for 5 seconds
-- initialize @timeout to seconds you want to wait, e.g. 300 for 5 minutes.
-- initialize @delayIncr to the integer number of seconds for @delay
SET @runtime = 0
SET @timeout = 300
SET @delay = '00:00:05'
SET @delayIncr = 5
SET @jobCheckTimeoutOccurred = 0
SELECT TOP(1) @session_id = session_id FROM msdb.dbo.syssessions ORDER by agent_start_date DESC
exec msdb.dbo.sp_verify_job_identifiers '@job_name', '@job_id', @job_name OUTPUT, @job_id OUTPUT
print 'Checking status of ' + @job_name
WHILE @jobStatus is null
BEGIN
SELECT @job_id = ja.job_id,
@message = jh.message,
@jobStatus = jh.run_status,
@jobEndTime = stop_execution_date
FROM
(msdb.dbo.sysjobactivity ja LEFT JOIN msdb.dbo.sysjobhistory jh ON ja.job_history_id = jh.instance_id)
join msdb.dbo.sysjobs_view j on ja.job_id = j.job_id
WHERE
ja.job_id = @job_id
AND
ja.session_id = @session_id
IF @jobStatus is null
BEGIN
SET @runtime = @runtime + @delayIncr
IF @runtime > @timeout
BEGIN
SET @jobCheckTimeoutOccurred = 1
SET @jobStatus = -1
BREAK
END
Waitfor Delay @delay
END
ELSE
BREAK
END
IF @jobCheckTimeoutOccurred = 1
print 'Check for status of Job ID ' + cast(@job_id as varchar(64)) + ' for ' + @job_name + ' timed out after ' + cast(@timeout as varchar(5)) + ' seconds'
ELSE
BEGIN
print 'Job ID ' + cast(@job_id as varchar(64)) + ' for ' + @job_name + ' completed on ' + @jobEndTime
IF @jobStatus = 1
print 'Job Succeeded'
ELSE
print 'Job Failed with Message: ' + @message
END
SELECT @jobStatus
-- The final select query will return one of three values:
-- -1: Script timed out
-- 0: Job failed
-- 1: Job Succeeded
View 1 Replies
View Related
May 23, 2007
Help!
I installed Windows Update KB927891 for Windows Server 2003 today. Following the required reboot my three instances of SQL no longer work! Monitoring, BackUpExec and Sophos have stopped working due to SQLAgent being unable to start. Both SQL Server and DTC start successfully.
Event Viewer reports error id 103, unable to connect to server.
Looking at the logs in the SQL folders they show:
! [298] SQLServer Error: 18, SSL Security error [SQLSTATE 08001]
! [298] SQLServer Error: 772, ConnectionOpen (SECDoClientHandShake()). [SQLSTATE 01000]
! [000] Unable to connect to server 'XXXXBKUPEXEC'; SQLServerAgent cannot start
? [098] SQLServerAgent terminated (normally)
Thanks for your help in advance!
Stephen
View 1 Replies
View Related
Aug 18, 2015
I have to send mail with HTML formatĀ and attaching multiple files dynamically via send mail task.
View 10 Replies
View Related
Feb 2, 2007
I've set up DB mail and sent a test e-mail and that comes through fine.
I set up an Operator with email Name: DWhelpton@k-and-s.com;MWeaver@k-and-s.com
I created a job and set up the notifications to e-mail the operator on failure.
When the job runs and fails, I do not get an e-mail and I get the following exception in the db mail log:
Date 2/2/2007 8:35:00 AM
Log Database Mail (Database Mail Log)
Log ID 402
Process ID 3936
Last Modified 2/2/2007 8:35:00 AM
Last Modified By NT AUTHORITYSYSTEM
Message
1) Exception Information
===================
Exception Type: Microsoft.SqlServer.Management.SqlIMail.Server.Common.BaseException
Message: Could not retrieve item from the queue.
Data: System.Collections.ListDictionaryInternal
TargetSite: Microsoft.SqlServer.Management.SqlIMail.Server.Controller.ICommand CreateSendMailCommand(Microsoft.SqlServer.Management.SqlIMail.Server.DataAccess.DBSession)
HelpLink: NULL
Source: DatabaseMailEngine
StackTrace Information
===================
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateSendMailCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandFactory.CreateCommand(DBSession dbSession)
at Microsoft.SqlServer.Management.SqlIMail.Server.Controller.CommandRunner.Run(DBSession db)
at Microsoft.SqlServer.Management.SqlIMail.IMailProcess.ThreadCallBack.MailOperation(Object o)
What step am I missing?
View 1 Replies
View Related
Jul 9, 2001
I am using nt4.0 sp5 with sql7.0 sp3 and exchange client.
Does anyone know how to keep xp_sendamil form putting a copy of the mail message in the sent mail folder or an automated process for deleting all mail in the sent folder? As it stands now I must manually delete all messages from the sent mail folder on a daily basis.
Thanks,
Ed.
View 6 Replies
View Related
Mar 7, 2007
Lokendra writes "I have configured the Database mail profile and account in Sql Server 2005 but the mail is not sending and showing the following error message:
Error,235,The mail could not be sent to the recipients because of the mail server failure. (Sending Mail using Account 1 (2007-03-05T15:16:07). Exception Message: Cannot send mails to mail server. (Mailbox name not allowed. The server response was: Sorry<c/> that domain isn't in my list of allowed rcpthosts.).
),3000,90,,3/5/2007 3:16:07 PM,sa
but while in the same mail set up in previous instance of sql server 2005 the message was sending very well. After installing new instance of sql server 2005 the problem is arising.
Anybody can tell me that what I can do so that i can send mail using the SMTP databasemail account."
View 1 Replies
View Related
Dec 13, 2007
Dear all,
I have switched off the firewall settings on my system and as suggested im entering the minimal information and data to send the mail.
but still the Mail Task is failing..
plz suggest.
View 11 Replies
View Related
Jun 8, 2006
Hi Everyone,
Hopefully someone out there will have an idea as this is driving me nuts.
I've setup a task to email on success/failure and keep receiving the following message when executed:
Progress: The SendMail task is initiated. - 0 percent complete
[Send Mail Task] Error: An error occurred with the following error message: "Failure sending mail.".
Progress: The SendMail task is completed. - 100 percent complete
Task Send Mail Task failed
When I configure Outlook Express on the same machine with the same settings it works.
On the SMTP Connection Manager I have left the default name, tested with both an IP address and Server Name, and no authentication or SSL.
On the Send Mail Task, it uses the above connection. The To: , From: , Subject fields are populated. Message SourceType is DirectInput, MessageSource is Test, Priority is Normal and no attachments or expressions etc.
Nothing useful is logged in the Event Viewer even with full logging turned on.
Any suggestions appreciated,
Thanks.
View 11 Replies
View Related
Jun 24, 2004
This sends a success or fail status and length of execution time can it be extended to send error details when it fails
View 1 Replies
View Related
Mar 26, 2007
Following is our test steps.1. Create directory E:firefly in E:.2. Create a test file a.txt in E:firefly.3. Create E:firefly est.bat file with the following commands:cd E:fireflycopy a.txt b.txt4. Create a new job in SQL Server Management Studio with only onestep, this only step's commandtype is set to "Operating system(CmdExec)", and click the "Open"button to choose E:firefly est.batfile, then the commands in test.bat are copyed to the command editor.5. Save the job and run it, Management Studio tells the job faild, butdid not tell an error message.If I only use the following command :copy E:firefla.txt Efirefly.txt, and SQLAgent canrun the command successfully via the job.The real functionality of our job is to backup database to a file,then use our source control tool'scommand line tool to submit the backup file to the server.
View 5 Replies
View Related
Jul 20, 2005
Hi there;I was trying to apply SQL SP3a on my windows 2000 server (SP4), butthe installation failed and when I rebooted my server the SQL agentfailed to start and I get the following error:SQLAGENT.exe - Entry Point Not Foundthe procedure entry point SFMapi0GetProfiles could not be located inthe dynamic link library SEMMAP.dllNow, I tried replying SQLSP3a, but that keeps on failing and I keepgetting this error message.Any Idea .. Please help me.Thank you.
View 1 Replies
View Related
Sep 26, 2007
I have created a logging test package that I am attempting to execute in SQLAgent.
It uses an environment variable in Package Configurations to set a variable which is the expression value for the ConnectionManager's 'ole_src_Admin' ConnectionString.
The next three Package Configurations use that connection to retrieve SQL Server configuration types/
Using the same account I can execute the package succesfully from cmd line
The execution string is
dtexec /SQL "Parent Package" /SERVER "BLAHSQL-DEV" /MAXCONCURRENT " -1 " /CHECKPOINTING OFF /REPORTING V
Attempting to execute this via SQLAgent (type CmdExec) I receive the following error:
Date 9/26/2007 9:47:45 AM
Log Job History (Logging Test)
Step ID 3
Server QRISQL-DEV
Job Name Logging Test
Step Name Execute 2005 Package
Duration 00:00:01
Sql Severity 0
Sql Message ID 0
Operator Emailed
Operator Net sent
Operator Paged
Retries Attempted 0
Message
Microsoft (R) SQL Server Execute Package Utility
Version 9.00.3042.00 for 64-bit
Copyright (C) Microsoft Corp 1984-2005. All rights reserved.
Started: 9:47:45 AM
Info: 2007-09-26 09:47:46.28
Code: 0x40016038
Source: Parent Package
Description: The package is attempting to configure from the environment variable "SQL_Parameter_Connect_String".
End Info
Info: 2007-09-26 09:47:46.28
Code: 0x40016040
Source: Parent Package
Description: The package is attempting to configure from SQL Server using the configuration string ""ole_src_Admin";"[dbo].[Parameter]";"sv_ssis_package_store_connectionstring";".
End Info
Error: 2007-09-26 09:47:46.30
Code: 0xC0202009
Source: Parent Package Connection manager "ole_src_Admin"
Description: SSIS Error Code DTS_E_OLEDBERROR. An OLE DB error has occurred. Error code: 0x80040E21.
End Error
Info: 2007-09-26 09:47:46.30
Code: 0x40016040
Source: Parent Package
Description: The package is attempting to configure from SQL
I have also succeffuly executed this package in the same manner locally using both the cmd line and SQLAgent.
Any clues would be appreciated.
View 1 Replies
View Related
Mar 5, 2008
Has anyone been able to edit a job that they created without having SQL Server Admin access?
I have created a credential that has SQL Server Admin access along with a proxy account. My ID doesn't have admin access but I have Ownership rights to my database. I am able to create a job and execute a job but I cant edit the job once its created.
We are on SQL Server 2005 SP2.
Any Ideas?
Thanks in advance.
View 2 Replies
View Related
May 8, 2007
Hi All,
I need some help in configure our SQL 2K & 2K5 servers to send notification on job failers. Have created operators on SQL 2k but when i try to do a test mail it fails saying mai session is not running. I go to properties of the Sql agent to turn on mail session but it is grayed out. Can someone please direct me to the steps I need to take when setting up sql server with email capability. Do I have to install office (outlook on the sql server box) in order for emailing to work?
Thanks in advance for your help.
Nats
View 1 Replies
View Related