sp_send_dbmail

Le
Don Juan
Hello all

I was running my application in my computer, the sp_send_email worked fine,
once I put this application in IIS 6.0 I receive this error message (see
bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database 'msdb',
schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database. To
add msdb users or groups to this role use SQL Server Management Studio or
execute the following statement for the user or role that needs to send
Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people uses
the application ussing the credentials creeated id ASP Configuration Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.
Vidéos High-Tech et Jeu Vidéo
Téléchargements
Vos réponses
Gagnez chaque mois un abonnement Premium avec GNT : Inscrivez-vous !
Trier par : date / pertinence
sloan
Le #18815041
I guess the user in your connection string to your database.





"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error message
(see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database 'msdb',
schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database. To
add msdb users or groups to this role use SQL Server Management Studio or
execute the following statement for the user or role that needs to send
Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP Configuration
Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.


Don Juan
Le #18816391
Here you have the connection string I use:
Data Source=server03;Initial Catalog=HR;Integrated Security=True

Log on to the server
Use Windows Authentication

How can I know the user?

Cheers

"sloan" news:
I guess the user in your connection string to your database.





"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error message
(see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database 'msdb',
schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database. To
add msdb users or groups to this role use SQL Server Management Studio or
execute the following statement for the user or role that needs to send
Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP Configuration
Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.






sloan
Le #18816761
Its the user who is logged in.

SELECT SYSTEM_USER

will tell you the name.






"Don Juan" news:
Here you have the connection string I use:
Data Source=server03;Initial Catalog=HR;Integrated Security=True

Log on to the server
Use Windows Authentication

How can I know the user?

Cheers

"sloan" news:
I guess the user in your connection string to your database.





"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error
message (see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database
'msdb', schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database.
To add msdb users or groups to this role use SQL Server Management
Studio or execute the following statement for the user or role that
needs to send Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP
Configuration Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.









sloan
Le #18816751
SELECT SYSTEM_USER

SELECT SUSER_SNAME()



when you say "Integrated Security=True", you're passing in the credentials
of the current logged in user (usually) OR the account that is running the
code.

If its a website, then it is probably running under the MyMachineASPNET
account.



Its VERY IMPORTANT you understand which account something is running. It
will cause deployment issues if you don't understand this.



Google this:

http://www.google.com/search?hl=en&q=sql+authentication+vs+windows+authentication&aq=3&oq=%22sql+auth

for a better understanding of how Sql Server deals with the methods.










"Don Juan" news:
Here you have the connection string I use:
Data Source=server03;Initial Catalog=HR;Integrated Security=True

Log on to the server
Use Windows Authentication

How can I know the user?

Cheers

"sloan" news:
I guess the user in your connection string to your database.





"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error
message (see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database
'msdb', schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database.
To add msdb users or groups to this role use SQL Server Management
Studio or execute the following statement for the user or role that
needs to send Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP
Configuration Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.









Don Juan
Le #18822181
Thanks!

"sloan" news:%

SELECT SYSTEM_USER

SELECT SUSER_SNAME()



when you say "Integrated Security=True", you're passing in the credentials
of the current logged in user (usually) OR the account that is running the
code.

If its a website, then it is probably running under the MyMachineASPNET
account.



Its VERY IMPORTANT you understand which account something is running. It
will cause deployment issues if you don't understand this.



Google this:

http://www.google.com/search?hl=en&q=sql+authentication+vs+windows+authentication&aq=3&oq=%22sql+auth

for a better understanding of how Sql Server deals with the methods.










"Don Juan" news:
Here you have the connection string I use:
Data Source=server03;Initial Catalog=HR;Integrated Security=True

Log on to the server
Use Windows Authentication

How can I know the user?

Cheers

"sloan" news:
I guess the user in your connection string to your database.





"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error
message (see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database
'msdb', schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database.
To add msdb users or groups to this role use SQL Server Management
Studio or execute the following statement for the user or role that
needs to send Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP
Configuration Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.













Alexander Osorio
Le #18825701
Hola, cuando se postea en este foro debería tener la gentileza de hacer el
esfuerzo y preguntar en "idioma español", nosotros cuando posteamos en otros
foros lo intentamos hacer en su propio idioma.
Gracias y disculpe.

"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error message
(see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database 'msdb',
schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database. To
add msdb users or groups to this role use SQL Server Management Studio or
execute the following statement for the user or role that needs to send
Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP Configuration
Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.


Don Juan
Le #18827031
Normalmente lo hago.
Sorry.

"Alexander Osorio" news:
Hola, cuando se postea en este foro debería tener la gentileza de hacer el
esfuerzo y preguntar en "idioma español", nosotros cuando posteamos en
otros foros lo intentamos hacer en su propio idioma.
Gracias y disculpe.

"Don Juan" news:
Hello all

I was running my application in my computer, the sp_send_email worked
fine, once I put this application in IIS 6.0 I receive this error message
(see bellow please).
Sys.WebForms.PageRequestManagerServerErrorException:
EXECUTE permission denied on object 'sp_send-dbmail', database 'msdb',
schema 'dbo'.

I googled and I found this: here:
http://msdn.microsoft.com/en-us/library/ms188719.aspx

To send Database mail, users must be a user in the msdb database and a
member of the DatabaseMailUserRole database role in the msdb database. To
add msdb users or groups to this role use SQL Server Management Studio or
execute the following statement for the user or role that needs to send
Database Mail.

EXEC msdb.dbo.sp_addrolemember @rolename = 'DatabaseMailUserRole'
,@membername = '<user or role name>';
GO

My question is: which role and user must I specify? knowing that people
uses the application ussing the credentials creeated id ASP Configuration
Tool?
They are no database users.
Must I specify an account in particular?

Thanks and kind regards.





Publicité
Poster une réponse
Anonyme