Forum Discussion

adilahmed's avatar
adilahmed
Frequent Visitor
1 year ago
Solved

Microsoft.Data.SqlClient.SqlException(0x80131904):User does not have permission Unable to create dbs

Hi,

I am trying to configure Reporting Services manager and creating database on a different server

I am using Domain Account as service account when i create databases i got below error

 

Microsoft.Data.SqlClient.SqlException (0x80131904): User does not have permission to perform this action.
at Microsoft.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction)
at Microsoft.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose)
at Microsoft.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady)
at Microsoft.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async, Int32 timeout, Boolean asyncWrite)
at Microsoft.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(TaskCompletionSource`1 completion, String methodName, Boolean sendToPipe, Int32 timeout, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry)
at Microsoft.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(SqlConnection conn, String script, ICommandWrapperFactory commandWrapper)
at Microsoft.ReportingServices.Common.DBUtils.ApplyScript(String connectionString, String script)
at ReportServicesConfigUI.SqlClientTools.SqlTools.ApplyScript(String connectionString, String script)
ClientConnectionId:a1cc11d70bf8a0c567
Error Number:15247,State:1,Class:16

  • Anonymous's avatar
    Anonymous
    1 year ago

    Hi, adilahmed 

    When creating the database, you are logging in with a SQL Server user connection at this step:


    This user needs to have the sysadmin role. If user does not have a sysadmin role, the following error will occur:

     

    Please login to SQL Server with sa or sqladmin.

    Go to Object Explorer.
    Expand Security --> Logins.

    You can find the currently logged in user and give it the “sysadmin” role:


    After creating the database you have the option of removing the sysadmin role from this user.

     

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
    Best Regards,
    Fen Ling,
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

4 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi, adilahmed 

    I am glad to help you.

     

    Please login to SQL Server with sa or sqladmin.

    Go to Object Explorer.
    Expand Security --> Logins.

    You can find the currently logged in user and give it the “sysadmin” role:


    Or
    Right Click on Login and select "New Login":

    Click on search and find that windows user which you are trying to install PBIRS.
    Under Server Role on the Left side assign this user as "sysadmin" role:

     

    In Report Server Configuration manager:

     

    Here are some official documentations, hope them help:

    Server-level roles - SQL Server | Microsoft Learn

     

     

    I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
    Best Regards,
    Fen Ling,
    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

     

     

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi, adilahmed 

        When creating the database, you are logging in with a SQL Server user connection at this step:


        This user needs to have the sysadmin role. If user does not have a sysadmin role, the following error will occur:

         

        Please login to SQL Server with sa or sqladmin.

        Go to Object Explorer.
        Expand Security --> Logins.

        You can find the currently logged in user and give it the “sysadmin” role:


        After creating the database you have the option of removing the sysadmin role from this user.

         

         

        I hope my suggestions give you good ideas, if you have any more questions, please clarify in a follow-up reply.
        Best Regards,
        Fen Ling,
        If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.