Error after moving system databases

  • Hi,

    We just had SQL installed by another company on our machine.

    But, as usual, we want to change the files' locations since they made a "default" install.

    I moved the tempdb data and log files, the master, model and msdb log files to another partition.

    Restarted SQL Server and ....

    ************** Exception Text **************

    System.NullReferenceException: Object reference not set to an instance of an object.

    got this fine message from SQL...

    Now the server doesn't start...

    The SQL Version is 10.0.1600...

    Will installing the SP1 and missing update solve the problem?

    Thanks,

    Pedro



    If you need to work better, try working less...

  • Hi Pedro,

    When you said moved the System Databases, did you follow the steps mentioned in MSDN about Moving System databases in SQL 2008. (Since there is a change in procedure from SQL 2005 to 2008)

    Follow the link http://msdn.microsoft.com/en-us/library/ms345408.aspx

    Also what does the SQL Server Error Log says?


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Can't open the SQL Server engine...

    The event log in windows says:

    FileMgr::StartLogFiles: Operating system error 2(failed to retrieve text for this error. Reason: 15100) occurred while creating or opening file 'E:\DBLogs\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.

    I made

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = tempdev, FILENAME = 'H:\TempDB\tempdb.mdf');

    GO

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = templog, FILENAME = 'E:\DBLogs\templog.ldf');

    GO

    Then I restarted SQL and worked fine.

    Then I made the changes on the Log file for master, model and msdb at the same time and made a restart...

    And that's the error in event log.. :S

    Pedro



    If you need to work better, try working less...

  • Which dbs did you move? Exactly what did you do to move each one?

    Find the SQL error log (it's a text file called ERRORLOG) and post the entire contents.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • I Understand you are unable to login to SQL Server, but I was asking to look in the Error Log File

    @ INSTANCE\MSSQL\LOG\ Location, may be that give more info.


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • hi,

    the log is

    2009-11-02 18:44:19.07 Server Microsoft SQL Server 2008 (SP1) - 10.0.2531.0 (X64)

    Mar 29 2009 10:11:52

    Copyright (c) 1988-2008 Microsoft Corporation

    Enterprise Edition (64-bit) on Windows NT 6.0 <X64> (Build 6002: Service Pack 2)

    2009-11-02 18:44:19.07 Server (c) 2005 Microsoft Corporation.

    2009-11-02 18:44:19.07 Server All rights reserved.

    2009-11-02 18:44:19.07 Server Server process ID is 3084.

    2009-11-02 18:44:19.07 Server System Manufacturer: 'IBM', System Model: 'BladeCenter HS22 -[7870ZRK]-'.

    2009-11-02 18:44:19.07 Server Authentication mode is MIXED.

    2009-11-02 18:44:19.07 Server Logging SQL Server messages in file 'F:\mssql\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG'.

    2009-11-02 18:44:19.07 Server This instance of SQL Server last reported using a process ID of 4448 at 02-11-2009 18:44:07 (local) 02-11-2009 18:44:07 (UTC). This is an informational message only; no user action is required.

    2009-11-02 18:44:19.07 Server Registry startup parameters:

    -d F:\mssql\MSSQL10.MSSQLSERVER\MSSQL\DATA\master.mdf

    -e F:\mssql\MSSQL10.MSSQLSERVER\MSSQL\Log\ERRORLOG

    -l F:\mssql\MSSQL10.MSSQLSERVER\MSSQL\DATA\mastlog.ldf

    2009-11-02 18:44:19.07 Server SQL Server is starting at normal priority base (=7). This is an informational message only. No user action is required.

    2009-11-02 18:44:19.07 Server Detected 16 CPUs. This is an informational message; no user action is required.

    2009-11-02 18:44:19.07 Server Cannot use Large Page Extensions: lock memory privilege was not granted.

    2009-11-02 18:44:19.18 Server Using dynamic lock allocation. Initial allocation of 2500 Lock blocks and 5000 Lock Owner blocks per node. This is an informational message only. No user action is required.

    2009-11-02 18:44:19.18 Server Lock partitioning is enabled. This is an informational message only. No user action is required.

    2009-11-02 18:44:19.23 Server Node configuration: node 0: CPU mask: 0x000000000000ff00 Active CPU mask: 0x000000000000ff00. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

    2009-11-02 18:44:19.23 Server Node configuration: node 1: CPU mask: 0x00000000000000ff Active CPU mask: 0x00000000000000ff. This message provides a description of the NUMA configuration for this computer. This is an informational message only. No user action is required.

    2009-11-02 18:44:19.26 spid9s Starting up database 'master'.

    2009-11-02 18:44:19.28 spid9s Resource governor reconfiguration succeeded.

    2009-11-02 18:44:19.28 spid9s SQL Server Audit is starting the audits. This is an informational message. No user action is required.

    2009-11-02 18:44:19.28 spid9s SQL Server Audit has started the audits. This is an informational message. No user action is required.

    2009-11-02 18:44:19.28 spid9s FILESTREAM: effective level = 0, configured level = 0, file system access share name = 'MSSQLSERVER'.

    2009-11-02 18:44:19.29 spid9s SQL Trace ID 1 was started by login "sa".

    2009-11-02 18:44:19.29 spid9s Starting up database 'mssqlsystemresource'.

    2009-11-02 18:44:19.29 spid9s The resource database build version is 10.00.2531. This is an informational message only. No user action is required.

    2009-11-02 18:44:19.31 spid13s Starting up database 'model'.

    2009-11-02 18:44:19.31 spid9s Server name is 'ADCLIPDB1'. This is an informational message only. No user action is required.

    2009-11-02 18:44:19.31 spid13s Error: 17207, Severity: 16, State: 1.

    2009-11-02 18:44:19.31 spid13s FileMgr::StartLogFiles: Operating system error 2(failed to retrieve text for this error. Reason: 15100) occurred while creating or opening file 'E:\DBLogs\modellog.ldf'. Diagnose and correct the operating system error, and retry the operation.

    2009-11-02 18:44:19.31 spid13s File activation failure. The physical file name "E:\DBLogs\modellog.ldf" may be incorrect.

    2009-11-02 18:44:19.31 spid13s Error: 945, Severity: 14, State: 2.

    2009-11-02 18:44:19.31 spid13s Database 'model' cannot be opened due to inaccessible files or insufficient memory or disk space. See the SQL Server errorlog for details.

    2009-11-02 18:44:19.31 spid13s Could not create tempdb. You may not have enough disk space available. Free additional disk space by deleting other files on the tempdb drive and then restart SQL Server. Check for additional errors in the event log that may indicate why the tempdb files could not be initialized.

    2009-11-02 18:44:19.31 spid13s SQL Trace was stopped due to server shutdown. Trace ID = '1'. This is an informational message only; no user action is required.

    I moved model and msdb, since the master is in the command line arguments.

    When I start using: NET START MSSQLSERVER /f /T3608

    the service starts but I can connect using sqlcmd, it says only admin may, but my account is admin and sa and thay don't work...

    Will a reinstall solve the problem? We don't have anything yet on the server, just SQL...

    Pedro



    If you need to work better, try working less...

  • It seems you are using Windows Server 2008.

    Did you check with the Windows Admin / Engineer about the Security permissions for the New location (New Drive where you are moving your System Databases).

    There are many new security restrictions introduced in Windows Server 2008 and I am guessing this has to do something with that.

    Also just a word of confirmation, Do you see the modellog.ldf in the Location ? If you see it exists,

    then My guess should be right, I had run into such issues sometime back.


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • I moved model and msdb, since the master is in the command line arguments.

    What do you mean by Master is in the command line arguments? Have you moved Master DB or not, in your first post you mentioned that you moved Master, Model and MSDB and in this you say you moved Model and MSDB.....

    Will a reinstall solve the problem? We don't have anything yet on the server, just SQL...

    If you reinstall the SQL Server the New Installation might work, but would you be able to Install to a newer location right away or again planning to install and move system DB's? The Former idea might be ok to try but latter would still possibly have the same issues.

    Just keep us posted whatever you do, wanted to know what happened..


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

  • Thanks,

    I'll try the permissions issue, but i don't think that's it since I moved the tempdb and worked fine.

    only had the problem after moving the other databases.

    yes, at first i moved master log file, but since it's in the command line argument and the file didn't moved, i "rolled back" that.

    now, when i start in master recovery-mode, it shows the error on the other databases' logs.

    Pedro



    If you need to work better, try working less...

  • Is there any issue with the location the model db log file was moved to? Drive ran out of free space? Permissions set to where the SQL service account does not have permissions? Located on a SAN that is having connection issues?

    Joie Andrew
    "Since 1982"

  • Nop. like I said it's fresh new installation on a blade server. 1 RAID1 with 400G for log, 1 RAID1 with 300G for tempdb and eventual transaction log backup, 1 RAID10 with 900G for data.

    The system databases where installed on RAID10, so, first i moved tempdb to log raid and tempdb raid without any trouble... so permissions is not an issue here.

    Then I moved model and msdb and got the error.

    I can start the instance in master recovery-mode, administrative connection, but I can connect with sqlcmd with any account (system administrator or SQL sa).

    Pedro



    If you need to work better, try working less...

  • We just repaired the installation and worked fine, but SQL put the model and msdb log files on the "original" directory...

    To move the msdb and model log file can I use the same procedure as to move the tempdb?

    I read the article and moving the master database is different.. but i doesn't mention model nor msdb.

    Thanks,

    Pedro



    If you need to work better, try working less...

  • Is "E:\DBLogs\modellog.ldf" the correct location of the model database log? If not, move the ldf file there.

    Again I ask, how did you move the system databases?

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • For the tempdb I made:

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = tempdev, FILENAME = 'H:\TempDB\tempdb.mdf');

    GO

    ALTER DATABASE tempdb

    MODIFY FILE (NAME = templog, FILENAME = 'E:\DBLogs\templog.ldf');

    GO

    Then I did a restart and worked fine.

    Then I made the same for model and msdb's log file and after restarting sql it gave the error.

    I want to move the log file to the log's raid but I'm afraid to crash SQL again. Is this the right way to do this or since model, msdb and master aren't very "heavy" databases it's ok to let the log on the same RAID as the data is?

    Pedro



    If you need to work better, try working less...

  • Regarding Gail's Question, you have not clearly described what steps did you perform to move the System Databases, you have copy pasted almost the same post that you posted yesterday, but something more detailed steps is what I too would like to see.

    System Database (Master, Model and MSDB) are not that heavily used, so I don't think you need to have Data and Log Files on different RAID, of course TempDB is supposed to be because if the extensive usage.


    Bru Medishetty

    Blog -- LearnSQLWithBru

    Join on Facebook Page Facebook.comLearnSQLWithBru

    Twitter -- BruMedishetty

Viewing 15 posts - 1 through 15 (of 24 total)

You must be logged in to reply to this topic. Login to reply