Showing posts with label restore. Show all posts
Showing posts with label restore. Show all posts

Friday, March 23, 2012

Reissue restore statement

I am trying to restore a database but i keep getting an eror message saying

"reissue restore statement using with replace to overwrite existing files."

How can I get around this problem to get my datatabsed restored? I am abit of a novice as well so i could do with some easy to understand instructions.

Thank you for your time

RESTORE DATABASE MyDb FROM <insert info here>
WITH REPLACE

The above will "get around" the problem you experience. Essentially you are OVERWRITING YOUR EXISTING DATABASE THOUGH so be careful!

Hope this helps -

Scott Whigham

Check out my SQL Server 2005 Video Tutorials: http://www.learnsqlserver.com/

|||

Cheers for the help scott.

Do i need to type that into a query? Also this bithere RESTORE DATABASE MyDb FROM <insert info here>

is this the destination of my backup for example mydocuments/testdb

Re-installing SQL SERVER

I have to install SQL Server onto a new PC and then restore the data from
tape backup to the new server.
Are there any special things I have to do...I have never done this before,
so I am unsure of the steps...
Basically, I will be doing this
Setup new PC
Install SQLSERVER
Make sure no server procedures are running on system startup
Restore databases from tape backup to new SQL SERVER build
Is there anything else I need to do? Delete MASTER.MDB?
Thx
read these two articles
http://support.microsoft.com/default...b;EN-US;224071
http://support.microsoft.com/default...b;EN-US;246133
it makes things a little simpler if you keep the exact same drive letter
and directory structure on your new server as on the old server.
Billy wrote:
> I have to install SQL Server onto a new PC and then restore the data from
> tape backup to the new server.
> Are there any special things I have to do...I have never done this before,
> so I am unsure of the steps...
> Basically, I will be doing this
> Setup new PC
> Install SQLSERVER
> Make sure no server procedures are running on system startup
> Restore databases from tape backup to new SQL SERVER build
> Is there anything else I need to do? Delete MASTER.MDB?
> Thx

Re-installing SQL SERVER

I have to install SQL Server onto a new PC and then restore the data from
tape backup to the new server.
Are there any special things I have to do...I have never done this before,
so I am unsure of the steps...
Basically, I will be doing this
Setup new PC
Install SQLSERVER
Make sure no server procedures are running on system startup
Restore databases from tape backup to new SQL SERVER build
Is there anything else I need to do? Delete MASTER.MDB?
Thxread these two articles
http://support.microsoft.com/default.aspx?scid=kb;EN-US;224071
http://support.microsoft.com/default.aspx?scid=kb;EN-US;246133
it makes things a little simpler if you keep the exact same drive letter
and directory structure on your new server as on the old server.
Billy wrote:
> I have to install SQL Server onto a new PC and then restore the data from
> tape backup to the new server.
> Are there any special things I have to do...I have never done this before,
> so I am unsure of the steps...
> Basically, I will be doing this
> Setup new PC
> Install SQLSERVER
> Make sure no server procedures are running on system startup
> Restore databases from tape backup to new SQL SERVER build
> Is there anything else I need to do? Delete MASTER.MDB?
> Thxsql

Re-installing SQL SERVER

I have to install SQL Server onto a new PC and then restore the data from
tape backup to the new server.
Are there any special things I have to do...I have never done this before,
so I am unsure of the steps...
Basically, I will be doing this
Setup new PC
Install SQLSERVER
Make sure no server procedures are running on system startup
Restore databases from tape backup to new SQL SERVER build
Is there anything else I need to do? Delete MASTER.MDB?
Thxread these two articles
http://support.microsoft.com/defaul...kb;EN-US;224071
http://support.microsoft.com/defaul...kb;EN-US;246133
it makes things a little simpler if you keep the exact same drive letter
and directory structure on your new server as on the old server.
Billy wrote:
> I have to install SQL Server onto a new PC and then restore the data from
> tape backup to the new server.
> Are there any special things I have to do...I have never done this before,
> so I am unsure of the steps...
> Basically, I will be doing this
> Setup new PC
> Install SQLSERVER
> Make sure no server procedures are running on system startup
> Restore databases from tape backup to new SQL SERVER build
> Is there anything else I need to do? Delete MASTER.MDB?
> Thx

Wednesday, March 21, 2012

Reinstalling DB Server - Backup/Restore Help

Hi,
Seems my old thread doesnt have any response anymore.
reposting it again with only relavent info..
For some reasons I need to reinstall my Production SQL
Server 2000 Database Server from OS level and infact
recreating arrays etc.
My point of Intrest is How to plan the backup of databases
from existing server to restore them after reinstallation.
1. Can I just create the .BAK files of user/system
databases copy it to other server and restore it on
freshly installed server.
or
2. I detach the user/system databases.. copy the .mdf
& .ldf files to other server and restore it on freshly
installed server using attach db sp.
In both cases what is the difference and what are the
advantages and disadvantages? and which one is followed in
practice?
Also, the server on which I am going to backup database
has SP3a for SQL Server.
Do I first need to up to date the SP's(2,3a) for SQL
server on fresh Installation then restore the Databases or
Vice-versa? (keeping in mind I want to restore the
master,msdb backups). Also does restoring masterdb backup
on fresh Installation makes any sense?
Thanks In advance for all the patience and replies.
Sincere Regards
ChipCheck these out:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scr...sp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB
Wizard issues
Andrew J. Kelly
SQL Server MVP
"Chip" <anonymous@.discussions.microsoft.com> wrote in message
news:d32b01c3ef36$ab9d21a0$a001280a@.phx.gbl...
> Hi,
> Seems my old thread doesnt have any response anymore.
> reposting it again with only relavent info..
> For some reasons I need to reinstall my Production SQL
> Server 2000 Database Server from OS level and infact
> recreating arrays etc.
> My point of Intrest is How to plan the backup of databases
> from existing server to restore them after reinstallation.
> 1. Can I just create the .BAK files of user/system
> databases copy it to other server and restore it on
> freshly installed server.
> or
> 2. I detach the user/system databases.. copy the .mdf
> & .ldf files to other server and restore it on freshly
> installed server using attach db sp.
> In both cases what is the difference and what are the
> advantages and disadvantages? and which one is followed in
> practice?
> Also, the server on which I am going to backup database
> has SP3a for SQL Server.
> Do I first need to up to date the SP's(2,3a) for SQL
> server on fresh Installation then restore the Databases or
> Vice-versa? (keeping in mind I want to restore the
> master,msdb backups). Also does restoring masterdb backup
> on fresh Installation makes any sense?
> Thanks In advance for all the patience and replies.
> Sincere Regards
> Chip
>

Reinstalling DB Server - Backup/Restore Help

Hi,
Seems my old thread doesnt have any response anymore.
reposting it again with only relavent info..
For some reasons I need to reinstall my Production SQL
Server 2000 Database Server from OS level and infact
recreating arrays etc.
My point of Intrest is How to plan the backup of databases
from existing server to restore them after reinstallation.
1. Can I just create the .BAK files of user/system
databases copy it to other server and restore it on
freshly installed server.
or
2. I detach the user/system databases.. copy the .mdf
& .ldf files to other server and restore it on freshly
installed server using attach db sp.
In both cases what is the difference and what are the
advantages and disadvantages? and which one is followed in
practice?
Also, the server on which I am going to backup database
has SP3a for SQL Server.
Do I first need to up to date the SP's(2,3a) for SQL
server on fresh Installation then restore the Databases or
Vice-versa? (keeping in mind I want to restore the
master,msdb backups). Also does restoring masterdb backup
on fresh Installation makes any sense?
Thanks In advance for all the patience and replies.
Sincere Regards
ChipCheck these out:
http://www.support.microsoft.com/?id=314546 Moving DB's between Servers
http://www.support.microsoft.com/?id=224071 Moving SQL Server Databases
to a New Location with Detach/Attach
http://support.microsoft.com/?id=221465 Using WITH MOVE in a
Restore
http://www.support.microsoft.com/?id=246133 How To Transfer Logins and
Passwords Between SQL Servers
http://www.support.microsoft.com/?id=298897 Mapping Logins & SIDs after a
Restore
http://www.dbmaint.com/SyncSqlLogins.asp Utility to map logins to
users
http://www.support.microsoft.com/?id=168001 User Logon and/or Permission
Errors After Restoring Dump
http://www.support.microsoft.com/?id=240872 How to Resolve Permission
Issues When a Database Is Moved Between SQL Servers
http://www.sqlservercentral.com/scripts/scriptdetails.asp?scriptid=599
Restoring a .mdf
http://www.support.microsoft.com/?id=307775 Disaster Recovery Articles
for SQL Server
http://www.support.microsoft.com/?id=274463 Copy DB
Wizard issues
Andrew J. Kelly
SQL Server MVP
"Chip" <anonymous@.discussions.microsoft.com> wrote in message
news:d32b01c3ef36$ab9d21a0$a001280a@.phx.gbl...
> Hi,
> Seems my old thread doesnt have any response anymore.
> reposting it again with only relavent info..
> For some reasons I need to reinstall my Production SQL
> Server 2000 Database Server from OS level and infact
> recreating arrays etc.
> My point of Intrest is How to plan the backup of databases
> from existing server to restore them after reinstallation.
> 1. Can I just create the .BAK files of user/system
> databases copy it to other server and restore it on
> freshly installed server.
> or
> 2. I detach the user/system databases.. copy the .mdf
> & .ldf files to other server and restore it on freshly
> installed server using attach db sp.
> In both cases what is the difference and what are the
> advantages and disadvantages? and which one is followed in
> practice?
> Also, the server on which I am going to backup database
> has SP3a for SQL Server.
> Do I first need to up to date the SP's(2,3a) for SQL
> server on fresh Installation then restore the Databases or
> Vice-versa? (keeping in mind I want to restore the
> master,msdb backups). Also does restoring masterdb backup
> on fresh Installation makes any sense?
> Thanks In advance for all the patience and replies.
> Sincere Regards
> Chip
>

re-install Windows, how to restore databases?

I have SQL Server 2000 running on Windows 2000 Professional, and need
to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
databases used for client development work. After upgrading Windows,
and re-installing SQL Server, how can I reconnect all of the existing
databases without too much work? I'd rather not have to backup, add,
and restore each one individually.How about scripting it. Write some TSQL using a cursor to loop sysdatabases and backup each
databases using dynamic SQL. Then use a similar way to restore based on the files in that directory.
For the restore part, you can use some of the code I have at:
http://www.karaszi.com/SQLServer/util_restore_all_in_file.asp
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<rgurganus@.citidc.com> wrote in message
news:1124991326.785503.210230@.f14g2000cwb.googlegroups.com...
>I have SQL Server 2000 running on Windows 2000 Professional, and need
> to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
> databases used for client development work. After upgrading Windows,
> and re-installing SQL Server, how can I reconnect all of the existing
> databases without too much work? I'd rather not have to backup, add,
> and restore each one individually.
>|||Hi,
You can detach the databases and Copy both Data and log files.
After reinstalling win2000 you can attach it back
regards,
--
Herbert
"rgurganus@.citidc.com" wrote:
> I have SQL Server 2000 running on Windows 2000 Professional, and need
> to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
> databases used for client development work. After upgrading Windows,
> and re-installing SQL Server, how can I reconnect all of the existing
> databases without too much work? I'd rather not have to backup, add,
> and restore each one individually.
>|||Yes, but with 64+ different databases, I was hoping to avoid detatching
each one, and re-attaching each one. I'm coming out of a MySQL
background, where this would be a piece of cake. You'd just copy the
whole data directory where all the database files are, and restart the
service. Oh well...|||Did you read my post?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<rgurganus@.citidc.com> wrote in message news:1125068039.740731.98460@.g49g2000cwa.googlegroups.com...
> Yes, but with 64+ different databases, I was hoping to avoid detatching
> each one, and re-attaching each one. I'm coming out of a MySQL
> background, where this would be a piece of cake. You'd just copy the
> whole data directory where all the database files are, and restart the
> service. Oh well...
>|||Yes, thanks. That may help. I'm just giving into dislike and bashing
of MS SQL in general. Systems should make things easier, not more
difficult. :(

re-install Windows, how to restore databases?

I have SQL Server 2000 running on Windows 2000 Professional, and need
to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
databases used for client development work. After upgrading Windows,
and re-installing SQL Server, how can I reconnect all of the existing
databases without too much work? I'd rather not have to backup, add,
and restore each one individually.
How about scripting it. Write some TSQL using a cursor to loop sysdatabases and backup each
databases using dynamic SQL. Then use a similar way to restore based on the files in that directory.
For the restore part, you can use some of the code I have at:
http://www.karaszi.com/SQLServer/uti...ll_in_file.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<rgurganus@.citidc.com> wrote in message
news:1124991326.785503.210230@.f14g2000cwb.googlegr oups.com...
>I have SQL Server 2000 running on Windows 2000 Professional, and need
> to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
> databases used for client development work. After upgrading Windows,
> and re-installing SQL Server, how can I reconnect all of the existing
> databases without too much work? I'd rather not have to backup, add,
> and restore each one individually.
>
|||Hi,
You can detach the databases and Copy both Data and log files.
After reinstalling win2000 you can attach it back
regards,
Herbert
"rgurganus@.citidc.com" wrote:

> I have SQL Server 2000 running on Windows 2000 Professional, and need
> to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
> databases used for client development work. After upgrading Windows,
> and re-installing SQL Server, how can I reconnect all of the existing
> databases without too much work? I'd rather not have to backup, add,
> and restore each one individually.
>
|||Yes, but with 64+ different databases, I was hoping to avoid detatching
each one, and re-attaching each one. I'm coming out of a MySQL
background, where this would be a piece of cake. You'd just copy the
whole data directory where all the database files are, and restart the
service. Oh well...
|||Did you read my post?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<rgurganus@.citidc.com> wrote in message news:1125068039.740731.98460@.g49g2000cwa.googlegro ups.com...
> Yes, but with 64+ different databases, I was hoping to avoid detatching
> each one, and re-attaching each one. I'm coming out of a MySQL
> background, where this would be a piece of cake. You'd just copy the
> whole data directory where all the database files are, and restart the
> service. Oh well...
>
|||Yes, thanks. That may help. I'm just giving into dislike and bashing
of MS SQL in general. Systems should make things easier, not more
difficult.

re-install Windows, how to restore databases?

I have SQL Server 2000 running on Windows 2000 Professional, and need
to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
databases used for client development work. After upgrading Windows,
and re-installing SQL Server, how can I reconnect all of the existing
databases without too much work? I'd rather not have to backup, add,
and restore each one individually.How about scripting it. Write some TSQL using a cursor to loop sysdatabases
and backup each
databases using dynamic SQL. Then use a similar way to restore based on the
files in that directory.
For the restore part, you can use some of the code I have at:
http://www.karaszi.com/SQLServer/ut...all_in_file.asp
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<rgurganus@.citidc.com> wrote in message
news:1124991326.785503.210230@.f14g2000cwb.googlegroups.com...
>I have SQL Server 2000 running on Windows 2000 Professional, and need
> to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
> databases used for client development work. After upgrading Windows,
> and re-installing SQL Server, how can I reconnect all of the existing
> databases without too much work? I'd rather not have to backup, add,
> and restore each one individually.
>|||Hi,
You can detach the databases and Copy both Data and log files.
After reinstalling win2000 you can attach it back
regards,
--
Herbert
"rgurganus@.citidc.com" wrote:

> I have SQL Server 2000 running on Windows 2000 Professional, and need
> to upgrade this to Windows 2000 Server. In SQL, I have 64 separate
> databases used for client development work. After upgrading Windows,
> and re-installing SQL Server, how can I reconnect all of the existing
> databases without too much work? I'd rather not have to backup, add,
> and restore each one individually.
>|||Yes, but with 64+ different databases, I was hoping to avoid detatching
each one, and re-attaching each one. I'm coming out of a MySQL
background, where this would be a piece of cake. You'd just copy the
whole data directory where all the database files are, and restart the
service. Oh well...|||Did you read my post?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
<rgurganus@.citidc.com> wrote in message news:1125068039.740731.98460@.g49g2000cwa.googlegroup
s.com...
> Yes, but with 64+ different databases, I was hoping to avoid detatching
> each one, and re-attaching each one. I'm coming out of a MySQL
> background, where this would be a piece of cake. You'd just copy the
> whole data directory where all the database files are, and restart the
> service. Oh well...
>|||Yes, thanks. That may help. I'm just giving into dislike and bashing
of MS SQL in general. Systems should make things easier, not more
difficult.

Tuesday, March 20, 2012

reinitializing subscriptions

We had some data become corrupt on our publisher and have to do a database
restore. Am I correct in thinking that after the restore I can just click
'reinitialize all subscriptions" and the snapshot and transactional
replication will clear out the old data and fill with the new data again at
the subscriber?
Partially. The reinitialze all subscriptions will mark the snapshots as
obsolete and the next time your snapshot agent runs the snapshot will be
generated and distributed to the subscribers.
Hilary Cotter
Looking for a SQL Server replication book?
Now available for purchase at:
http://www.nwsu.com/0974973602.html
"AW" <AW@.discussions.microsoft.com> wrote in message
news:6AA6434B-D32D-46DD-BCA2-8D22E0E7C0EA@.microsoft.com...
> We had some data become corrupt on our publisher and have to do a database
> restore. Am I correct in thinking that after the restore I can just click
> 'reinitialize all subscriptions" and the snapshot and transactional
> replication will clear out the old data and fill with the new data again
> at
> the subscriber?
|||On 2004-12-03, Hilary Cotter <hilary.cotter@.gmail.com> wrote:
> Partially. The reinitialze all subscriptions will mark the snapshots as
> obsolete and the next time your snapshot agent runs the snapshot will be
> generated and distributed to the subscribers.
Does that mean, for merge replication, that I'll have all the data on the
publisher resent to the subscriber? DROP table on the subscriber, recreate
it, and then apply the initial snapshot? Or that happens only when first
setting up the replication?
Mike
"I can do it quick. I can do it cheap. I can do it well. Pick any two."
Mario Splivalo
msplival@.jagor.srce.hr

Monday, March 12, 2012

re-index takes twoce as long on 2005..

Hi
I run a reindex of a 130GB dabase on SQL 2000 and it takes almost exactly 4
hours. IF I run exactly the same command on a 2005 box against a restore of
exactly the same database, it takes almost exactly 8 hours.
am I missing someting here? does a re-ind on 2005 work differently than on
2000? is it doing something twice that I havent asked it to, and that it must
be doing by default?
Any help would be appreciated.
ta
Hi,
Can you see if you have enough room in LDF file while doing the reindex in
SQL 2005. Otherwise the autogrow will happen
and slow down the reindex command...
Thanks
Hari
"Methodology" <Methodology@.discussions.microsoft.com> wrote in message
news:285AE110-BFF1-4CAF-88A6-616C2D8491C9@.microsoft.com...
> Hi
> I run a reindex of a 130GB dabase on SQL 2000 and it takes almost exactly
> 4
> hours. IF I run exactly the same command on a 2005 box against a restore
> of
> exactly the same database, it takes almost exactly 8 hours.
> am I missing someting here? does a re-ind on 2005 work differently than on
> 2000? is it doing something twice that I havent asked it to, and that it
> must
> be doing by default?
> Any help would be appreciated.
> ta
|||Ive tried 'alter index x rebuild' instead of 'dbcc dbreindex' and its
slightly more thsan an hour quicker on my largest table...I think therefore
problem solved.
ta
"Hari Prasad" wrote:

> Hi,
> Can you see if you have enough room in LDF file while doing the reindex in
> SQL 2005. Otherwise the autogrow will happen
> and slow down the reindex command...
> Thanks
> Hari
> "Methodology" <Methodology@.discussions.microsoft.com> wrote in message
> news:285AE110-BFF1-4CAF-88A6-616C2D8491C9@.microsoft.com...
>
>
|||They use exactly the same code. Is the hardware the same between 2000 and
2005, specifically number of CPUs and IO bandwidth?
Paul Randal
Lead Program Manager, Microsoft SQL Server Storage Engine
http://blogs.msdn.com/sqlserverstorageengine/default.aspx
This posting is provided "AS IS" with no warranties, and confers no rights.
"Methodology" <Methodology@.discussions.microsoft.com> wrote in message
news:F3B117CE-C3AF-4FCB-A328-A7FC66B7344B@.microsoft.com...[vbcol=seagreen]
> Ive tried 'alter index x rebuild' instead of 'dbcc dbreindex' and its
> slightly more thsan an hour quicker on my largest table...I think
> therefore
> problem solved.
> ta
> "Hari Prasad" wrote: