Answered by:
Session DB

Question
-
Hi,
Need one help on sessiondb.
We need to create a sessiondb for our application and enable the newly created db to store session. We have followed the steps to create the db as provided in the below link.
http://www.codeproject.com/Articles/104082/Configuring-ASP-session-state-on-SQL-server
While following the steps as mentioned in the link we are getting below error.
Database: [ASPNETDB]
SQL file loaded:
InstallSqlState.sql
Commands failed:
/* Drop all tables, startup procedures, stored procedures and types. */
/* Drop the DeleteExpiredSessions_Job */
DECLARE @jobname nvarchar(200)
SET @jobname = N'ASPNETDB' + '_Job_DeleteExpiredSessions'
-- Delete the [local] job
-- We expected to get an error if the job doesn't exist.
PRINT 'If the job does not exist, an error from msdb.dbo.sp_delete_job is expected.'
EXECUTE msdb.dbo.sp_delete_job @job_name = @jobname
SQL Exception:
System.Data.SqlClient.SqlException (0x80131904): The EXECUTE permission was denied on the object 'sp_delete_job', database 'msdb', schema 'dbo'.
If the job does not exist, an error from msdb.dbo.sp_delete_job is expected.
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHa
ndler, TdsParserStateObject stateObj, Boolean& dataReady)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, B
oolean asyncWrite)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at System.Web.Management.SqlServices.ExecuteFile(String file, String server, String database, String dbFileName, SqlConnection connection, Boolean ses
sionState, Boolean isInstall, SessionStateType sessionStatetype)
ClientConnectionId:94d70d59-8faf-40b2-91f3-380d0fbbd61e
Please let me know how to resove this issue and create session DB to store session ID in sql server.I am using SQL server 2012.
Thanks,
Vijay
- Moved by Amanda Zhu Wednesday, September 3, 2014 8:33 AM
Tuesday, September 2, 2014 4:29 AM
Answers
-
Hi Vijay,
Welcome to MSDN forum.
Your issue is out of support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System and Visual Studio Editor.
I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
Because you make these work based on this CodeProject article: http://www.codeproject.com/Articles/104082/Configuring-ASP-session-state-on-SQL-server, this article allows people to add comments at the bottom of this page. I suggest you to consult your issue there. Maybe you can get better solution there.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Wednesday, September 3, 2014 8:32 AM -
Might try them here.
or in SQL Server forums here.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.Wednesday, September 3, 2014 9:33 AM
All replies
-
Hi Vijay,
Welcome to MSDN forum.
Your issue is out of support range of VS General Question forum which mainly discusses the usage of Visual Studio IDE such as WPF & SL designer, Visual Studio Guidance Automation Toolkit, Developer Documentation and Help System and Visual Studio Editor.
I am moving your question to the moderator forum ("Where is the forum for..?"). The owner of the forum will direct you to a right forum.
Because you make these work based on this CodeProject article: http://www.codeproject.com/Articles/104082/Configuring-ASP-session-state-on-SQL-server, this article allows people to add comments at the bottom of this page. I suggest you to consult your issue there. Maybe you can get better solution there.
Best regards,
We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
Click HERE to participate the survey.Wednesday, September 3, 2014 8:32 AM -
Might try them here.
or in SQL Server forums here.
http://social.msdn.microsoft.com/Forums/sqlserver/en-US/home?category=sqlserver
Regards, Dave Patrick ....
Microsoft Certified Professional
Microsoft MVP [Windows]
Disclaimer: This posting is provided "AS IS" with no warranties or guarantees , and confers no rights.Wednesday, September 3, 2014 9:33 AM