Config DBmail To Use MX Records?

Sep 11, 2007

We are having trouble configuring SQL Server 2005 to use MX records.
Basically, we want to use DBmail to utilize multiple mail relays.
The three mail relays are contained within internal DNS MX records.

smtphost.xxx.com. IN MX 10 mailhost1.xxx.com.
smtphost.xxx.com. IN MX 10 mailhost2.xxx.com.
smtphost.xxx.com. IN MX 10 mailhost3.xxx.com.

It doesn't seem to like using MX records? Any ideas?
Thanks KraftR
Tim.Kraft@Dowjones.com

View 1 Replies


ADVERTISEMENT

DBMail

May 16, 2006

Is it possible to embed a image datatype into a EMail message using sp_Send_DBMail?

For example, my query would select a saved print screen image held in a SQL table as datatype image. I would prefer not to attach this image but rather have it print in the message section.

Thanks in advance.

View 2 Replies View Related

DBMail

Jan 30, 2008

Hi,
I am using SQL Server 2005 and need to mail. I used sp_send_dbmail for mailing but I am able send to one @recipeint and one @copy_recipient.
How can I mail to many email addresses and/or group?

Any help is appreciated.
Thank you,

View 6 Replies View Related

Get DBMail Output?

May 30, 2013

With Query Anylyser, I am sending mails with DBMail successfully. Each time mail is sent, bottom half window messages tab shows

"Mail (Id: 30242) queued."

Is there any way to capture Mail (Id: 30242) and update the same in a table?

View 1 Replies View Related

HTML And DBmail

Nov 29, 2007

Is anyone using a SP or Trigger to Create a HTML formated e-mail and send it useing DBmail?

If so could I see a sample of the code?

Jim
Users <> Logic

View 4 Replies View Related

Trigger Insert And Dbmail

Apr 23, 2008

I have a stored proc that inserts records into a table, gets the identity, and uses that identity on a .net webpage. The page retrieves that identity key and processes some stuff on the page.

Everything was working fine until I tried to enable sql mail with triggers. I wanted to double-check some stuff, so I requested an sql email be sent whenever an insert occurs on the table above. Here's what I think is happening --- please correct and/or help me out with a work around?

I use the stored proc to insert a record.
I select the @@identity.
The trigger fires but uses select to retrieve the latest insert - thereby replacing the @@identity number returned to the page?

If this is true, could I do something like the following in the original stored proc? Is this a good idea or bad idea?

BEGIN
Declare @myID as int, @myBody1 as varChar(200)
Set @myID=0
INSERT INTO table (fields) VALUES (@PID, more stuff);
Set @myID = SELECT @@IDENTITY As [Identity];
If @myID<>0
Begin
Set @body1='<br />pid=' + more stuff.....
Exec msdb.dbo.sp_send_dbmail
@profile_name='profileName',
@recipients='email@email.com',
@subject='Temp History Insert',
@body=@body1,
@body_format= 'HTML' ;
End
END

View 7 Replies View Related

SQL DBMAIL Performance Issues

May 26, 2007

Hi,

I'd like to have some feedback from the experts on SQL 2005.

The situations is the following.

I have an application .net/SQL server 2000 that send notification mails using the SQL mail feature. It works fine for years.

Sooner or later SQL 2000 will be out of service, so I decide to move my database to SQL 2005.

When I'm trying to put in production with my web hosting provider www.webhost4life.com, they said that are not supporting SQL DBMAIL on any SQL 2005 32/64 bits because the extra workload will slow down SQL 2005 performance.

My question is if somebody has experience of this situation in other installations or maybe is that provider who has some problems tuning the SQL servers.

View 1 Replies View Related

DBMail Permission Error

Feb 18, 2006

I am using DBMail to send an email notification at the completion of service broker process and have been getting the following security error:


Msg 229, Level 14, State 5, Procedure sp_send_dbmail, Line 1

EXECUTE permission denied on object 'sp_send_dbmail', database 'msdb', schema 'dbo'.

I have given the userID used to run the Service Broker, databasemailuserrole in msdb as per instruction in the msdb. I have also given it execute permission on the sp_send_dbmail but keep getting the error. The service broker is run using a sql login and the dbmail profile is set as public profile. Any suggestions would be much appreciated.

View 6 Replies View Related

SQL 2005 DBMail Security Question

Dec 7, 2007

Can a regular user configure DBMail on a SQL 2005 Server?

Thanks

View 1 Replies View Related

Sql 2005 Trigger Insert And Dbmail

Apr 23, 2008

I have a stored proc that inserts records into a table, gets the identity, and uses that identity on a .net webpage. The page retrieves that identity key and processes some stuff on the page.

Everything was working fine until I tried to enable sql mail with triggers. I wanted to double-check some stuff, so I requested an sql email be sent whenever an insert occurs on the table above. Here's what I think is happening --- please correct and/or help me out with a work around?

I use the stored proc to insert a record.
I select the @@identity.
The trigger fires but uses select to retrieve the latest insert - thereby replacing the @@identity number returned to the page?

If this is true, could I do something like the following in the original stored proc? Is this a good idea or bad idea?

BEGIN
Declare @myID as int, @myBody1 as varChar(200)
Set @myID=0
INSERT INTO table (fields) VALUES (@PID, more stuff);
Set @myID = SELECT @@IDENTITY As [Identity];
If @myID<>0
Begin
Set @body1='<br />pid=' + more stuff.....
Exec msdb.dbo.sp_send_dbmail
@profile_name='profileName',
@recipients='email@email.com',
@subject='Temp History Insert',
@body=@body1,
@body_format= 'HTML' ;
End
END

View 3 Replies View Related

Problem With Service Broker And DBMail

Sep 20, 2006

Hi!
I try to use Service Broker and DBMail together, but have some trouble with that.
I need to create the queue with activation.
And the stored procedure activated on this queue must send e-mail using DBmail.
It's looks simple, but it doesn't work.
There is my script to create objects, but don't forget create dbmail profile before use it.
PS And replace my email by yours

View 1 Replies View Related

Need Help With Permissions Error On Dbmail Trigger

Sep 26, 2007

Good morning,

I'm stumped on this trigger error and I'm hoping someone can help. Here's the background:

BACKGROUND
Running SQLServer2005 on WinServer 2003 RC2. We use a SQL-based business application that has it's own alert system that uses database mail sucessfully, meaning the built-in emailing functions of the application work and can communicate with the database mail profile and send mail without error.

PROBLEM
I'm trying to write a trigger that will automatically send out an email alert after certain actions are performed in the business application. When I enable the trigger and it tries to run it fails with the following error:

SQLDBCode: 229Alerts error: SQLSTATE = 4200Microsoft OLE DB Provider for SQL ServerEXECUTE permission denied on object 'sp_send_dbmail', database 'msdb', schema 'dbo'...

TROUBLESHOOTING
I've seen several articles about DatabaseMailUserRole permissions and have made sure that all users, admin and even guest (for testing) are members of this role. Other than that our setup is pretty vanilla so I'm not sure what else to do.

We only have one large dbase for the app and the fact that the internal emailing fuction works makes me think that the permissions for the msdb are already correct (although I could be wrong)

This problem is driving me crazy so I thank you in advance for any suggestions!

View 3 Replies View Related

SQL 2012 :: Any Way To Use People Distribution List With DBMail?

Mar 13, 2015

I would like to replace mymail@mail.com by mypdl@mail.com , where mypdl is basically a people distribution list with 2 emails: my own email and my coworker and fellow DBA.

IF EXISTS
(
SELECT TOP 1 [PercentUsed]
FROM [BackupSize]
WHERE PercentUsed>=70 AND [drivename]='D:' -- D is the internal drive
ORDER BY [MetricDate] DESC

[Code] ...

But I think this won't work by design. Maybe I need to create an operator?

View 4 Replies View Related

Sending SQL 2005 Dbmail When Using Application Role

Jan 16, 2007

I am attempting to use dbmail from an application that logs in to my database using an application role.  Since the application role does not exist outside the database, I created an spSendEmail in the database with "execute as login='mailagent'" in it:  I set the database to trustworthy, created a 'mailagent' account and added it to the msdb database with the databasemailuser role rights.

Email works just fine on the server when I use the execute as login='mailagent' to fire off the msdb..sp_send_dbmail.  But from the .NET application, I get the error: "Cannot execute as the server principal because the principal 'mailagent' does not exist, this type of principal cannot be impersonated, or you do not have permission."  When I run my spSendEmail stored procedure from the calling database, I get the same error.

View 1 Replies View Related

Reporting Services :: Parsing SSRS Config File And Dynamically Changing File Path Of Config File In Code

Sep 2, 2015

Currently have a single hard coded file path to the SSRS config file which parses the file and provides the reporting services web service url.  My question is how would i run this same query against 100s of servers that may or may not share the same file path as the one hard coded ?

Is there a way to query the registry to find the location of the config file of any server ? which could be on D, E, F, H, etc. 

I know I can string together the address followed by "reports" and named instance if needed, but some instances may not have used the default virtual directory name (Reports).

Am I going about this the hard way ? Is there a location where the web service url exists in a table ? I could not locate anything in the Reporting service database. Basically need to inventory all of my reporting services url's.

View 2 Replies View Related

SQL Server 2008 :: DBmail HTML Body Size Limit

Nov 4, 2015

When sending an email in HTML format, shouldn't this allow for 2gb of data? Mine is getting truncated after 4000 characters.

@body NVARCHAR(MAX) = NULL,

EXEC msdb.dbo.sp_send_dbmail
@recipients='someone@some.com',
@reply_to='someone'
@from_address='someone@here.com>',
@profile_name = 'profilename',
@body_format = 'HTML',
@body = 'lots of data'

View 2 Replies View Related

SQL Server 2008 :: DBMail Output Query Results As CSV With Headers But No Separator

Aug 25, 2015

If I use msdb..sp_send_dbmail or save query results as text (using sqlcmd) and include the column headers I get the dashed separator line.

e.g.

custID, name
------, ------
1,bob
2,jamesI would like this
custID, name
1, bob
2 ,james

I found this method [URL] ....

::
sqlcmd -E -S (local) -d myDB -W -w 1024 -s "," -i "SELECT * FROM tblCust" | findstr /V /C:- /B > C: emp.csv

Can the same result be achieved sending as attachment with dbmail?

EXEC msdb..sp_send_dbmail @attach_query_result_as_file = 1I don't want to have to add column names as part of the query

Change the query to return column headers in resultset
SELECT 'CustID' as f1, 'name' as f2
UNION ALL
SELECT CAST(CustID as Varchar(10)), name FROM tblCustand set

msdb..sp_send_dbmail @query_result_header = 0

View 0 Replies View Related

Dbmail Doesn't Rely On IIS SMTP, How To Set Bounced Email Redirect Email Etc.? Thanks

May 4, 2007

Under IIS SMTP I can set bounced email redirect etc. how to do that with dbmail, the idea is I can get the list of bounced emails somewhere so I can create a report.



Any idea?



thanks

View 2 Replies View Related

SQL 2012 :: Query To Make Single Records From Multiple Records Based On Different Fields Of Different Records?

Mar 20, 2014

writing the query for the following, I need to collapse the continuity. If the termdate for an ID is one day less than the effdate of the next id (for the same ID) i need to collapse the records. See below example .....how should i write the query which will give me the desired output. i.e., get min(effdate) and max(termdate) if termdate is one day less than the effdate of next record.

ID effdate termdate
556868 1999-01-01 1999-06-30
556868 1999-07-01 1999-10-31
556869 2002-10-01 2004-01-31
556872 1999-02-01 2000-08-31
556872 2000-11-01 2004-01-31
556872 2004-02-01 2004-02-29

output should be ......

ID effdate termdate
556868 1999-01-01 1999-10-31
556869 2002-10-01 2004-01-31
556872 1999-02-01 2000-08-31
556872 2000-11-01 2004-02-29

View 0 Replies View Related

What's The Best Practice...1 Package Many Config Or Many Package W/1 Config

Apr 4, 2007

Hello all,



I'd like to know what's considered a best practice in the following scenario...



We're in the process of converting DTS to SSIS, our current SQL2K setup has one DTS package per database, each database and package are mirror images of each other, with the exception of connection properties and the files path's they pull from. (Occasionally there may be a one off Execute SQL Task that differs from package to package...but this will be handled in a different manner outside of the package from this point on)



From a administration perspective this has been somewhat cumbersome, as every time there is a schema change we need to update the transformations in each individual package...after updating 120 packages my index finger has a bad case of carpel tunnel!



My thought with SSIS is that I can create one package, with many configuration files (one for each database).



Now my question is, 1) is this a good idea? 2) Anytime we create a new database (New Customer = New Database) and need to create a new xml config file, do I have to create the config in BIS/SSIS package then redeploy the package?...or Can I simply add a new config file to the appropriate directory and reference this config in the scheduled job?



Any suggestions are greatly appreciated!



View 1 Replies View Related

IIS And The Web.config

Oct 31, 2007

Hi,My application is acting weird and the research I've done leads me to an answer why it's breaking, but not how to fix it.My web app is hosted by a remote company. I have the main website sitting in the root web directory and in a subfolder I have another application that will handle login and updating the content in the SQL 2K5 backend (not an Express DB).The website itself is able to pull in informaiton from the DB without any trouble, so I know it's able to connect to the DB and everything is peachy. The login app though is acting as though it can't get to the DB. I've applied the ASPNET schema to the DB using the aspnet_regsql.exe from the framework and the login application is using the same connection string as the main website.One thing to note here is that the website and the login app have seperate web.config files since they were developed as different projects.With my customized provider defined in the web.config for the login app I get this error on page load:"Parser Error Message: It
is an error to use a section registered as
allowDefinition='MachineToApplication' beyond application level.  This
error can be caused by a virtual directory not being configured as an
application in IIS." If I comment out the custom provider, the page loads but when I try to create a user it tells me that "...the SQL Server couldn't be contacted. This may be because it doesn't accept remote connections." Thing of it is that it's not a remote connection and it's the same connection string and db as the other site.Now, the research I've done points at the two different web.config files, which makes sense. But how do I make the one web.config work for both the website and the subdirectory with the login app? Keep in mind that I can't create any new virtual directories or modify IIS since this is a remote hosting company.Can someone help me understand the fix with a little more clarity? 

View 1 Replies View Related

Config

Mar 30, 2007

Hi,

I'm kind of the first person at my new company to start a project using SSIS. My question(s) revolves around setup and configuration, maybe even best practices.

1. Connection Manager Config - What are some of the methods you use to config your connection managers? I was planning on creating a folder (C:SSISConfig or something) and keeping a config file for each connection there. That way it would be fairly trivial for each developer to also put said folder on there box for deving.

2. Solution set up - Are people creating solutions for each package or just using one Master solution and adding all the packages to that? Or maybe some combination, like having solutions for different areas of functionality or something..? I'm trying to figure out what the pain points are with different approaches.

If you have any other information or horror stories about SSIS that you think might help, feel free to pass them along.

Thanks,

-Ryan

View 1 Replies View Related

SQL Config

Mar 10, 2007

I want to make an application using a distributed database (single logical database, parts of which are located at more than one location or more than one server). It acts as a single collection of data but the database itself is geographically in separate locations.
How do I make it in SQL Server 2005?

View 4 Replies View Related

App.config?

Jul 10, 2006

Hello All,

I am trying to use a custom C# dll from within a script task. The C# dll relies on the Enterprise Library 2.0. Where do I put the enterprise library configuration when I am debugging a package and then when I have the package in production. I cannot find any documentation anywhere on this.

Thanks for any help,

Justin

View 5 Replies View Related

Web.config File Example

May 24, 2007

Does anyone have an example of a web.config file that works with Dynamic Data controls?  I asked because I can't seem to arrange my "config sections" in any working order. I use 1 connection string in the web.config to establish a conversation with the database.   Thanks in Advance. 

View 1 Replies View Related

How To Access Web.config

Nov 15, 2007

I am using vs2005 and have a solution file with 4 projects, 2 of which are presentation layers (admin sections), 1 is a business logic layer, the other a data access layer.
The data access layer project is simply a class library that will provide data access functionality.  Im using a dataset (xsd) to create my data access objects.  My question is how do I select a connection string from the web config file (which is in each of the presentation layer projects)  as the data access layer is a class library there is no web.config.  Using the connection string selector in the dataset wizard doesnt show any available connection strings.

View 1 Replies View Related

Web.config File

Feb 21, 2008

 Hi the data connectionstring will be generated automatically in web.config file after dragging a data table from database into webpage.for example: <configuration> <add name="SQLProfileConnString" connectionString="Data Source=.SQLEXPRESS;AttachDbFilename=|DataDirectory|MSPetShop4Profile.mdf;Integrated Security=True;User Instance=True"   providerName="System.Data.SqlClient"/> </> But what if I have to write the connectionString part myself, I mean where I can get  the syntax of it? Thanks a lot 

View 1 Replies View Related

SessionState In Web.config

Nov 21, 2003

When I connect locally, my app runs fine. But when I try to connect via FTP to a dedicated server, I can't connect at all. My connection string is in the web.config file. I noticed that the sessionState in web.config is automatically generated with the standard sa blank pwd. I still can't connect even when I change this to the correct uid and pwd. Does anyone know what I need to do? My conn string's data source is "." Please help.

Thank you,
Tina

View 22 Replies View Related

Get ConnectionString From Web.config

Apr 6, 2006

I've defined my connection string in the web.config file:
<add name="RealtorXConnectionString" connectionString="Data Source=localhostSQLExpress;Initial Catalog=RealtorX;User ID=sa;password=welcome" providerName="System.Data.SqlClient" />
Now I want to get that string and use it in some code where I'm going to run a query against the database.  This query happens in PageLoad, and won't be bound to any UI component.   How can I replace XXXXX below with the value stored in web.config?
Dim strConnection As String = XXXXX
Dim cn As Data.SqlClient.SqlConnection = New Data.SqlClient.SqlConnection(strConnection)
cn.Open()

View 4 Replies View Related

DTEXEC /Config

Aug 6, 2007

This was directly from BOL.

/Conf[igFile] filespec

(Optional). Specifies a configuration file to extract values from. Using this option, you can set a run-time configuration that differs from the configuration that was specified at design time for the package. You can store different configuration settings in an XML configuration file and then load the settings before package execution by using the /ConfigFile option.

Does this mean that I can specify which configuration file to use during runtime?
Or is just because I'm too desperate for that, I understood that way

Thanks

View 14 Replies View Related

Get SQL Connection For SQL Config From XML

May 30, 2007

Hi

In toder to make my SSIS packages portable, I need to be able to set connection string to sql package configuration. I thought I can do that via XML package, problem is, at execution time SQL server package configuration is queried first, then variables from XML.
This way, I have no chance to set connection via XML.
Any ideas on how to aproach this ?
(I want to have as much configuration on SQL server so I can modify it easily from future GUI application.

best regards

View 4 Replies View Related

What Happens To Config On Import?

Feb 19, 2008

I have a simple SSIS Package where the Connections are specified in Configuration files, which was built locally and I wanted to deploy it to a server. Looking at the different options I decided to try the "Import Package..." from Management Studio (SSMS), since I have limited access to the server (and no access to the file system). It does appear to have imported the package from the local file system to the servers "SSIS Package Store".

My question is, what happened to the Configurations files when a package is imported?

When I "Run Package" from SSMS, the Execute Package Utility shows Connection Managers with only part of the connection info, but it executes just fine. Also, it shows no Configurations at all.

My impression is that during "import" the connection managers are created from a snapshot of the current Configurations, so what ends up in SSIS are static connection managers, not Configurations. However I can't seem to find any documentation one way or the other. Also, I suspect that the only reason the partial connection info actually works is due to dtexecUI (?) running locally under my own account.

Any information is greatly appreciated.

Thanks

View 3 Replies View Related

Config File Is Ignored

Mar 25, 2008

I have a simple SSIS package which includes one Analysis Services Processing Task. I have created a connection manager object (cmo) and assigned it to the AS task. Within the cmo I selected a specific user name and
password to log on to the server with. Tested this [domain][user account] and it works. Now here is the problem. When I run the package either in debug mode or from a command line, the packages ignores the connection manager and
attemps to use the account I am logged into the server with.

Using a config file to hold the credentials does not work either. When DTEXEC is used, the package attempts to use the credientials used to log in to the server.


Does anyone have any ideas why this is happening?

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved