none
Cannot rebuild system databases in 2008R2 RRS feed

  • Question

  • I'm trying to rebuild system databases, but after installing 2008 R2, this no longer work. Here is what I do:

    I open a command prompt in the below folder:
    C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2

    Here, I execute:
    SETUP /ACTION=REBUILDDATABASE /INSTANCENAME=a /SQLSYSADMINACCOUNTS=TK\Tibor /SAPWD=Pa$$w0rd /Q

    I get below error in the console window:
    The following error occurred:
    Exception has been thrown by the target of an invocation.

    Error result: 1152035024
    Result facility code: 1194
    Result error code: 43216

    Please review the summary.txt log for further details

    There is no trace of the rebuild in the summary.txt file.

    A folder *is* however created in the log directory for the rebuild (20100601_163136), and in here I have a file named Detail_ComponentUpdate.txt. In this file, I can find below errorr, which I believe is the root of the problem. Can anybody else perform rebuild? Any ideas or hints?

    2010-06-01 16:32:04 Slp: Running Action: ExecuteInitWorkflow
    2010-06-01 16:32:04 Slp: Workflow to execute: 'INITIALIZATION'
    2010-06-01 16:32:04 Slp: Error: Action "Microsoft.SqlServer.Configuration.BootstrapExtension.ExecuteWorkflowAction" threw an exception during execution.
    2010-06-01 16:32:04 Slp: Microsoft.SqlServer.Setup.Chainer.Workflow.ActionExecutionException: Exception has been thrown by the target of an invocation. ---> System.Reflection.TargetInvocationException: Exception has been thrown by the target of an invocation. ---> System.ArgumentNullException: Value cannot be null.
    2010-06-01 16:32:04 Slp: Parameter name: InstallMediaPath
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Configuration.MsiExtension.InitializeMsiExtension.set_InstallMediaPath(String value)
    2010-06-01 16:32:04 Slp:    --- End of inner exception stack trace ---
    2010-06-01 16:32:04 Slp:    at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    2010-06-01 16:32:04 Slp:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    2010-06-01 16:32:04 Slp:    at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Configuration.SetupExtension.ObjectDatastoreIntegration.SetInputSettingInputPropertiesOnObject(Object pendingObject, TextWriter loggingStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Configuration.SetupExtension.ActionDatastoreIntegration.SetPropertiesOnRunningAction(ActionKey key, TextWriter loggingStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionMetadata.NotifyInExecution(ActionKey actionRunning, TextWriter loggingStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue()
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Configuration.BootstrapExtension.ExecuteWorkflowAction.ExecuteAction(String actionId)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2010-06-01 16:32:04 Slp:    --- End of inner exception stack trace ---
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionWithRetryHelper(WorkflowObject metaDb, ActionKey action, ActionMetadata actionMetadata, TextWriter statusStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    2010-06-01 16:32:04 Slp:    at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    2010-06-01 16:32:05 Slp: Received request to add the following file to Watson reporting: C:\Users\Tibor\AppData\Local\Temp\tmpDD0E.tmp
    2010-06-01 16:32:05 Slp: The following is an exception stack listing the exceptions in outermost to innermost order
    2010-06-01 16:32:05 Slp: Inner exceptions are being indented
    2010-06-01 16:32:05 Slp:
    2010-06-01 16:32:05 Slp: Exception type: System.Reflection.TargetInvocationException
    2010-06-01 16:32:05 Slp:     Message:
    2010-06-01 16:32:05 Slp:         Exception has been thrown by the target of an invocation.
    2010-06-01 16:32:05 Slp:     Stack:
    2010-06-01 16:32:05 Slp:         at System.RuntimeMethodHandle._InvokeMethodFast(Object target, Object[] arguments, SignatureStruct& sig, MethodAttributes methodAttributes, RuntimeTypeHandle typeOwner)
    2010-06-01 16:32:05 Slp:         at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture, Boolean skipVisibilityChecks)
    2010-06-01 16:32:05 Slp:         at System.Reflection.RuntimeMethodInfo.Invoke(Object obj, BindingFlags invokeAttr, Binder binder, Object[] parameters, CultureInfo culture)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Configuration.SetupExtension.ObjectDatastoreIntegration.SetInputSettingInputPropertiesOnObject(Object pendingObject, TextWriter loggingStream)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Configuration.SetupExtension.ActionDatastoreIntegration.SetPropertiesOnRunningAction(ActionKey key, TextWriter loggingStream)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionMetadata.NotifyInExecution(ActionKey actionRunning, TextWriter loggingStream)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.InvokeAction(WorkflowObject metabase, TextWriter statusStream)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.PendingActions.InvokeActions(WorkflowObject metaDb, TextWriter loggingStream)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionEngine.RunActionQueue()
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.Workflow.RunWorkflow(WorkflowObject workflowObject, HandleInternalException exceptionHandler)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Configuration.BootstrapExtension.ExecuteWorkflowAction.ExecuteAction(String actionId)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Chainer.Infrastructure.Action.Execute(String actionId, TextWriter errorStream)
    2010-06-01 16:32:05 Slp:         at Microsoft.SqlServer.Setup.Chainer.Workflow.ActionInvocation.ExecuteActionHelper(TextWriter statusStream, ISequencedAction actionToRun)
    2010-06-01 16:32:05 Slp:     Inner exception type: System.ArgumentNullException
    2010-06-01 16:32:05 Slp:         Message:
    2010-06-01 16:32:05 Slp:                 Value cannot be null.
    2010-06-01 16:32:05 Slp:                 Parameter name: InstallMediaPath
    2010-06-01 16:32:05 Slp:         Stack:
    2010-06-01 16:32:05 Slp:                 at Microsoft.SqlServer.Configuration.MsiExtension.InitializeMsiExtension.set_InstallMediaPath(String value)
    2010-06-01 16:32:05 Slp: Watson Bucket 1
     Original Parameter Values


    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Tuesday, June 1, 2010 2:36 PM

Answers

  • Tibor,

    The issue is indeed reproroducible. I tested with SQL 2008 R2 on Win 2008 R2 x64. I have updated the connect site with the logs internally for further investigation. In the meantime, there is a workaround I found which can be used to rebuild the system databases in SQL 2008 R2.

    Workaround ==> Use the setup.exe from the media instead of the local setup.exe

    Let me know how this workaround goes for you.


    Prashant [MSFT] -- This posting is provided "AS IS" with no warranties, and confers no rights.
    Sunday, July 18, 2010 9:01 AM

All replies

  • Hello,

    Just a suggestion Tibor, please enclosed TK\Tibor with quotes “TK\Tibor”.

    Do the same with /SAPWD.

    Regards,

    Alberto Morillo
    SQLCoffee.com

    Tuesday, June 1, 2010 8:15 PM
    Moderator
  • Hi,

    I tired the steps you provided and also failed with the same error messages that logged into the setup log file. Based on the following SQL Server 2008 R2 document, I modify the directory to C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Release and then everything works.

    Rebuilding System Databases
    http://technet.microsoft.com/en-us/library/dd207003.aspx

    If you have any more questions, please let me know.
    Thanks.


    ***Xiao Min Tan***Microsoft Online Community***
    Wednesday, June 2, 2010 4:38 AM
    Moderator
  • Xiao-Min,

    Was it an R2 instance you did rebuild for? When I try running setup from your suggested path, I see that the version for the setup program is 10.00.2731.00. I.e., this is the setup program for SQL Server 2008, not 2008 R2. Running this version of the setup program failed for me (rebuilding an R2 instance), with below in console window:
    Error result: -2068643838
    Result facility code: 1203
    Result error code: 2

    And below is from the "Detail.txt" file (lots of below occurs in this file):
    2010-06-02 08:36:30 Slp: Package ID sql_tools_loc_Cpu64_1033: Discovery: Package version data are " Installed Version: 10.50.1600.1 MinVersion: 10.0.1443 MaxVersion: 10.50.0"
    2010-06-02 08:36:30 Slp: Package ID sql_tools_loc_Cpu64_1033: match result for Discovery - Version: False, Cpu: True, Language: True

    Above error is what lead me to run setup from the path I used, in the first place. My guess is that Books Online didn't update the path section for setup to reflect R2, and that there is a bug in the R2 setup program...

     


    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Wednesday, June 2, 2010 6:44 AM
  • Hi Alberto,

    Sorry, didn't help, I'm afraid. I also added the collation option, just in case, but that didn't help either... I have this feeling that we have a bug in setup so we can't do rebuild in R2.


    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Wednesday, June 2, 2010 6:48 AM
  • Hi,

    Based on my further research, it seems a bug. I give our product team your feedback at https://connect.microsoft.com/SQLServer/feedback/details/564905/rebuilding-system-databases-for-sql-server-2008-r2. You may also vote it and trace the issue.

    If you have any more questions, please let me know.
    Thanks.


    ***Xiao Min Tan***Microsoft Online Community***
    Thursday, June 3, 2010 8:30 AM
    Moderator
  • Thanks. I'm looking at the connect entry now. I will add my vote to it, with some additional details.
    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Thursday, June 3, 2010 8:40 AM
  • Hello,

    Check the following article How to Rebuild System databases in SQL Server 2008.

    Hope that helps!

    Cheers,
    Ashish

    Saturday, July 17, 2010 5:21 PM
  • Tibor,

    The issue is indeed reproroducible. I tested with SQL 2008 R2 on Win 2008 R2 x64. I have updated the connect site with the logs internally for further investigation. In the meantime, there is a workaround I found which can be used to rebuild the system databases in SQL 2008 R2.

    Workaround ==> Use the setup.exe from the media instead of the local setup.exe

    Let me know how this workaround goes for you.


    Prashant [MSFT] -- This posting is provided "AS IS" with no warranties, and confers no rights.
    Sunday, July 18, 2010 9:01 AM
  • Thanks for the feedback, Prashant. Good to know it is on the radar now. I missed the request for log files from Max, I'm afraid. My current workaround is to use off-line copy of system database files, but for that you need to plan ahead. Good to know you can use SETUP from install media. I'll add a note to my initial blog post on this, at http://sqlblog.com/blogs/tibor_karaszi/archive/2010/06/03/rebuilding-system-databases-in-2008-r2.aspx.
    Tibor Karaszi, SQL Server MVP | http://www.karaszi.com/sqlserver/default.asp | http://sqlblog.com/blogs/tibor_karaszi
    Sunday, July 18, 2010 12:00 PM
  • Great! waiting for your blog post to be updated with this info..
    Prashant [MSFT] -- This posting is provided "AS IS" with no warranties, and confers no rights.
    Monday, July 19, 2010 9:31 AM
  • Does this mean that I can use the SQL 2008 R2 media installation files (setup.exe) if this is stored locally on the server as apposed to accessing it straight from the DVD?
    Wednesday, September 1, 2010 11:32 PM
  • Looping Myself
    "SQLSERVER DBA" "INDIA"
    Tuesday, May 24, 2011 6:09 AM
  • Hi,

    I'm trying to change collation of SQL server 2008 R2.

    If I run setup from media (DVD) I get:

    D:\>setup /action=rebuilddatabase /instancename=mssqlserver sqlsysadminaccounts=
    temp_admin /sqlcollation=cyrillic_general_ci_as /q
    Microsoft (R) SQL Server 2008 R2 Setup 10.50.1600.01
    Copyright (c) Microsoft Corporation.  All rights reserved.
    The following error occurred:
    The state of your SQL Server installation was not changed after the setup execut
    ion. Please review the summary.txt logs for further details.
    Error result: -2068643838
    Result facility code: 1203
    Result error code: 2
    Please review the summary.txt log for further details

    If I run from "C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2" I get:

    C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\SQLServer2008R2>setup /action=rebuilddatabase /instancename=mssqlserver sqlsysadminaccounts=temp_admin /sqlcollation=cyrillic_general_ci_as /q Microsoft (R) SQL Server 2008 R2 Setup 10.50.1600.01 Copyright (c) Microsoft Corporation. All rights reserved. The following error occurred: Exception has been thrown by the target of an invocation. Error result: 1152035024 Result facility code: 1194 Result error code: 43216 Please review the summary.txt log for further details 

    What should I do?

    Thursday, May 31, 2012 2:05 PM
  • Don't run setup from C:\.... Read my initial post and you will see that you get the same error code as I did. Run it from the DVD. I suggest you open a new thread since you see that you gat a different error code, i.e., this is not the same issue as what this thread is about. (And, I suggest you do what the error say, check the summary.log to see if you have any further information.)

    Tibor Karaszi, SQL Server MVP | web | blog

    Thursday, May 31, 2012 2:38 PM
  • Friday, June 1, 2012 1:24 PM
    Moderator