Error Installing the Session State Database

I am trying to setup SQL Session State database but encountered error as below:

An error occurred during the execution of the SQL file ‘InstallSqlState.sql’. The SQL error number is 229 and the SqlException message is: EXECUTE permission denied on object ’sp_delete_job’, database ‘msdb’, schema ‘dbo’.If the job does not exist, an error from msdb.dbo.sp_delete_job is expected.
SQL Server: sql2005.valuethai.com
Database: [vtdb_ss]
SQL file loaded:
InstallSqlState.sql
Commands failed:…

Here is the command run by me:
aspnet_regsql.exe -S [sqlservername] -U [userid] -P [userpassword] -ssadd -sstype c -d [customdatabase]

After doing some debugging, I manage to solve it by assigning enough rights to msdb database. Once I map msdb to db_owner/public, it works fine.

Posted in .Net, MS SQL.

Leave a Reply