Click here to monitor SSC
SQLServerCentral is supported by Redgate
 
Log in  ::  Register  ::  Not logged in
 
 
 


How to use Database mail feature in SQL Server 2000


How to use Database mail feature in SQL Server 2000

Author
Message
saby
saby
Old Hand
Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)

Group: General Forum Members
Points: 301 Visits: 277
Any suggestion on this will be highly appreciated.......
M A Srinivas
M A Srinivas
SSC Veteran
SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)

Group: General Forum Members
Points: 234 Visits: 668
If you want to send query result using link server approach , you need to create two way link server and provide access to databases in sql 2000 to the user in sql server 2005
saby
saby
Old Hand
Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)

Group: General Forum Members
Points: 301 Visits: 277
Only one Linkserver need to be created .....
M A Srinivas
M A Srinivas
SSC Veteran
SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)SSC Veteran (234 reputation)

Group: General Forum Members
Points: 234 Visits: 668
Since the query is referring to the database in SQL Seerver 2000, when I creaetd the query to call sp_db_mail in SQL 2005 through link server , It came out with databse objet not found

After creating two way link servr it worked.

Provide me how to create a query out put from SQL Server 2000 in dbmail using the specified approach
saby
saby
Old Hand
Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)

Group: General Forum Members
Points: 301 Visits: 277
srinivas please go for this blog which might clear ur doubts.....

http://databasemail.blogspot.com
ColinChen
ColinChen
Grasshopper
Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)Grasshopper (18 reputation)

Group: General Forum Members
Points: 18 Visits: 71
HI, I got a error using this way:
Msg 0, Level 11, State 0, Line 0
A severe error occurred on the current command. The results, if any, should be discarded.

But the mail was sent by sql server. How to fix the error message:-P

C.G
saby
saby
Old Hand
Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)Old Hand (301 reputation)

Group: General Forum Members
Points: 301 Visits: 277
Colin please let us know which method u r using Mohammed or saby
Mithra
Mithra
SSC Rookie
SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)SSC Rookie (31 reputation)

Group: General Forum Members
Points: 31 Visits: 420
Thank you Moin Sir:-) I read this article today.;-)Just awesome.!!!!
--Boj
danskisanjar
danskisanjar
Forum Newbie
Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)Forum Newbie (8 reputation)

Group: General Forum Members
Points: 8 Visits: 51
Does this only run if the job fails? Can you make this run when jobs also complete? On our 2005 machines
we have all jobs will email on failure except the user databases we have email upon completion.

I am also not sure about this,

exec SQL_Server_2005.msdb.dbo.sp_send_dbmail
@profile_name = 'SampleSQLServer2005dbmailProfile',
@recipients='yourname@email.com',
--@copy_recipients = 'yourgroup@email.com',
@subject='Job test_db_mail failed on SQL Server 2000 server',
@importance='HIGH',
@body ='Job test_db_mail failed on SQL Server 2000 server'
--------------------------------------------------------------

Profile name is the name of the account with no @companyemail.com at the end.

Is that also reentered in the @recipients only with the @companyemail.com at the end?

I am assuming that we don't have to use copy_recipients if we don't want, that is optional?

Any help is appreciated.
M&M
M&M
SSCrazy
SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)SSCrazy (2.6K reputation)

Group: General Forum Members
Points: 2595 Visits: 3898
danskisanjar (11/3/2011)
Does this only run if the job fails? Can you make this run when jobs also complete? On our 2005 machines we have all jobs will email on failure except the user databases we have email upon completion.


This is just an example. It shouldn't matter if job fails or not.\

I am also not sure about this,

exec SQL_Server_2005.msdb.dbo.sp_send_dbmail
@profile_name = 'SampleSQLServer2005dbmailProfile',
@recipients='yourname@email.com',
--@copy_recipients = 'yourgroup@email.com',
@subject='Job test_db_mail failed on SQL Server 2000 server',
@importance='HIGH',
@body ='Job test_db_mail failed on SQL Server 2000 server'
--------------------------------------------------------------

Profile name is the name of the account with no @companyemail.com at the end.


Profile name is the database profile you configured in SQL Server 2005

Is that also reentered in the @recipients only with the @companyemail.com at the end?

No, @recipients is your email address

I am assuming that we don't have to use copy_recipients if we don't want, that is optional?

Yes, it is optional

M&M
Go


Permissions

You can't post new topics.
You can't post topic replies.
You can't post new polls.
You can't post replies to polls.
You can't edit your own topics.
You can't delete your own topics.
You can't edit other topics.
You can't delete other topics.
You can't edit your own posts.
You can't edit other posts.
You can't delete your own posts.
You can't delete other posts.
You can't post events.
You can't edit your own events.
You can't edit other events.
You can't delete your own events.
You can't delete other events.
You can't send private messages.
You can't send emails.
You can read topics.
You can't vote in polls.
You can't upload attachments.
You can download attachments.
You can't post HTML code.
You can't edit HTML code.
You can't post IFCode.
You can't post JavaScript.
You can post emoticons.
You can't post or upload images.

Select a forum

































































































































































SQLServerCentral


Search