none
Distributor configuration error

    Question

  • Hi, Just go throught the toturial to configure a replication environment.

    However, I was blocked by distribution configure wizard, it always through an exception as follows:

    ===================================
    
    An error occurred configuring SQL Server Agent. (Configure Distribution Wizard)
    
    ===================================
    
    RegCreateKeyEx() returned error 5, 'Access is denied.' (.Net SqlClient Data Provider)
    
    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=22002&LinkId=20476
    
    ------------------------------
    Server Name: XXXXXX
    Error Number: 22002
    Severity: 16
    State: 1
    
    
    ------------------------------
    Program Location:
    
      at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
      at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
      at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
      at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
      at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
      at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
      at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
      at Microsoft.SqlServer.Management.UI.ReplicationSqlConnection.set_SqlAgentAutoStart(Boolean value)
      at Microsoft.SqlServer.Management.UI.ConfigureDistributionWizard.InstallDistributorThreadMethod()
    
    
    
    I am pretty sure that I have logged in with admin previledge and SQL Agent service is running under localsystem right. Can anyone help me out?
    Thursday, July 15, 2010 6:51 AM

Answers

  • Restart your SQL Server and SQL Server Agent services, your problem will be resolved

    If not follow the below instructions

    Hi Guys,

    I seem to have found the problem, the lady from Microsoft helped me to solve this problem, she was senational.
    Below is the method

    "It appears that the permission in some registry keys is even not granted to the local admin account on your side. Generally, to further troubleshoot the issue, I will suggest that you use Process Monitor to collect the file/registry usage when repro the "OS Error 5 – Access is denied":
    Process Monitor v1.35
    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

    How to use it

    1. Open Process Monitor to start the log collection
    2. Perform the change/operation in Management Studio
    3. When you got the same OS error 5, click Capture button to stop the log collection

    Then, you can check the captured log to see which necessary permission is missing for that account. "


    I found the reg key and added the SQL service Account. Restarted the Agent and now all works.

     


    Rajesh Kasturi Please click the Mark as Answer button if my post solves your problem.
    • Marked as answer by starry_we Thursday, July 15, 2010 8:54 AM
    Thursday, July 15, 2010 8:38 AM

All replies

  • Restart your SQL Server and SQL Server Agent services, your problem will be resolved

    If not follow the below instructions

    Hi Guys,

    I seem to have found the problem, the lady from Microsoft helped me to solve this problem, she was senational.
    Below is the method

    "It appears that the permission in some registry keys is even not granted to the local admin account on your side. Generally, to further troubleshoot the issue, I will suggest that you use Process Monitor to collect the file/registry usage when repro the "OS Error 5 – Access is denied":
    Process Monitor v1.35
    http://technet.microsoft.com/en-us/sysinternals/bb896645.aspx

    How to use it

    1. Open Process Monitor to start the log collection
    2. Perform the change/operation in Management Studio
    3. When you got the same OS error 5, click Capture button to stop the log collection

    Then, you can check the captured log to see which necessary permission is missing for that account. "


    I found the reg key and added the SQL service Account. Restarted the Agent and now all works.

     


    Rajesh Kasturi Please click the Mark as Answer button if my post solves your problem.
    • Marked as answer by starry_we Thursday, July 15, 2010 8:54 AM
    Thursday, July 15, 2010 8:38 AM
  • Thanks. I did not use this method and just do it with work around to solve this problem.

    I skipped configuring agent service to auto start in Management studio but set it using SQL Server Configuration Manager.

    Thursday, July 15, 2010 8:56 AM
  • Was struck with the same incident & was faulty where I started Agent service for the first time at the last stage of configuring replication wizard.
    Changes done -- started agent before configuring replication.


    @Kasturi Rajesh did you checked changing the Agent account from ConfigManager? Believe if should have applied the registry settings then.


    yup

    Monday, April 16, 2012 6:26 AM