locked
SQL Express 2008 (the database principal owns a schema in the database, and cannot be dropped (microsoft sql server error 15138)) RRS feed

  • Question

  • when i try to remove the user Test123 i cet de error:

    ===================================

    Drop failed for User 'Test123'.  (Microsoft.SqlServer.Smo)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.1600.22+((SQL_PreRelease).080709-1414+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Drop+User&LinkId=20476

    ------------------------------
    Program Location:

       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.DropImpl()
       at Microsoft.SqlServer.Management.Smo.User.Drop()
       at Microsoft.SqlServer.Management.SqlManagerUI.DropObjects.DoDropObject(Int32 objectRowIndex)
       at Microsoft.SqlServer.Management.SqlManagerUI.DropObjects.DropAllObjects(Boolean stopOnError)

    ===================================

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

    ------------------------------
    Program Location:

       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
       at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.ExecuteNonQuery(StringCollection queries, Boolean includeDbContext)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.DropImplWorker(Urn& urn)
       at Microsoft.SqlServer.Management.Smo.SqlSmoObject.DropImpl()

    ===================================

    The database principal owns a schema in the database, and cannot be dropped. (.Net SqlClient Data Provider)

    ------------------------------
    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.1600&EvtSrc=MSSQLServer&EvtID=15138&LinkId=20476

    ------------------------------
    Server Name: TEST123\SQLEXPRESS
    Error Number: 15138
    Severity: 16
    State: 1
    Line Number: 2


    ------------------------------
    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.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)

     

    Friday, February 12, 2010 3:26 PM

Answers