Unable to open SQL 2008 Instance after SP2 applied

  • Has anyone ever experienced this issue before? This past weekend the server team patched our Dev environment with SP2 for SQL2008. One box has both SQL 2005 and SQL 2008 instances installed. After patching the SQL 2008 instance with SP2 I am getting the following error msg when connecting. Any ideas, PLEASE?

    Login failed for user 'xxxx\xxxx' Reason: Server is in script upgrade mode. Only administrator can connect at this time.

    Error: 15174, Severity: 16, State: 1.

    2011-10-04 13:39:34.89 spid7s Login '##MS_PolicyEventProcessingLogin##' owns one or more database(s). Change the owner of the database(s) before dropping the login.

    2011-10-04 13:39:34.89 spid7s Error: 912, Severity: 21, State: 2.

    2011-10-04 13:39:34.89 spid7s Script level upgrade for database 'master' failed because upgrade step 'sqlagent100_msdb_upgrade.sql' encountered error 15174, state 1, severity 16. This is a serious error condition which might interfere with regular operation and the database will be taken offline. If the error happened during upgrade of the 'master' database, it will prevent the entire SQL Server instance from starting. Examine the previous errorlog entries for errors, take the appropriate corrective actions and re-start the database so that the script upgrade steps run to completion.

    2011-10-04 13:39:34.89 spid7s Error: 3417, Severity: 21, State: 3.

    2011-10-04 13:39:34.89 spid7s Cannot recover the master database. SQL Server is unable to run. Restore master from a full backup, repair it, or rebuild it. For more information about how to rebuild the master database, see SQL Server Books Online.

  • Have not seen this but obviously your install script encountered errors and did not complete. You need to try and find out why, although this may be one time deal.

    The probability of survival is inversely proportional to the angle of arrival.

  • The reason was that someone, for some strange reason, assigned the login '##MS_PolicyEventProcessingLogin##' to be the owner of a database. There's a way in the following article to get access to a server in upgrade. Fix the database ownership (set the db owner to sa) then repair the installation or reinstall the patch.

    http://blogs.msdn.com/b/psssql/archive/2008/09/10/upgrade-for-sql-server-2008-can-fail-if-you-have-renamed-the-sa-account.aspx

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Let me give it a shot. Thanks! I'll update in a few.

  • sqlcmd does not start for the 2008 instance. starts fine for the 2005 instance. is there anywhere I should check to see why this is not starting?

  • What do you mean 'doesn't start'?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • The net start command worked fine with the aforementioned switches but when I attempt to start sqlcmd it does not start. It acts like it doesn't exist.

    C:\Program Files\Microsoft SQL Server\100\Tools\Binn>sqlcmd

    HResult 0x2, Level 16, State 1

    Named Pipes Provider: Could not open a connection to SQL Server [2].

    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : A network-related or in

    stance-specific error has occurred while establishing a connection to SQL Server

    . Server is not found or not accessible. Check if instance name is correct and i

    f SQL Server is configured to allow remote connections. For more information see

    SQL Server Books Online..

    Sqlcmd: Error: Microsoft SQL Server Native Client 10.0 : Login timeout expired.

    C:\Program Files\Microsoft SQL Server\100\Tools\Binn>

  • Are you specifying the correct instance?

    Is the service running (net start doesn't guarantee that it did start, just that the start signal was sent)

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Yes. I also went into the directory of the instance and double clicked the sqlcmd icon. I get a black screen then just disappears. I really appreciate all your help. I feel that we are close if we can get the sqlcmd to execute. The service is started, it has been confirmed.

    net start mssql$<instancename> /f /T3608

  • I think you should be using the -A option with sqlcmd

    ---------------------------------------------------------------------

  • I attempted to use the following

    sqlcmd -E -A -Q"alter login [sys-admin] with name = sa"

    It not making the connection to the SQL instance.

  • I attempted to use the following

    sqlcmd -E -A -Q"alter login [sys-admin] with name = sa"

    It not making the connection to the SQL instance.

  • that would presume the default instance, is this a named instance?

    ---------------------------------------------------------------------

  • This is the named instance. I am running that from within the directory.

  • Directory is irrelevant, that is attempting to connect to the default instance because there's no -S parameter.

    sqlcmd /?

    Don't double-click the icon, that doesn't allow switches and options. Open a command window and run it from there.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic. Login to reply