How To Setup Email Notification For Msde 2000?
Apr 14, 2006is it possible? Thanks.
View 1 Repliesis it possible? Thanks.
View 1 RepliesHi,
My name is Vinh, I am a new bee in SQL Server 2005. I am using template script (see below) from SQL Server to create account but when I am right click in database mail for testing email and I got the message, could not connect to mail server.
Below I am trying to use smtp to connect but I know in my company we are using Exchange Mail Server. will that make a lot different?
Please help me,
Thank you very much,
sp_configure 'database mail xps', 1
GO
reconfigure
GO
-------------------------------------------------------------
-- Database Mail Simple Configuration Template.
--
-- This template creates a Database Mail profile, an SMTP account and
-- associates the account to the profile.
-- The template does not grant access to the new profile for
-- any database principals. Use msdb.dbo.sysmail_add_principalprofile
-- to grant access to the new profile for users who are not
-- members of sysadmin.
-------------------------------------------------------------
DECLARE @profile_name sysname,
@account_name sysname,
@SMTP_servername sysname,
@email_address NVARCHAR(128),
@display_name NVARCHAR(128);
-- Profile name. Replace with the name for your profile
SET @profile_name = 'TestProfile';
-- Account information. Replace with the information for your account.
SET @account_name = 'vdang';
SET @SMTP_servername = 'smtp.cgdnow.com';
SET @email_address = 'vdang@cdgnow.com';
SET @display_name = 'Vinh, Dang';
-- Verify the specified account and profile do not already exist.
IF EXISTS (SELECT * FROM msdb.dbo.sysmail_profile WHERE name = @profile_name)
BEGIN
RAISERROR('The specified Database Mail profile (<profile_name,sysname,SampleProfile>) already exists.', 16, 1);
GOTO done;
END;
IF EXISTS (SELECT * FROM msdb.dbo.sysmail_account WHERE name = @account_name )
BEGIN
RAISERROR('The specified Database Mail account (<account_name,sysname,SampleAccount>) already exists.', 16, 1) ;
GOTO done;
END;
-- Start a transaction before adding the account and the profile
BEGIN TRANSACTION ;
DECLARE @rv INT;
-- Add the account
EXECUTE @rv=msdb.dbo.sysmail_add_account_sp
@account_name = @account_name,
@email_address = @email_address,
@display_name = @display_name,
@mailserver_name = @SMTP_servername;
IF @rv<>0
BEGIN
RAISERROR('Failed to create the specified Database Mail account (<account_name,sysname,SampleAccount>).', 16, 1) ;
GOTO done;
END
-- Add the profile
EXECUTE @rv=msdb.dbo.sysmail_add_profile_sp
@profile_name = @profile_name ;
IF @rv<>0
BEGIN
RAISERROR('Failed to create the specified Database Mail profile (<profile_name,sysname,SampleProfile>).', 16, 1);
ROLLBACK TRANSACTION;
GOTO done;
END;
-- Associate the account with the profile.
EXECUTE @rv=msdb.dbo.sysmail_add_profileaccount_sp
@profile_name = @profile_name,
@account_name = @account_name,
@sequence_number = 1 ;
IF @rv<>0
BEGIN
RAISERROR('Failed to associate the speficied profile with the specified account (<account_name,sysname,SampleAccount>).', 16, 1) ;
ROLLBACK TRANSACTION;
GOTO done;
END;
COMMIT TRANSACTION;
done:
GO
Hello:
I have extracted the files from the Microsoft download and am all ready to run SETUP for the MSDE 2000 release A for Visual Studio .NET 2003 Pro.
Is there anything I need to know about or run or configure for it all to work?? I am a newbee and I am the only user on my XP Pro machine under Administrator.
Thank you in advance for any pointers.
MSDE 2000? Thanks.
View 2 Replies View RelatedCan you send these to a group of DBA's
View 1 Replies View RelatedHow can I set up the notification email when one of your jobs got failed using Database mail..
I've already set up the database mail ... but I am not quite sure how to use the database mail to send a notification when a job failed...
I need to set up an automatic email notification. Right now, I have a subscription that is working. The subscription runs a report and puts the resulting pdf into a folder. I need a way to notify users (preferrably in an Outlook distribution list) when the pdf is created. I'm amazed that this basic feature is not built into the subscription capabilities.
Can anyone please tell me how to best accomplish this? I'm familiar with vb.net if that helps.
Thank you very much.
Hello
i am new to sqlserver 2000.i have list of email id in a table. need to fetch that emailid and send mail to the appropriate id's.any body knows how to write job schedule for this task.Ideas are welcome
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 RelatedI am trying to set up the email notification system in SQL server 2000, but im having some problems. Mainly, im having problems with setting up an email account in the first place (there is a dedicated mail box, but the one im working with is a different box altogether).
If anyone could help fathom this out from start to finish i would be really grateful.
Is there a handy-dandy way for me to be able, from a stored procedure, to capture the notification email address for a user associated with a job?
I need to send an email out from a stored procedure, and I want it to be set up to send to the same user that is set up in the job that calls the stored procedure.
the same notification stored proc will be used in multiple jobs, but the jobs are already set up with a notification email to be sent to the defined users "on completion" (error or not). I want a separate email to be sent, but I want to use xp_Sendmail because I have to perform a select who's output I want to appear in the body of the email (and unless I am missing something, I have no control over the body of the standard "job completion" email).
I would prefer to NOT have to "hard code" the user email address in the stored proc that calls xp_sendmail, OR to put it in some user table in the database, when the user I want to send it to will always be the same one defined in at the JOB level in Enterprise Manager.
Any thoughts? Thanks in advance for your instantaneous and informative answer-packed responses! ;)
I have created a trigger like this below:
CREATE TRIGGER TriggerName ON Table_Name AFTER INSERT AS
DECLARE @SERVICE varchar(40)
DECLARE @STATUS varchar(3)
SET @SERVICE=(SELECT [SERVICE] FROM inserted)
SET @STATUS=(SELECT [STATUS] FROM inserted)
[Code] ....
When I added some a new record to Table_Name with Status='X' nothing happened. I have tried to exec only script below:
EXEC msdb.dbo.sp_send_dbmail @recipients=N'moj_adres', @body= 'test', @subject = 'Subject!!!!', @profile_name = 'profil'
and I received email notification.
Hi All
I just wondered that now SQL Mail is classed as a legacy solution for email, does anyone know how to set up Notification Services to send email once a job has completed e.g. Backup or reindex?
I have tried to find a tutorial but with no joy so far!
Thanks
Gopher
Hi,
I want to setup a SMTP using gmail. How to configure it, it says,
In your email client software, under Outgoing mail, set the SMTP server to smtp.gmail.com.
Set the your username is yourgooglemailname@gmail.com and make sure "Use username and password" is checked.
Also check off "TLS" under "Use secure connection."
I tried to do this in code:
Dim htmlMessage As MailMessage
Dim mySmtpClient As SmtpClient
htmlMessage = New MailMessage(From, SendTo, Subject, Body)
htmlMessage.IsBodyHtml = IsBodyHTML
mySmtpClient = New SmtpClient(Server)
Dim myCred As New System.Net.NetworkCredential("myemail@gmail.com", "mypassword") 'CredentialCache
mySmtpClient.UseDefaultCredentials = False 'Credentials = System.Net.CredentialCache.DefaultNetworkCredentials
mySmtpClient.Credentials = myCred
mySmtpClient.Send(htmlMessage)
however, i cannot do the turning off of TLS in code. I'm often prompted with this error once i run:
The SMTP server requires a secure connection or the client was not authenticated. The server response was: 5.7.0 Must issue a STARTTLS command first
Anyone who knows how to do this?
cherriesh
Good morning,
I have a strange problem with a scheduled task failing with the following:
"Unable to send completion notification email to operator with email name '' for task 2780, 'Scheduled Update'"
This job is the same across several servers and the job runs on the other servers. This is a bit frustrating... I cannot seem to find the difference that is causing the problem.
The funny thing is that I am not using SQLMail or anything to notify anyone regardless if the job succeeds or fails.
Any pointers?
Thanks much,
Don
within sql server management studio... we have set up a few sql scripts to run at 2am every night (sql server agent > under jobs)... although it has been successful each night, we'd like to setup sql server agent to automatically email success and failure notifications to our email boxes.
i see under the properties of sql server agent > jobs > properties of a job > there is section that says Notifications but then it doesnt really have a place to type in which email we want to send them to? some reading material or instructions greatly appreciated
I am in process of setting up job failure notification and one of the requirements that I have is to send notification to multiple users. I would appreciate any suggestion. One of the possible ways would be to create some sort of group account on exchange server with all users added as members. Is there anyway though where I could use users' individual accounts and based on that forward notification to them?
Thanks
We are maintaining a database of drivers, and we are looking for a script or procedure that will automatically notify certain users of the list of drivers who are in need of a recheck or driver's license has expired.
I am new to this , so any help you can give would be greatly appreciated
Hi,
I want to include the running time (Start Time and End Time) of the Package in my script task that sends out an email after job completion.
How do I get the start time and end time?
thanks a lot
cherriesh
Hi there,
I am actually trying to setup multiple notification for one of our SQL Server 2000. The plan is to setup different notifications for administrators and users; so basically if a Job fails on this server Admins will get an alert message. In addition users will be notified with a separate notification to let them know that Admin team is already aware of the issue and is looking into that. All the communication is required to be through emails.
Please let me know if you have a solution to that.
Thanks,
LOA
Hi Guys,
I'm having some problems setting up a SQL Server 2005 Query Notification application. I've only recently moved from SQL Server 2000 so 2005 is still a little alien to me!
I've followed example found on the internet in the following steps:
1.
ALTER DATABASE <dbname> SET ENABLE_BROKER
2.
GRANT CREATE PROCEDURE TO <user>
GRANT CREATE QUEUE TO <user>
GRANT CREATE SERVICE TO <user>
GRANT SUBSCRIBE QUERY NOTIFICATIONS TO <user>
GRANT RECEIVE ON QueryNotificationErrorsQueue TO <user>
3.
ALTER DATABASE <dbname> SET TRUSTWORTHY ON
The application developers have also followed the same example setting up SQL cache and the connection code. When they start the application I can see the connection in the activity monitor but it has a status of SUSPENDED. I've also checked the view:
SELECT * FROM sys.dm_qn_subscriptions
There are no subscriptions setup I can however see that there is a new SP created. I tried to creating master keys as well but I'm not sure what the reasoning behind this is.
Is there anything else I need to take into consideration or check? When I change the data which they use for their select statement SQL profiler doesn't register anything (except the update). I have however seen this:
exec sp_executesql N'END CONVERSATION @p1; BEGIN CONVERSATION TIMER (''69e2c786-9d33-dc11-a751-0050568146e8'') TIMEOUT = 120; WAITFOR(RECEIVE TOP (1) message_type_name,
conversation_handle, cast(message_body AS XML) as message_body from [SqlQueryNotificationService-5fb25d04-6ef6-47e6-9406-854f15e16eb7]), TIMEOUT @p2;',N'@p2 int,@p1
uniqueidentifier',@p2=60000,@p1='BD98F6B4-A133-DC11-A751-0050568146E8'
This occurs when they refresh the page.
Any ideas?
Cheers!
Ian
I receive the following error when trying to invoke xp_sendmail 'xp_sendmail: failed with mail error 0x80070005'. However, for alert notifications the email works fine. SQL is using an alias account to send mail. This account doesn't have any funny characters. Any ideas why the alert system works but xp_sendmail does not? The invokation of xp_sendmail is being done by SA.
Thanks.
I have a query which sends email notification of count of pending name and suggested name.. on a daily basis. So this works fine but now I want like if the pending and suggested are ' o count' I don't want the email notification. It should not send an email, if it is o count, but if we have the number for pending and suggested this email should be sent.
View 8 Replies View RelatedI want to create data driven subscription via Email for SSRS report.
To do so i can add my self either in To or CC.
I don't want multiple mails in my inbox as sent mails have excel as attachment, but I want notification for all the mails sent.
I can't use the SQL Server Mail but I heard if I have an exchange server with SMTP I can still use SQL Server Stored Procs to send emails . can someone please explain or direct me to it
View 4 Replies View RelatedI need to setup an email alerts with Jobs errors ( with error logs is it possible ) on nightly basis.
example:
Job name : Full backup | Status : Error | error log : 'The job failed 12........'
Job name : Delta Backup| Status : Error | error log : 'The job failed 123........'
Job name : Cleanup DB | Status : Error | error log : 'The job failed 1234........'
What's the easiest way to do that ?
was installing MSDE for use with Web matrix
thot had done all correctly ie the setup.exe sapwd=xxxxx securitymode=sql from the command prompt
was told that setup has failed
where is the problem
Hello:
I had partitioned my harddrive to have both XP PRO and Red Hat. Got fed up with all that and so used Partition Magic 8.0 to repartition the drive to be one 16 Gig drive. I still have over 8 Gig left on it even after installing VS .NET on it.
I have successfully installed Visual Studio .NET Pro 2003 on it and I can now write programs in VB and see it on my intranet at c:/wwwroot/.
I am now trying to install MSDE 2000 for Developers Using VS .NET. I have downloaded the file from Microsoft and then when I go to install it on my hard drive it tells me it cannot; I have to free up 92.44 Megs for it to be able to extract it to my c drive.
I am a newbee and any help will be GREATLY appreciated!!
i got prob running setup in MSDE ,
there r options to set in setup.ini to enable setting the parameter in MSDE after installed
but it cant run
i use
[Options}
SAPWD=123
after install the sapassword still null,seems like no effect
i've try running from prompt setup.exe /SAPWD 123 too
I am using VB.net to build ASP.net pages. I finally decided it was time to start using SQL server based code. So, I installed MSDE....or so I thought.
I have the server Icon in the bottom systray and it's green and seems to be running.
I have been able to use Microsoft Access' Database Upgrade Wizard to create BB.adp file.
An in VB.net I see a master.dbo connection in Server Explorer.
But I can't figure out how to access the database via the SQL server. When I right click on Server Explorer....the Create a New SQL database menu item is greyed out.
My concern is that my installation is not complete and/or I don't know how to locate and verify the server.
Any help would be appreciated. Thanks
I'm trying to setup the ASP.Net forum on my local XP Pro PC and am having problems with MSDE security. I had an old version of MSDE on the PC and uninstalled it and downloaded/setup the version on the download page with the forum.
Looking at the MSDE readme I did the Windows Authentication mode instead of the mised mode - was that wrong?
When setup tries to setup the DB I get the log entry:
Determined SQL Server version (8.00.194).
[Fail] Could not add ASPNET user to SQL Server.
SQL Server does not exist or access denied.
The server is up and running and I have already used another tool to setup its DB so the server is up an running and functioning fine.
I have search around on the net about MSDE persmissions but the hits have not been helpful - they usually refer to client tools not provided with MSDE. Even if I could find instructions on setting up a user the ASPForumSetup doesn't say what user name or permissons are needed.
I can't find any spot in the XP Pro environment to setup access permissions to MSDE - is finding that the key? My login is a member of the Administrators group.
Help!
Here is my experience with installing MSDE.
I'm leaning C# and ASP.NET at the same time using the book "Microsoft ASP.NET Programming with Microsoft Visual C# .NET Step by Step". In Appendix C, P 577, it says to locate setup.exe under …Microsoft Visual Studio .NETSetupMSDE and "run setup.exe to install MSDE."
This was my first mistake, because there are more recent versions available with security patches (for the slammer virus). I have been unable to successfully update the old version. The install program for MSDE has got to be a hackers delight because only a hacker can make it work. I decided to uninstall the old version of MSDE 2000 and install the latest download from the MSDN website. The new version would get most of the files installed and then rollback the install, removing all the files. When I tried to reinstall the old version, it did the same thing. At least the new version requires a password parameter for the sa user. The bad news is that the new password is ignored. Since I already installed the first version with a blank sa password by running setup.exe with no parameters the password will remain blank until I change it using the user friendly osql command line utility. More about osql later…
Here is how I solved the rollback problem:
I first (after many hours trying to modify the registry to clean up the mess Windows uninstaller left there) used the command line switch /L*V <your logfile name> to get a verbose log file. I noticed a property listed called "Disablerollback" this was set to 0. So, I ran setup on the command line as below (all one line):
>setup DisableRollback=1 /L*V "C:Program FilesMicrosoft Visual Studio .NETSetupMSDEsetupbat.log" SAPWD="ignored password"
The setup still failed, but its tracks were preserved for XP to complain about on system restart.
I then restarted the system and logged in. XP threw an error dialog box with the message "Your server installation is either corrupt or has been tampered with (unknown package ID)…" I clicked OK and waited a few extra minutes for XP to finish logging me in.
After logging in, I closed the Service Manger from the taskbar notification area. I then deleted the folders 80, and MSSQL (name of default instance) from the target install directory. Finally, I ran setup.exe again as shown:
>setup /L*V "C:Program FilesMicrosoft Visual Studio .NETSetupMSDEsetupgood.log" SAPWD="ignored password"
This time, after restarting, my old MSDE worked. This approach seems to only work with the first old version of MSDE that was shipped with Visual Studio .NET. I still have yet to figure out how to upgrade and get MSDE to work again.
Once you get MSDE to work, here are some tips on how to administer it using the osql command tool.
To change the sa password do the following (use null for a blank password):
>osql -U sa
Password:
1> sp-password @old=null, @new='newpassword', @loginame='sa'
2> go
Password has been changed
3> quit
On page 113 of the authors' first attempt with the book "Microsoft ASP.NET Programming…", the hacks wrote:
Set up the SQL Server session state database by running the InstallSQLState.sql batch (located in …) against the SQL Server you plan to use. (For more information about running batch statements, check with your database administrator or the SQL Server Books Online.)
Here is how to do it with osql:
> osql -S MSSQLSERVER -U sa -i InstallSQLState.sql
For less characters than it took to write the last parenthetical sentence, they could have just given the same example I supplied here.
If you want a graphical interface to administer you MSDE server, try downloading the small package for "Microsoft SQL Web Data Administrator" from Microsoft's website. This even comes with a modern installer. Here are some tips on how to connect to your locally installed MSDE using this utility:
The main dialog just requires that you click the start button. A login page comes up. To log in as sa, do the following:
? Click the "SQL Login" radio button.
? Under "Please enter a SQL Server name:" fill in the following text boxes:
? Username: sa
? Password: [your password | leave blank if no password is set]
? Server: (local)
This should get you to the server tools page. Click "Security", then Logins. Now, on the Logins page, you can add new users. If you install MSDE for mixed mode, you can add "Windows Integrated" user accounts. This best since you won't have to put passwords in your code to allow database access to these users. To add a user, click on "Create New Login". Set Authentication Method to "Windows Integrated" in the combo box. For Login Name you need to use the form <computername><username> . For example, "MSSQLServerDan".
If you did like I did, and installed MSDE in SQL login mode only, you can do the following registry hack to change it to mixed authentication mode:
1. Locate either of the following subkeys (depending on whether you installed MSDE as the default MSDE instance or as a named instance:
HKEY_LOCAL_MACHINESoftwareMicrosoftMSSqlserverMSSqlServer
-or-
HKEY_LOCAL_MACHINESoftwareMicrosoftMicrosoft SQL Server<Instance Name>MSSQLServer
2. In the right-pane, double-click the LoginMode subkey.
3. In the DWORD Editor dialog box, set the value of this subkey to 1. Make sure that the Hex option is selected, and then click OK.
4. Restart the MSSQLSERVER and the SQLSERVERAgent services for this change to take effect.
Try this link for more details:
http://support.microsoft.com/default.aspx?scid=kb;en-us;Q322336
Hello,
OS: Windows XP Embedded
MSDE: 2000 SP3 to SP4
I want to avoid reboot after upgrading MSDE from SP3 to SP4.
setup.exe seems to no option to avoid reboot.
The resason to avoid reboot is continue to do some process after upgrade MSDE.
Regards,