Showing posts with label sqlexpress. Show all posts
Showing posts with label sqlexpress. Show all posts

Thursday, February 16, 2012

After Publish from VS2005 to IIS 5.1, SQLExpress doesnt work

I created an app in vs2005 and everything works perfectly in the development environment. I've published the site to my local IIS, but when I try to log in, it doesn't allow me. I'm assuming that it has something to do with the db not working correctly. Unfortunately I don't know how to debug to see where the problem is coming from now that it's running on my 'live' IIS. Does anyone have any ideas on what could be the problem. I have some settings in the web.config, which have been working perfectly.

<appSettings>
<addkey="UserName"value=""/>
<addkey="Password"value=""/>
<addkey="Server"value="xxxxxx\sqlexpress"/>
<addkey="Database"value="xxxxx_xxx_users"/>
<addkey="UseTrusted"value="True"/>
</appSettings>

I had a local guy at the office here saying that the ASP.NET user needs to be granted access to sqlexpress2005, but I wasn't sure on how to do that.

So all in all, My app works in Visual Studio 2005, and not in IIS. There are no errors when loading various pages. They all load correctly and without error. It seems that it's just when I try to do anything with the DB.

Thanks for the help. I appreciate it!

Have you modified you connection string to point to you IIS database? Are you sure that your provider support SQL express some of them provide space on Full SQL server.

Have you moved your database together with page to new server? If yes it is possible that because ASPNET user database is encrypted with machine specific key your IIS server key will not and you have no access to database.

And it is also true that if you use windows security your ASP account have to have login associated with it on SQL Server.

I hope that it helps a little,

Thanks

|||

Hey thanks for the reply.

Have you modified you connection string to point to you IIS database?
I have not modified the connection string because it is using the same database being used, thus why I don't know why this isn't working.

Are you sure that your provider support SQL express some of them provide space on Full SQL server.?
This is just on my local machine here, and yes, I'm using sqlexpress

Have you moved your database together with page to new server?
Yes, we tried it on our webserver, and the same thing happened

I am using an ASPNET 2.0 login control, but it creates an instance of my user class which authenticates the user directly from my sqlexpress db, which is used in the whole application, and then authenticates based on username and password.

I am using windows authentication.

Ok after doing a little authentication taking out, it turns out that the only thing not working is the login. All the other db queries work perfectly. It's just the login that is failing. I took a look at one of the tutorial videos and noticed that scott went into the ASP.NET Configuration page and created users and member groups there. Does that need to happen? It creates it's own database for users that's pretty locked down. I want to be able to use my own database I created.

Any ideas?

|||

Are all tables working one and login in the same databse? Does you user have rights to connect to them and select from them? does it has rights to excute your stored procedures connected to login?

Thanks

|||It turns out it was the aspnet user access in sql express. I gave the user permission and all is a go now. Thanks for the help!

Monday, February 13, 2012

After laptop goes into standby, SQLEXPRESS won't start

If my laptop goes into standby with the MSSQL$SQLEXPRESS service running, the service will not start again. I get the following error messages in my log:

2006-03-06 20:49:08.45 Server This instance of SQL Server last reported using a process ID of 1764 at 3/6/2006 1:48:21 PM (local) 3/6/2006 9:48:21 PM (UTC). This is an informational message only; no user action is required.

2006-03-06 20:49:08.45 Server Error: 17053, Severity: 16, State: 1.

2006-03-06 20:49:08.45 Server UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

2006-03-06 20:49:08.45 Server Registry startup parameters:

2006-03-06 20:49:08.45 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

2006-03-06 20:49:08.45 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

2006-03-06 20:49:08.45 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

2006-03-06 20:49:08.56 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

2006-03-06 20:49:08.56 Server Detected 1 CPUs. This is an informational message; no user action is required.

2006-03-06 20:49:09.32 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

2006-03-06 20:49:09.35 Server Database Mirroring Transport is disabled in the endpoint configuration.

2006-03-06 20:49:09.35 spid5s Starting up database 'master'.

2006-03-06 20:49:09.68 spid5s SQL Trace ID 1 was started by login "sa".

2006-03-06 20:49:09.76 spid5s Starting up database 'mssqlsystemresource'.

2006-03-06 20:49:10.03 spid5s Failed to check for new installation or a renamed server at startup. The logic for this check has failed unexpectedly. Run setup again, or fix the problematic registry key.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x1.

2006-03-06 20:49:10.03 Server Error: 17826, Severity: 18, State: 3.

2006-03-06 20:49:10.03 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.

2006-03-06 20:49:10.03 Server Error: 17120, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

Uninstalling, reinstalling and restoring the databases fixes the problem. Also, is there anyway to gracefully shut down the service on standby? Any help would be greatly appreciated.

Thanks,

David

Essentially this error below means that SQL no longer has access to it's registry keys.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

Error 0x5 means "Access Denied" most likely due to the instance no longer having access to its configuration info stored in the registry. Not sure why going into standby mode would trigger a change in the registry key security.

|||

I don't have this problem on my laptop which goes in and out of standby multiple times a day. This seems like it is probably deeper than just SQL. I'm trying to track down some additional info from the Windows team.

In the mean time, I've occationally seen "weird" behavior associated with a corrupt user profile. You might consider recreating your user profile and see if the problem goes away. Kind of a scatter gun approach, but it's fairly easy to check. Read the following KB articles for more about troubleshooting profiles:

http://support.microsoft.com/kb/305506/en-us

http://support.microsoft.com/kb/811151/en-us

Regards,

Mike Wachal
SQL Express team

|||

Change your SQL Express to logon as the System account, by default it logs on as the Network something or another account which is a total crapshoot as to whether that account can get to the registry.

Gandalf

http://gandalf.hudlow.net

|||gandalf is totally right. I had the same problem on every reboot until I changed the account to LOCAL SYSTEM. Now everything is kosher|||

Every time you install a SQL instance it will automatically grant itself access to the various registry keys that it needs access to. Even if the service is running under network service. So you should not need to run it under local system account to get access to the registry keys. Switching SQL to run under local system will give it carte blanc to read the registry which will solve a problem where setup probably failed to grant itself proper perms on the reg keys.

Perhaps something on your machine is locking down reg key permissions after SQLExpress is installed, this is all I can think of that could cause this issue.

|||Yeah, this is a pretty good demo of why the registry is both the best and worst idea in history :)

After laptop goes into standby, SQLEXPRESS won't start

If my laptop goes into standby with the MSSQL$SQLEXPRESS service running, the service will not start again. I get the following error messages in my log:

2006-03-06 20:49:08.45 Server This instance of SQL Server last reported using a process ID of 1764 at 3/6/2006 1:48:21 PM (local) 3/6/2006 9:48:21 PM (UTC). This is an informational message only; no user action is required.

2006-03-06 20:49:08.45 Server Error: 17053, Severity: 16, State: 1.

2006-03-06 20:49:08.45 Server UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

2006-03-06 20:49:08.45 Server Registry startup parameters:

2006-03-06 20:49:08.45 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

2006-03-06 20:49:08.45 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

2006-03-06 20:49:08.45 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

2006-03-06 20:49:08.56 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

2006-03-06 20:49:08.56 Server Detected 1 CPUs. This is an informational message; no user action is required.

2006-03-06 20:49:09.32 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

2006-03-06 20:49:09.35 Server Database Mirroring Transport is disabled in the endpoint configuration.

2006-03-06 20:49:09.35 spid5s Starting up database 'master'.

2006-03-06 20:49:09.68 spid5s SQL Trace ID 1 was started by login "sa".

2006-03-06 20:49:09.76 spid5s Starting up database 'mssqlsystemresource'.

2006-03-06 20:49:10.03 spid5s Failed to check for new installation or a renamed server at startup. The logic for this check has failed unexpectedly. Run setup again, or fix the problematic registry key.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x1.

2006-03-06 20:49:10.03 Server Error: 17826, Severity: 18, State: 3.

2006-03-06 20:49:10.03 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.

2006-03-06 20:49:10.03 Server Error: 17120, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

Uninstalling, reinstalling and restoring the databases fixes the problem. Also, is there anyway to gracefully shut down the service on standby? Any help would be greatly appreciated.

Thanks,

David

Essentially this error below means that SQL no longer has access to it's registry keys.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

Error 0x5 means "Access Denied" most likely due to the instance no longer having access to its configuration info stored in the registry. Not sure why going into standby mode would trigger a change in the registry key security.

|||

I don't have this problem on my laptop which goes in and out of standby multiple times a day. This seems like it is probably deeper than just SQL. I'm trying to track down some additional info from the Windows team.

In the mean time, I've occationally seen "weird" behavior associated with a corrupt user profile. You might consider recreating your user profile and see if the problem goes away. Kind of a scatter gun approach, but it's fairly easy to check. Read the following KB articles for more about troubleshooting profiles:

http://support.microsoft.com/kb/305506/en-us

http://support.microsoft.com/kb/811151/en-us

Regards,

Mike Wachal
SQL Express team

|||

Change your SQL Express to logon as the System account, by default it logs on as the Network something or another account which is a total crapshoot as to whether that account can get to the registry.

Gandalf

http://gandalf.hudlow.net

|||gandalf is totally right. I had the same problem on every reboot until I changed the account to LOCAL SYSTEM. Now everything is kosher|||

Every time you install a SQL instance it will automatically grant itself access to the various registry keys that it needs access to. Even if the service is running under network service. So you should not need to run it under local system account to get access to the registry keys. Switching SQL to run under local system will give it carte blanc to read the registry which will solve a problem where setup probably failed to grant itself proper perms on the reg keys.

Perhaps something on your machine is locking down reg key permissions after SQLExpress is installed, this is all I can think of that could cause this issue.

|||Yeah, this is a pretty good demo of why the registry is both the best and worst idea in history :)

After laptop goes into standby, SQLEXPRESS won't start

If my laptop goes into standby with the MSSQL$SQLEXPRESS service running, the service will not start again. I get the following error messages in my log:

2006-03-06 20:49:08.45 Server This instance of SQL Server last reported using a process ID of 1764 at 3/6/2006 1:48:21 PM (local) 3/6/2006 9:48:21 PM (UTC). This is an informational message only; no user action is required.

2006-03-06 20:49:08.45 Server Error: 17053, Severity: 16, State: 1.

2006-03-06 20:49:08.45 Server UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

2006-03-06 20:49:08.45 Server Registry startup parameters:

2006-03-06 20:49:08.45 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

2006-03-06 20:49:08.45 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

2006-03-06 20:49:08.45 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

2006-03-06 20:49:08.56 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

2006-03-06 20:49:08.56 Server Detected 1 CPUs. This is an informational message; no user action is required.

2006-03-06 20:49:09.32 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

2006-03-06 20:49:09.35 Server Database Mirroring Transport is disabled in the endpoint configuration.

2006-03-06 20:49:09.35 spid5s Starting up database 'master'.

2006-03-06 20:49:09.68 spid5s SQL Trace ID 1 was started by login "sa".

2006-03-06 20:49:09.76 spid5s Starting up database 'mssqlsystemresource'.

2006-03-06 20:49:10.03 spid5s Failed to check for new installation or a renamed server at startup. The logic for this check has failed unexpectedly. Run setup again, or fix the problematic registry key.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x1.

2006-03-06 20:49:10.03 Server Error: 17826, Severity: 18, State: 3.

2006-03-06 20:49:10.03 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.

2006-03-06 20:49:10.03 Server Error: 17120, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

Uninstalling, reinstalling and restoring the databases fixes the problem. Also, is there anyway to gracefully shut down the service on standby? Any help would be greatly appreciated.

Thanks,

David

Essentially this error below means that SQL no longer has access to it's registry keys.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

Error 0x5 means "Access Denied" most likely due to the instance no longer having access to its configuration info stored in the registry. Not sure why going into standby mode would trigger a change in the registry key security.

|||

I don't have this problem on my laptop which goes in and out of standby multiple times a day. This seems like it is probably deeper than just SQL. I'm trying to track down some additional info from the Windows team.

In the mean time, I've occationally seen "weird" behavior associated with a corrupt user profile. You might consider recreating your user profile and see if the problem goes away. Kind of a scatter gun approach, but it's fairly easy to check. Read the following KB articles for more about troubleshooting profiles:

http://support.microsoft.com/kb/305506/en-us

http://support.microsoft.com/kb/811151/en-us

Regards,

Mike Wachal
SQL Express team

|||

Change your SQL Express to logon as the System account, by default it logs on as the Network something or another account which is a total crapshoot as to whether that account can get to the registry.

Gandalf

http://gandalf.hudlow.net

|||gandalf is totally right. I had the same problem on every reboot until I changed the account to LOCAL SYSTEM. Now everything is kosher|||

Every time you install a SQL instance it will automatically grant itself access to the various registry keys that it needs access to. Even if the service is running under network service. So you should not need to run it under local system account to get access to the registry keys. Switching SQL to run under local system will give it carte blanc to read the registry which will solve a problem where setup probably failed to grant itself proper perms on the reg keys.

Perhaps something on your machine is locking down reg key permissions after SQLExpress is installed, this is all I can think of that could cause this issue.

|||Yeah, this is a pretty good demo of why the registry is both the best and worst idea in history :)

After laptop goes into standby, SQLEXPRESS won't start

If my laptop goes into standby with the MSSQL$SQLEXPRESS service running, the service will not start again. I get the following error messages in my log:

2006-03-06 20:49:08.45 Server This instance of SQL Server last reported using a process ID of 1764 at 3/6/2006 1:48:21 PM (local) 3/6/2006 9:48:21 PM (UTC). This is an informational message only; no user action is required.

2006-03-06 20:49:08.45 Server Error: 17053, Severity: 16, State: 1.

2006-03-06 20:49:08.45 Server UpdateUptimeRegKey: Operating system error 5(Access is denied.) encountered.

2006-03-06 20:49:08.45 Server Registry startup parameters:

2006-03-06 20:49:08.45 Server -d c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\master.mdf

2006-03-06 20:49:08.45 Server -e c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\LOG\ERRORLOG

2006-03-06 20:49:08.45 Server -l c:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\DATA\mastlog.ldf

2006-03-06 20:49:08.56 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

2006-03-06 20:49:08.56 Server Detected 1 CPUs. This is an informational message; no user action is required.

2006-03-06 20:49:09.32 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

2006-03-06 20:49:09.35 Server Database Mirroring Transport is disabled in the endpoint configuration.

2006-03-06 20:49:09.35 spid5s Starting up database 'master'.

2006-03-06 20:49:09.68 spid5s SQL Trace ID 1 was started by login "sa".

2006-03-06 20:49:09.76 spid5s Starting up database 'mssqlsystemresource'.

2006-03-06 20:49:10.03 spid5s Failed to check for new installation or a renamed server at startup. The logic for this check has failed unexpectedly. Run setup again, or fix the problematic registry key.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x1.

2006-03-06 20:49:10.03 Server Error: 17826, Severity: 18, State: 3.

2006-03-06 20:49:10.03 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.

2006-03-06 20:49:10.03 Server Error: 17120, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

Uninstalling, reinstalling and restoring the databases fixes the problem. Also, is there anyway to gracefully shut down the service on standby? Any help would be greatly appreciated.

Thanks,

David

Essentially this error below means that SQL no longer has access to it's registry keys.

2006-03-06 20:49:10.03 Server Error: 17182, Severity: 16, State: 1.

2006-03-06 20:49:10.03 Server TDSSNIClient initialization failed with error 0x5, status code 0x90.

Error 0x5 means "Access Denied" most likely due to the instance no longer having access to its configuration info stored in the registry. Not sure why going into standby mode would trigger a change in the registry key security.

|||

I don't have this problem on my laptop which goes in and out of standby multiple times a day. This seems like it is probably deeper than just SQL. I'm trying to track down some additional info from the Windows team.

In the mean time, I've occationally seen "weird" behavior associated with a corrupt user profile. You might consider recreating your user profile and see if the problem goes away. Kind of a scatter gun approach, but it's fairly easy to check. Read the following KB articles for more about troubleshooting profiles:

http://support.microsoft.com/kb/305506/en-us

http://support.microsoft.com/kb/811151/en-us

Regards,

Mike Wachal
SQL Express team

|||

Change your SQL Express to logon as the System account, by default it logs on as the Network something or another account which is a total crapshoot as to whether that account can get to the registry.

Gandalf

http://gandalf.hudlow.net

|||gandalf is totally right. I had the same problem on every reboot until I changed the account to LOCAL SYSTEM. Now everything is kosher
|||

Every time you install a SQL instance it will automatically grant itself access to the various registry keys that it needs access to. Even if the service is running under network service. So you should not need to run it under local system account to get access to the registry keys. Switching SQL to run under local system will give it carte blanc to read the registry which will solve a problem where setup probably failed to grant itself proper perms on the reg keys.

Perhaps something on your machine is locking down reg key permissions after SQLExpress is installed, this is all I can think of that could cause this issue.

|||Yeah, this is a pretty good demo of why the registry is both the best and worst idea in history :)