Twitter iPhone pliant OnePlus 11 PS5 Disney+ Orange Livebox Windows 11

sp_send_dbmail

7 réponses
Avatar
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.

7 réponses

Avatar
sloan
I guess the user in your connection string to your database.





"Don Juan" wrote in message
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.


Avatar
Don Juan
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" wrote in message
news:
I guess the user in your connection string to your database.





"Don Juan" wrote in message
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.






Avatar
sloan
Its the user who is logged in.

SELECT SYSTEM_USER

will tell you the name.






"Don Juan" wrote in message
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" wrote in message
news:
I guess the user in your connection string to your database.





"Don Juan" wrote in message
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.









Avatar
sloan
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" wrote in message
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" wrote in message
news:
I guess the user in your connection string to your database.





"Don Juan" wrote in message
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.









Avatar
Don Juan
Thanks!

"sloan" wrote in message
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" wrote in message
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" wrote in message
news:
I guess the user in your connection string to your database.





"Don Juan" wrote in message
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.













Avatar
Alexander Osorio
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" escribió en el mensaje de noticias
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.


Avatar
Don Juan
Normalmente lo hago.
Sorry.

"Alexander Osorio" wrote in message
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" escribió en el mensaje de noticias
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.