Hi all
just a quick question for you. has anyone had any problems restoring a SQL7 database to a SQL server 2000?
is there anything special you have to do to get it working?
thanks for your time.
Andrew.it's ok i have had it all sorted. if the admins want to delete this thread it's ok by me :)
Showing posts with label special. Show all posts
Showing posts with label special. Show all posts
Friday, March 23, 2012
Tuesday, March 20, 2012
Restoring Master to get SQL login back
Hi Everyone, I'm hoping someone can help me.
We've had a SQL login deleted (special application one) and I understand the best way I can get it back, is to restore the Master database. Is this true ? All the manuals are working on the fact that Master has become corrupt & that it should be rebuilt before restoring. Ours is not corrupt, so am I ok to skip rebuilding it first ?
CheersI wouldn't do that in production environment, because you lose definition of all logins, linked servers, dbs etc. created after the backup you pick to restore. What about restoring master db on test server and using DTS Transfer Logins Task or script out the login and run the script on your server? mojza|||As to rebuild, you don't need to do that. Just restore master from backup over existing master. Look up How to restore the master database (Transact-SQL) topic in Books Online. mojza|||If you know the particulars of the login (name and password), it is much easier to re-add the login, rather than restore all of master. Assuming the user has been dropped as well (which Enterprise Manager cheerfully does for you), you would actually not get any benefit from restoring master, as all of the user's permissions in the application database would still be lost. Restoring the user's permissions is what is going to bog you down much more.
If the user was not deleted, then you can run sp_change_users_login to restore the link between the database user and the (new) login.
We've had a SQL login deleted (special application one) and I understand the best way I can get it back, is to restore the Master database. Is this true ? All the manuals are working on the fact that Master has become corrupt & that it should be rebuilt before restoring. Ours is not corrupt, so am I ok to skip rebuilding it first ?
CheersI wouldn't do that in production environment, because you lose definition of all logins, linked servers, dbs etc. created after the backup you pick to restore. What about restoring master db on test server and using DTS Transfer Logins Task or script out the login and run the script on your server? mojza|||As to rebuild, you don't need to do that. Just restore master from backup over existing master. Look up How to restore the master database (Transact-SQL) topic in Books Online. mojza|||If you know the particulars of the login (name and password), it is much easier to re-add the login, rather than restore all of master. Assuming the user has been dropped as well (which Enterprise Manager cheerfully does for you), you would actually not get any benefit from restoring master, as all of the user's permissions in the application database would still be lost. Restoring the user's permissions is what is going to bog you down much more.
If the user was not deleted, then you can run sp_change_users_login to restore the link between the database user and the (new) login.
Friday, March 9, 2012
restoring master
Are there any special considerations for restoring the master database, or i
s it just like restoring any other database?
TIA,
FredTo restore the master database, you need to first start the server in
single-user mode. You can do this from the command-prompt by changing to
the target instance Binn folder and entering the command below. See the
Books Online <coprompt.chm::/cp_sqlservr_4apa.htm> for additional arguments
you may need, like instance name.
sqlservr -c -m
This command will start SQL Server in the command window. You can then
execute your master database restore command using the OSQL command-line
utility or Query Analyzer. When the restore completes, SQL Server will
automatically shutdown and you can then start the service as normal.
Hope this helps.
Dan Guzman
SQL Server MVP
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred|||Hi,
1. Stop SQL Server
2. Execute the following command from a command prompt to start SQL
Serverin single user:
sqlservr -c -m
3. In SQL Server Query Analyzer, use the following to restore a backup of
the master database:
RESTORE DATABASE master FROM disk='d:\backup\master.bak'
WITH MOVE 'master' to 'd:\mssql\data\master.mdf',
MOVE 'mastlog' to 'd:\mssql\data\mastlog.ldf',
REPLACE
go
(Note:- Give the directory and drive letter based on ur setup)
4. SQL Server shuts down automatically after you restore the master
database. Now start the SQL Server
from Control Panel -- Services.
Thanks
Hari
MCDB
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
s it just like restoring any other database?
TIA,
FredTo restore the master database, you need to first start the server in
single-user mode. You can do this from the command-prompt by changing to
the target instance Binn folder and entering the command below. See the
Books Online <coprompt.chm::/cp_sqlservr_4apa.htm> for additional arguments
you may need, like instance name.
sqlservr -c -m
This command will start SQL Server in the command window. You can then
execute your master database restore command using the OSQL command-line
utility or Query Analyzer. When the restore completes, SQL Server will
automatically shutdown and you can then start the service as normal.
Hope this helps.
Dan Guzman
SQL Server MVP
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred|||Hi,
1. Stop SQL Server
2. Execute the following command from a command prompt to start SQL
Serverin single user:
sqlservr -c -m
3. In SQL Server Query Analyzer, use the following to restore a backup of
the master database:
RESTORE DATABASE master FROM disk='d:\backup\master.bak'
WITH MOVE 'master' to 'd:\mssql\data\master.mdf',
MOVE 'mastlog' to 'd:\mssql\data\mastlog.ldf',
REPLACE
go
(Note:- Give the directory and drive letter based on ur setup)
4. SQL Server shuts down automatically after you restore the master
database. Now start the SQL Server
from Control Panel -- Services.
Thanks
Hari
MCDB
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
restoring master
Are there any special considerations for restoring the master database, or is it just like restoring any other database?
TIA,
Fred
To restore the master database, you need to first start the server in
single-user mode. You can do this from the command-prompt by changing to
the target instance Binn folder and entering the command below. See the
Books Online <coprompt.chm::/cp_sqlservr_4apa.htm> for additional arguments
you may need, like instance name.
sqlservr -c -m
This command will start SQL Server in the command window. You can then
execute your master database restore command using the OSQL command-line
utility or Query Analyzer. When the restore completes, SQL Server will
automatically shutdown and you can then start the service as normal.
Hope this helps.
Dan Guzman
SQL Server MVP
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
|||Hi,
1. Stop SQL Server
2. Execute the following command from a command prompt to start SQL
Serverin single user:
sqlservr -c -m
3. In SQL Server Query Analyzer, use the following to restore a backup of
the master database:
RESTORE DATABASE master FROM disk='d:\backup\master.bak'
WITH MOVE 'master' to 'd:\mssql\data\master.mdf',
MOVE 'mastlog' to 'd:\mssql\data\mastlog.ldf',
REPLACE
go
(Note:- Give the directory and drive letter based on ur setup)
4. SQL Server shuts down automatically after you restore the master
database. Now start the SQL Server
from Control Panel -- Services.
Thanks
Hari
MCDB
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
TIA,
Fred
To restore the master database, you need to first start the server in
single-user mode. You can do this from the command-prompt by changing to
the target instance Binn folder and entering the command below. See the
Books Online <coprompt.chm::/cp_sqlservr_4apa.htm> for additional arguments
you may need, like instance name.
sqlservr -c -m
This command will start SQL Server in the command window. You can then
execute your master database restore command using the OSQL command-line
utility or Query Analyzer. When the restore completes, SQL Server will
automatically shutdown and you can then start the service as normal.
Hope this helps.
Dan Guzman
SQL Server MVP
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
|||Hi,
1. Stop SQL Server
2. Execute the following command from a command prompt to start SQL
Serverin single user:
sqlservr -c -m
3. In SQL Server Query Analyzer, use the following to restore a backup of
the master database:
RESTORE DATABASE master FROM disk='d:\backup\master.bak'
WITH MOVE 'master' to 'd:\mssql\data\master.mdf',
MOVE 'mastlog' to 'd:\mssql\data\mastlog.ldf',
REPLACE
go
(Note:- Give the directory and drive letter based on ur setup)
4. SQL Server shuts down automatically after you restore the master
database. Now start the SQL Server
from Control Panel -- Services.
Thanks
Hari
MCDB
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
restoring master
Are there any special considerations for restoring the master database, or is it just like restoring any other database
TIA
FredTo restore the master database, you need to first start the server in
single-user mode. You can do this from the command-prompt by changing to
the target instance Binn folder and entering the command below. See the
Books Online <coprompt.chm::/cp_sqlservr_4apa.htm> for additional arguments
you may need, like instance name.
sqlservr -c -m
This command will start SQL Server in the command window. You can then
execute your master database restore command using the OSQL command-line
utility or Query Analyzer. When the restore completes, SQL Server will
automatically shutdown and you can then start the service as normal.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred|||Hi,
1. Stop SQL Server
2. Execute the following command from a command prompt to start SQL
Serverin single user:
sqlservr -c -m
3. In SQL Server Query Analyzer, use the following to restore a backup of
the master database:
RESTORE DATABASE master FROM disk='d:\backup\master.bak'
WITH MOVE 'master' to 'd:\mssql\data\master.mdf',
MOVE 'mastlog' to 'd:\mssql\data\mastlog.ldf',
REPLACE
go
(Note:- Give the directory and drive letter based on ur setup)
4. SQL Server shuts down automatically after you restore the master
database. Now start the SQL Server
from Control Panel -- Services.
Thanks
Hari
MCDB
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
TIA
FredTo restore the master database, you need to first start the server in
single-user mode. You can do this from the command-prompt by changing to
the target instance Binn folder and entering the command below. See the
Books Online <coprompt.chm::/cp_sqlservr_4apa.htm> for additional arguments
you may need, like instance name.
sqlservr -c -m
This command will start SQL Server in the command window. You can then
execute your master database restore command using the OSQL command-line
utility or Query Analyzer. When the restore completes, SQL Server will
automatically shutdown and you can then start the service as normal.
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred|||Hi,
1. Stop SQL Server
2. Execute the following command from a command prompt to start SQL
Serverin single user:
sqlservr -c -m
3. In SQL Server Query Analyzer, use the following to restore a backup of
the master database:
RESTORE DATABASE master FROM disk='d:\backup\master.bak'
WITH MOVE 'master' to 'd:\mssql\data\master.mdf',
MOVE 'mastlog' to 'd:\mssql\data\mastlog.ldf',
REPLACE
go
(Note:- Give the directory and drive letter based on ur setup)
4. SQL Server shuts down automatically after you restore the master
database. Now start the SQL Server
from Control Panel -- Services.
Thanks
Hari
MCDB
"Fred" <anonymous@.discussions.microsoft.com> wrote in message
news:B3E3AAA1-5235-4A80-915A-3EE90D796A19@.microsoft.com...
> Are there any special considerations for restoring the master database, or
is it just like restoring any other database?
> TIA,
> Fred
Subscribe to:
Posts (Atom)