Configure Database Mail – MSSQL

In the SSMS expand the “Management”, right click on “Database Mail” and choose “Configure Database Mail” from the context menu

img_595fa90be8132

Click on the “Next” button in the “Welcome” screen

img_595fad201d303

In the “Select Configuration Tasks” screen keep the default “Set up Database Mail by performing the following tasks:” and click on the “Next” button to continue

If the Database Mail is not activated yet the configuration will inform you and you’ll be able to activate it by clicking “Yes”

img_595faa3a3121e

To manually activate the “Database Mail” configure it by executing:

USE master
GO
sp_configure ‘show advanced options’,1
GO
RECONFIGURE WITH OVERRIDE
GO
sp_configure ‘Database Mail XPs’,1
GO
RECONFIGURE
GO

In the “New Profile” screen enter the profile name (eg. MailProfile1). Then click on the “Add” button to enter the email address and the mail server details

img_595fad96dcbfc

img_595fab65d976a

Click “OK” in the “Database Account” screen, and click on the “Next” button to continue.

In the “Message Profile Security” screen mark the MailProfie ad Public and click on the “Next” button

img_595fac7b6fcff

In the next screens just hit “Next” to continue.

Now we can test with simple body text:

use msdb
go
sp_send_dbmail
@profile_name=’MailProfile1′,
@recipients = ‘someuser@tempdomain.com’,
@body = ‘This is a body text’

Or send a query results by email:

use msdb
go
sp_send_dbmail
@profile_name=’MailProfile1′,
@recipients = ‘someuser@tempdomain.com’,
@body = ‘body’,
@execute_query_database = ‘msdb’,
@query = ‘SELECT subsystem_id FROM syssubsystems’

Solution Manager 7.2 SOLMAN_SETUP blank page

After a new installation of SAP Solution Manager 7.2 I executed the transaction SOLMAN_SETUP which opened a browser with the address: https://:50001/sap/public/myssocntl?sap-client=001 and I got an error 403 because the web service myssocntl is not active.

So with SICF I activate the myssocntl service and then tried again to executed the SOLMAN_SETUP transaction and now I got a blank screen.

Workaround:
Option 1:
Open the URL: https://:50001/sap/bc/webdynpro/sap/wd_sise_main_app?sap-client=001&sap-language=EN#

Option 2:
Add another ICM service in the instance profile parameter file:
icm/server_port_1 = PROT=HTTP,PORT=5$(SAPSYSTEM)00,TIMEOUT=60,PROCTIMEOUT=600
And make sure (with RZ11) that the parameter login/ticket_only_by_https = 0 (This will use HTTP if it’s defined instead of forcing HTTPS)
Then in SMICM restart the ICM and you’ll be able to execute SOLMAN_SETUP with HTTP.

Related SAP NOTES:
2322306 – SOLMAN_SETUP transaction redirects to wrong URL
2399816 – BRFplus workbench does not work, blank page is displayed
2460180 – SSO failed in transaction NWBC, SOAMANAGER, SOLMAN_SETUP, SM_WORKCENTER, DBACockpit etc.

SAP – Automatically unlock users due to incorrect password

This simple report will unlock all users who was locked due to password incorrect.

Schedule this report as a periodic job to make it automatically.

*&———————————————————————*
*& Report ZBC_UNLOCK_PWD
*&
*&———————————————————————*
*&This Program will Unlock users due to password incorrect
*&
*&———————————————————————*

REPORT ZBC_UNLOCK_PWD.
TABLES USR02.

*Unlock All users with password incorrect
UPDATE USR02 SET UFLAG = ‘0’
WHERE UFLAG = ‘128’.
COMMIT WORK.