Articles in this section

Website hosted on Plesk is not working: Microsoft OLE DB Provider for SQL Server error '80004005'

Plesk for Windows kb: technical ABT: Group A

Applicable to:

  • Plesk for Windows

Symptoms

  • Unable to browse website hosted on Plesk. The following is shown instead of content: 

    PLESK_INFO: Microsoft OLE DB Provider for SQL Server error '80004005'
    Warning: Fatal error 9001 occurred at Dec 4 2017 2:41PM. Note the error and time, and contact your system administrator.
    /Default.asp, line 67

  • Cannot suspend Plesk reseller:

    C:\> C:\Program Files (x86)\Parallels\Plesk\admin\bin>reseller --off resellername
    Disable database user failed: mssqlmng failed: The log for database 'example.com_data' is not available. Check the event log for related error messages. Resolve any errors and restart the database.

  • Unable to add database user for the database dbname in Domains > example.com > Databases > User Management > Add Database User:

    PLESK_ERROR: Error: Connection to the database server has failed: The log for database 'dbname' is not available. Check the event log for related error messages. Resolve any errors and restart the database. (Error code 1)

  • Unable to export database dump in Domains > example.com > Databases > dbname > Export Dump:

    PLESK_ERROR: Source: System.Data

    Message: ExecuteNonQuery requires an open and available Connection. The connection's current state is closed.

    dbbackup.DbBackupException: Unable to backup database 'ARC_PIS' ---> System.Data.SqlClient.SqlException: Warning: Fatal error 9001 occurred at Dec 4 2017 2:41PM. Note the error and time, and contact your system administrator.
    BACKUP DATABASE is terminating abnormally.

Cause

Corrupted log file %plesk_dir%Databases\MSSQL\MSSQLXX.MSSQLSERVERXXXX\MSSQL\DATA\dbname.ldf.

Note: XX and XXXX correspond to the SQL Server version.

Resolution

  1. Connect to the server using RDP

  2. Determine SQL Server service name:

    C:\> sc query | findstr MSSQL | findstr SERVICE_NAME
    SERVICE_NAME: MSSQL$MSSQLSERVER2017
    SERVICE_NAME: MSSQLFDLauncher$MSSQLSERVER2017
    SERVICE_NAME: SQLTELEMETRY$MSSQLSERVER2017

  3. Stop SQL service:

    C:\> net stop MSSQL$MSSQLSERVER2017

  4. Rename log file %plesk_dir%Databases\MSSQL\MSSQLXX.MSSQLSERVERXXXX\MSSQL\DATA\dbname.ldf:

    C:\> move %plesk_dir%Databases\MSSQL\MSSQLXX.MSSQLSERVERXXXX\MSSQL\DATA\dbname.ldf %plesk_dir%Databases\MSSQL\MSSQLXX.MSSQLSERVERXXXX\MSSQL\DATA\dbname.ldf.bkp

  5. Start SQL Server:

    C:\> net start MSSQL$MSSQLSERVER2017

    Note: In order to find the root cause why the database log file got corrupted, contact Microsoft support.

In case the issue persists, re-enable the database
  1. Connect to the server via RDP

  2. Open Microsoft SQL Server Management Studio and log into affected SQL Server instance as Windows Administrator

  3. Execute the following queries through New Query:

    MYSQL_WIN: USE master
    GO
    ALTER DATABASE dbname
    SET OFFLINE WITH ROLLBACK IMMEDIATE
    GO
    USE MASTER
    GO
    ALTER DATABASE dbname
    SET ONLINE
    GO

Was this article helpful?

Comments

0 comments

Please sign in to leave a comment.