If I am restoring a database from a backup file on disk on Server_A to a
database on Server_B, in the restore syntax do I need to specify the "with
move" clause if the data and log files as backed up on Server_A are going to
be restored into differently named directories on Server_B?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
Here's an example of moving from one location to another.
restore database bar
from disk = 'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\foo.BAK'
with move 'fooData' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar.mdf',
move 'fooLog' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar_log.ldf',
UNLOAD ,
replace
"Robert Richards via droptable.com" wrote:
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
>
|||Hi,
If you are restoring the database into different directories which is
differing to source directory, then you have to say
with MOVE clause in RESTORE DATABASE command.
Syntax:-
RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.mdf',
MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.ldf', STATS=10
Thanks
Hari
SQL Server MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515E51CF9507A@.droptable.com...
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
> to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
|||Just curious, do the data files and such on the originating server remain
usable after the restore to the destination server? That is, I am creating a
backup of production for testing, and I of course want my production database
to remain.
Hari Prasad wrote:[vbcol=seagreen]
>Hi,
>If you are restoring the database into different directories which is
>differing to source directory, then you have to say
>with MOVE clause in RESTORE DATABASE command.
>Syntax:-
>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.mdf',
> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>Thanks
>Hari
>SQL Server MVP
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums...erver/200507/1
|||When you do a backup it essentially makes a pseudo copy. Nothing happens to
the original files at all.
Andrew J. Kelly SQL MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515FA18FA3868@.droptable.com...
> Just curious, do the data files and such on the originating server remain
> usable after the restore to the destination server? That is, I am creating
> a
> backup of production for testing, and I of course want my production
> database
> to remain.
> Hari Prasad wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forums...erver/200507/1
Showing posts with label adatabase. Show all posts
Showing posts with label adatabase. Show all posts
Monday, March 26, 2012
Restore to different server
If I am restoring a database from a backup file on disk on Server_A to a
database on Server_B, in the restore syntax do I need to specify the "with
move" clause if the data and log files as backed up on Server_A are going to
be restored into differently named directories on Server_B?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1Here's an example of moving from one location to another.
restore database bar
from disk = 'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\foo.BAK'
with move 'fooData' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar.mdf',
move 'fooLog' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar_log.ldf',
UNLOAD ,
replace
"Robert Richards via droptable.com" wrote:
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1
>|||Hi,
If you are restoring the database into different directories which is
differing to source directory, then you have to say
with MOVE clause in RESTORE DATABASE command.
Syntax:-
RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.mdf',
MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.ldf', STATS=10
Thanks
Hari
SQL Server MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515E51CF9507A@.droptable.com...
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
> to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1|||Just curious, do the data files and such on the originating server remain
usable after the restore to the destination server? That is, I am creating a
backup of production for testing, and I of course want my production databas
e
to remain.
Hari Prasad wrote:[vbcol=seagreen]
>Hi,
>If you are restoring the database into different directories which is
>differing to source directory, then you have to say
>with MOVE clause in RESTORE DATABASE command.
>Syntax:-
>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.mdf',
> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>Thanks
>Hari
>SQL Server MVP
>
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1|||When you do a backup it essentially makes a pseudo copy. Nothing happens to
the original files at all.
Andrew J. Kelly SQL MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515FA18FA3868@.droptable.com...
> Just curious, do the data files and such on the originating server remain
> usable after the restore to the destination server? That is, I am creating
> a
> backup of production for testing, and I of course want my production
> database
> to remain.
> Hari Prasad wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1sql
database on Server_B, in the restore syntax do I need to specify the "with
move" clause if the data and log files as backed up on Server_A are going to
be restored into differently named directories on Server_B?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1Here's an example of moving from one location to another.
restore database bar
from disk = 'c:\Program Files\Microsoft SQL Server\MSSQL\Backup\foo.BAK'
with move 'fooData' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar.mdf',
move 'fooLog' to 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\bar_log.ldf',
UNLOAD ,
replace
"Robert Richards via droptable.com" wrote:
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1
>|||Hi,
If you are restoring the database into different directories which is
differing to source directory, then you have to say
with MOVE clause in RESTORE DATABASE command.
Syntax:-
RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.mdf',
MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
Server\MSSQL\Data\NewNwind.ldf', STATS=10
Thanks
Hari
SQL Server MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515E51CF9507A@.droptable.com...
> If I am restoring a database from a backup file on disk on Server_A to a
> database on Server_B, in the restore syntax do I need to specify the "with
> move" clause if the data and log files as backed up on Server_A are going
> to
> be restored into differently named directories on Server_B?
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1|||Just curious, do the data files and such on the originating server remain
usable after the restore to the destination server? That is, I am creating a
backup of production for testing, and I of course want my production databas
e
to remain.
Hari Prasad wrote:[vbcol=seagreen]
>Hi,
>If you are restoring the database into different directories which is
>differing to source directory, then you have to say
>with MOVE clause in RESTORE DATABASE command.
>Syntax:-
>RESTORE DATABASE MyNwind FROM Disk='D:\Backup\MyNwind.BAK'
>WITH MOVE 'MyNwind' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.mdf',
> MOVE 'MyNwindLog1' TO 'c:\Program Files\Microsoft SQL
>Server\MSSQL\Data\NewNwind.ldf', STATS=10
>Thanks
>Hari
>SQL Server MVP
>
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...server/200507/1|||When you do a backup it essentially makes a pseudo copy. Nothing happens to
the original files at all.
Andrew J. Kelly SQL MVP
"Robert Richards via droptable.com" <forum@.droptable.com> wrote in message
news:515FA18FA3868@.droptable.com...
> Just curious, do the data files and such on the originating server remain
> usable after the restore to the destination server? That is, I am creating
> a
> backup of production for testing, and I of course want my production
> database
> to remain.
> Hari Prasad wrote:
>
> --
> Message posted via droptable.com
> http://www.droptable.com/Uwe/Forum...server/200507/1sql
Wednesday, March 21, 2012
Restore sql 2000 database .bak file to sql 2005
I am trying to restore a sql 2000 .bak file to a sql 2005. Error I get
is "
Restore failed for Server" - The backup set holds a backup of a
database other than the existing 'db name here ' database.
(Microsoft.SqlServer.Smo)
Pleawse help
Add WITH REPLACE to your RESTORE DATABASE statement if you want to restore
from a backup file of a different database.
Linchi
"CW" <wallacec@.gmail.com> wrote in message
news:1139442397.257269.102990@.g44g2000cwa.googlegr oups.com...
>I am trying to restore a sql 2000 .bak file to a sql 2005. Error I get
> is "
> Restore failed for Server" - The backup set holds a backup of a
> database other than the existing 'db name here ' database.
> (Microsoft.SqlServer.Smo)
> Pleawse help
>
|||RESTORE DATABASE DB_NAME_TO_BE_RESTORED
FROM DISK = 'F:\backupfilename.bak'
WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physical_Name_Data.mdf',
MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physical_Name_Log.ldf',
STATS = 1, REPLACE
GO
Thanks,
Sree
"Linchi Shea" wrote:
> Add WITH REPLACE to your RESTORE DATABASE statement if you want to restore
> from a backup file of a different database.
> Linchi
> "CW" <wallacec@.gmail.com> wrote in message
> news:1139442397.257269.102990@.g44g2000cwa.googlegr oups.com...
>
>
is "
Restore failed for Server" - The backup set holds a backup of a
database other than the existing 'db name here ' database.
(Microsoft.SqlServer.Smo)
Pleawse help
Add WITH REPLACE to your RESTORE DATABASE statement if you want to restore
from a backup file of a different database.
Linchi
"CW" <wallacec@.gmail.com> wrote in message
news:1139442397.257269.102990@.g44g2000cwa.googlegr oups.com...
>I am trying to restore a sql 2000 .bak file to a sql 2005. Error I get
> is "
> Restore failed for Server" - The backup set holds a backup of a
> database other than the existing 'db name here ' database.
> (Microsoft.SqlServer.Smo)
> Pleawse help
>
|||RESTORE DATABASE DB_NAME_TO_BE_RESTORED
FROM DISK = 'F:\backupfilename.bak'
WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physical_Name_Data.mdf',
MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physical_Name_Log.ldf',
STATS = 1, REPLACE
GO
Thanks,
Sree
"Linchi Shea" wrote:
> Add WITH REPLACE to your RESTORE DATABASE statement if you want to restore
> from a backup file of a different database.
> Linchi
> "CW" <wallacec@.gmail.com> wrote in message
> news:1139442397.257269.102990@.g44g2000cwa.googlegr oups.com...
>
>
Restore sql 2000 database .bak file to sql 2005
I am trying to restore a sql 2000 .bak file to a sql 2005. Error I get
is "
Restore failed for Server" - The backup set holds a backup of a
database other than the existing 'db name here ' database.
(Microsoft.SqlServer.Smo)
Pleawse helpAdd WITH REPLACE to your RESTORE DATABASE statement if you want to restore
from a backup file of a different database.
Linchi
"CW" <wallacec@.gmail.com> wrote in message
news:1139442397.257269.102990@.g44g2000cwa.googlegroups.com...
>I am trying to restore a sql 2000 .bak file to a sql 2005. Error I get
> is "
> Restore failed for Server" - The backup set holds a backup of a
> database other than the existing 'db name here ' database.
> (Microsoft.SqlServer.Smo)
> Pleawse help
>|||RESTORE DATABASE DB_NAME_TO_BE_RESTORED
FROM DISK = 'F:\backupfilename.bak'
WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physical_Name_Data.mdf',
MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physical_Name_Log.ldf',
STATS = 1, REPLACE
GO
Thanks,
Sree
"Linchi Shea" wrote:
> Add WITH REPLACE to your RESTORE DATABASE statement if you want to restore
> from a backup file of a different database.
> Linchi
> "CW" <wallacec@.gmail.com> wrote in message
> news:1139442397.257269.102990@.g44g2000cwa.googlegroups.com...
>
>
is "
Restore failed for Server" - The backup set holds a backup of a
database other than the existing 'db name here ' database.
(Microsoft.SqlServer.Smo)
Pleawse helpAdd WITH REPLACE to your RESTORE DATABASE statement if you want to restore
from a backup file of a different database.
Linchi
"CW" <wallacec@.gmail.com> wrote in message
news:1139442397.257269.102990@.g44g2000cwa.googlegroups.com...
>I am trying to restore a sql 2000 .bak file to a sql 2005. Error I get
> is "
> Restore failed for Server" - The backup set holds a backup of a
> database other than the existing 'db name here ' database.
> (Microsoft.SqlServer.Smo)
> Pleawse help
>|||RESTORE DATABASE DB_NAME_TO_BE_RESTORED
FROM DISK = 'F:\backupfilename.bak'
WITH MOVE 'Logical_Name_Data' TO 'F:\MSSQL\DATA\Physical_Name_Data.mdf',
MOVE 'Logical_Data_Log' TO 'E:\MSSQL\LOG\Physical_Name_Log.ldf',
STATS = 1, REPLACE
GO
Thanks,
Sree
"Linchi Shea" wrote:
> Add WITH REPLACE to your RESTORE DATABASE statement if you want to restore
> from a backup file of a different database.
> Linchi
> "CW" <wallacec@.gmail.com> wrote in message
> news:1139442397.257269.102990@.g44g2000cwa.googlegroups.com...
>
>
Subscribe to:
Posts (Atom)