Trouble trying to move mssqlsystemresource db

  • I think the safest bet is if I unistall and reinstall SQL Server.

    Am I correct in thinking that If I install SQL Server and change the default location for the databases to D: during install that this will overcome the potential problems associated with moving the system dbs? I could then simply move the Logs files(ldf) to the E:?

    Regards

    Carl

  • Absolutely Carl,  as you mention you will only need to move your logs from d: to e:

    Cheers,

    Mark

  • Resource db files can only moved to the path where master db files exists. Hence move the master db alter the startup parameters and then move the resource db to that folder, then start sql server it will work fine.

    As said by ED, it is better to keep both the db files in the default path as it wont grow huge.

  • Here's how I restored master database and then changed the location of all the system databases. I recycled SQL Server and it worked.

    sqlservr.exe -c -m

    Restore master database

    sqlcmd -E -SSHVBWQASDB01

    1> restore database master from disk='E:\Program Files\BMC Software\datatools\mb

    acktrack\temp\master_stripe.1'

    2> go

    Processed 376 pages for database 'master', file 'master' on file 1.

    Processed 3 pages for database 'master', file 'mastlog' on file 1.

    The master database has been successfully restored. Shutting down SQL Server.

    SQL Server is terminating this process.

    sqlservr.exe -c -m -f -T3608

    sqlcmd -E -SSHVBWQASDB01

    1> alter database mssqlsystemresource modify file(name=data,filename='E:\MSSQL_2

    005\MSSQL.1\MSSQL\Data\mssqlsystemresource.mdf'

    2> )

    3> go

    The file "data" has been modified in the system catalog. The new path will be us

    ed the next time the database is started.

    1> alter database mssqlsystemresource modify file(name=log,filename='E:\MSSQL_20

    05\MSSQL.1\MSSQL\Data\mssqlsystemresource.ldf')

    2> go

    The file "log" has been modified in the system catalog. The new path will be use

    d the next time the database is started.

    1> alter database model modify file(name=modeldev,filename='E:\MSSQL_2005\MSSQL.

    1\MSSQL\Data\model.mdf')

    2> go

    The file "modeldev" has been modified in the system catalog. The new path will b

    e used the next time the database is started.

    1> alter database model modify file(name=modellog,filename='E:\MSSQL_2005\MSSQL.

    1\MSSQL\Data\modellog.ldf')

    2> go

    The file "modellog" has been modified in the system catalog. The new path will b

    e used the next time the database is started.

    1> alter database tempdb modify file(name=tempdev,filename='N:\TEMPDB\tempdb.mdf

    ')

    2> go

    The file "tempdev" has been modified in the system catalog. The new path will be

    used the next time the database is started.

    1> alter database tempdb modify file(name=templog,filename='N:\TEMPDB\templog.ld

    f')

    2> go

    The file "templog" has been modified in the system catalog. The new path will be

    used the next time the database is started.

    1>

    1> alter database msdb modify file(name=MSDBData,filename='E:\MSSQL_2005\MSSQL.1

    \MSSQL\Data\msdbdata.mdf')

    2> go

    The file "MSDBData" has been modified in the system catalog. The new path will b

    e used the next time the database is started.

    1> alter database msdb modify file(name=MSDBLog,filename='E:\MSSQL_2005\MSSQL.1MSSQL\Data\msdblog.ldf')

    2> go

    The file "MSDBLog" has been modified in the system catalog. The new path will be

    used the next time the database is started.

    1>

Viewing 4 posts - 16 through 18 (of 18 total)

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