Friday, March 9, 2012

Restoring Master

We recently had a server go down completely and had to rebuild. One thing
that is different now on machine after restoring the databases is the
physical location. All databases are up and working fine, but after looking
at Master..sysdatabases I see some references that are not correct. I am not
sure if I should be concerned, but I just don't like seeing that the wrong
data.
If we run the following we see some database files that point to the
incorrect path, but if you look at the DB themselves it says the correct
place. My main concern is the master is one of them. Is there anything I
should do to correct this, what is the result of getting a wrong path for
FileName?
select *
from sysdatabases
By "wrong" do you mean that the entries in master.dbo.sysdatabases are not
the same as in <your DB>.dbo.sysfiles? You may be able to correct things by
detaching and reattaching the databases.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Andy" <andyjax@.newsgroup.nospam> wrote in message
news:%232Nog4FuFHA.904@.tk2msftngp13.phx.gbl...
We recently had a server go down completely and had to rebuild. One thing
that is different now on machine after restoring the databases is the
physical location. All databases are up and working fine, but after looking
at Master..sysdatabases I see some references that are not correct. I am not
sure if I should be concerned, but I just don't like seeing that the wrong
data.
If we run the following we see some database files that point to the
incorrect path, but if you look at the DB themselves it says the correct
place. My main concern is the master is one of them. Is there anything I
should do to correct this, what is the result of getting a wrong path for
FileName?
select *
from sysdatabases
|||Hi,
Before doing any thing just open the SQL Server Error log and look into the
entries during startup. If every thing
is good then just ignore. Incase if you have errors then detach the
databases which has got issues and then attach them back to
sql server.
Thanks
Hari
SQL Server MVP
"Andy" <andyjax@.newsgroup.nospam> wrote in message
news:%232Nog4FuFHA.904@.tk2msftngp13.phx.gbl...
> We recently had a server go down completely and had to rebuild. One thing
> that is different now on machine after restoring the databases is the
> physical location. All databases are up and working fine, but after
> looking at Master..sysdatabases I see some references that are not
> correct. I am not sure if I should be concerned, but I just don't like
> seeing that the wrong data.
> If we run the following we see some database files that point to the
> incorrect path, but if you look at the DB themselves it says the correct
> place. My main concern is the master is one of them. Is there anything I
> should do to correct this, what is the result of getting a wrong path for
> FileName?
> select *
> from sysdatabases
>
>
|||Yes your description is what I mean. The main question is that MASTER is one
of them, so I do not believe I can detach it, since it needs itself to know
the information.
Here is what I have:
D:\MSSQL\data\master.mdf - new location, we had forgotten the SQL server
was installed incorrectly initially
D:\MSSQL\MSSQL\data\master.mdf - old path that is showing up now in
sysdatabases filename and in sysdevices.
Sysdevices shows wrong path for master and model, tempdb is fine because we
have not moved it.
Everything seems to be working just fine, but thought we would ask in case
something were to come up in the future to bite us.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:eKJERLGuFHA.1472@.TK2MSFTNGP15.phx.gbl...
> By "wrong" do you mean that the entries in master.dbo.sysdatabases are not
> the same as in <your DB>.dbo.sysfiles? You may be able to correct things
> by
> detaching and reattaching the databases.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Andy" <andyjax@.newsgroup.nospam> wrote in message
> news:%232Nog4FuFHA.904@.tk2msftngp13.phx.gbl...
> We recently had a server go down completely and had to rebuild. One thing
> that is different now on machine after restoring the databases is the
> physical location. All databases are up and working fine, but after
> looking
> at Master..sysdatabases I see some references that are not correct. I am
> not
> sure if I should be concerned, but I just don't like seeing that the wrong
> data.
> If we run the following we see some database files that point to the
> incorrect path, but if you look at the DB themselves it says the correct
> place. My main concern is the master is one of them. Is there anything I
> should do to correct this, what is the result of getting a wrong path for
> FileName?
> select *
> from sysdatabases
>
>
|||Let me clarify something more here.
We had to restore a system completely. So after installing SQL and restoring
master SQL would not start up. The reason was due to the looking for system
databases that did not exist at where MASTER thought they were. We simply
created a folder structure like the old structure and placed the system
databases there and SQL restarted. We then went through and performed a
restore with move to get the paths updated to new location.
"Andy" <andyjax@.newsgroup.nospam> wrote in message
news:eKmNq0HuFHA.4032@.TK2MSFTNGP15.phx.gbl...
> Yes your description is what I mean. The main question is that MASTER is
> one of them, so I do not believe I can detach it, since it needs itself to
> know the information.
> Here is what I have:
> D:\MSSQL\data\master.mdf - new location, we had forgotten the SQL
> server was installed incorrectly initially
> D:\MSSQL\MSSQL\data\master.mdf - old path that is showing up now in
> sysdatabases filename and in sysdevices.
>
> Sysdevices shows wrong path for master and model, tempdb is fine because
> we have not moved it.
>
> Everything seems to be working just fine, but thought we would ask in case
> something were to come up in the future to bite us.
>
> "Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
> news:eKJERLGuFHA.1472@.TK2MSFTNGP15.phx.gbl...
>
|||Since you restored the old master DB, then this appears to be what you get.
It does not update the system database information. I wouldn't worry about
it. You could do surgery on the system tables - and accept the risks that
go with that.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinpub.com
..
"Andy" <andyjax@.newsgroup.nospam> wrote in message
news:eKmNq0HuFHA.4032@.TK2MSFTNGP15.phx.gbl...
Yes your description is what I mean. The main question is that MASTER is one
of them, so I do not believe I can detach it, since it needs itself to know
the information.
Here is what I have:
D:\MSSQL\data\master.mdf - new location, we had forgotten the SQL server
was installed incorrectly initially
D:\MSSQL\MSSQL\data\master.mdf - old path that is showing up now in
sysdatabases filename and in sysdevices.
Sysdevices shows wrong path for master and model, tempdb is fine because we
have not moved it.
Everything seems to be working just fine, but thought we would ask in case
something were to come up in the future to bite us.
"Tom Moreau" <tom@.dont.spam.me.cips.ca> wrote in message
news:eKJERLGuFHA.1472@.TK2MSFTNGP15.phx.gbl...
> By "wrong" do you mean that the entries in master.dbo.sysdatabases are not
> the same as in <your DB>.dbo.sysfiles? You may be able to correct things
> by
> detaching and reattaching the databases.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinpub.com
> .
> "Andy" <andyjax@.newsgroup.nospam> wrote in message
> news:%232Nog4FuFHA.904@.tk2msftngp13.phx.gbl...
> We recently had a server go down completely and had to rebuild. One thing
> that is different now on machine after restoring the databases is the
> physical location. All databases are up and working fine, but after
> looking
> at Master..sysdatabases I see some references that are not correct. I am
> not
> sure if I should be concerned, but I just don't like seeing that the wrong
> data.
> If we run the following we see some database files that point to the
> incorrect path, but if you look at the DB themselves it says the correct
> place. My main concern is the master is one of them. Is there anything I
> should do to correct this, what is the result of getting a wrong path for
> FileName?
> select *
> from sysdatabases
>
>

No comments:

Post a Comment