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

Wednesday, March 28, 2012

Problem in Database Restore

Hi
I am facing the following issue when trying to restore a database from a log
in that has 'dbcreator' role.
While restore, i get the following error :
'Processed 104 pages for database 'Testsql', file 'TestSQL_Data' on file 1.
Processed 1 pages for database 'Testsql', file 'TestSQL_Log' on file 1.
Server: Msg 916, Level 14, State 1, Line 1
Server user 'TestSQl' is not a valid user in database 'Testsql'.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.'
If i login with a role of 'sysadmin', i find that the data has been restored
completely
but the link with the login and sysusers in the database has been broken.
The problem is that, i don't have the sysadmin role in the production server
and i have to restore my database with the 'dbcreator' role only.
Should i have the 'sysadmin' role for database restore to be complete?
With Thanks,
Jeyalakshmi.b> If i login with a role of 'sysadmin', i find that the data has been
restored completely
> but the link with the login and sysusers in the database has been broken.
This is normal when restoring/attaching a database from another server. You
can resync logins and users with sp_change_users_login. See the Books
Online <"tsqlref.chm::/ts_sp_ca-cz_8qzy.htm"> for details.

> The problem is that, i don't have the sysadmin role in the production
server
> and i have to restore my database with the 'dbcreator' role only.
>
To restore the database with only dbcreator, the login either needs to be
the original database owner or a user in the source database. Also, the
login's SID needs to be the same on both servers. The SID will be always be
the same on both servers with Windows authentication but not with SQL
authentication. With SQL authentication, you can specify the desired SQL
login SID with the sp_addlogin @.sid parameter.

> Should i have the 'sysadmin' role for database restore to be complete?
Restores are bit easier with sysadmin role membership since you don't have
sync the dbcreator login on both servers. However, it's not a requirement
to be a sysadmin role member as described above.
Hope this helps.
Dan Guzman
SQL Server MVP
"Jeyalakshmi" <anonymous@.discussions.microsoft.com> wrote in message
news:5D0837F5-2FB5-4899-89A4-B4FDA2B33F47@.microsoft.com...
> Hi
> I am facing the following issue when trying to restore a database from a
login that has 'dbcreator' role.
> While restore, i get the following error :
> 'Processed 104 pages for database 'Testsql', file 'TestSQL_Data' on file
1.
> Processed 1 pages for database 'Testsql', file 'TestSQL_Log' on file 1.
> Server: Msg 916, Level 14, State 1, Line 1
> Server user 'TestSQl' is not a valid user in database 'Testsql'.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.'
> If i login with a role of 'sysadmin', i find that the data has been
restored completely
> but the link with the login and sysusers in the database has been broken.
> The problem is that, i don't have the sysadmin role in the production
server
> and i have to restore my database with the 'dbcreator' role only.
> Should i have the 'sysadmin' role for database restore to be complete?
> With Thanks,
> Jeyalakshmi.b
>
>
>
>

Monday, March 26, 2012

problem in connecting to server after restore of master

Hi all,
even though sysdatabases contains a row with [name] = 'master' I get
the follwoing error message when sending commands to the db engine:
Msg 911, Level 16, State 1, Server BEQV288H, Line 1
Could not locate entry in sysdatabases for database 'master'. No entry
found
with that name. Make sure that the name is entered correctly.
Msg 2812, Level 16, State 62, Server BEQV288H, Line 1
Could not find stored procedure 'sp_attach_db'.
[DBNETLIB]ConnectionCheckForData (CheckforData()).
[DBNETLIB]General network error. Check your network documentation.
What can I do?
Thanks a lot in advance
DanielHi
Did you follow the below rules?
1. Stop MSSQLServer and SQLServerAgent services.
2. From a command prompt, enter this command:
sqlservr.exe -m
3. Run Enterprise Manager to restore the master database from the backup
SQL Server 2005
C:\> sqlcmd
1> RESTORE DATABASE master FROM DISK = 'c:\foldername\master.bak';
2> GO<danielsanberger@.googlemail.com> wrote in message
news:1159957373.692230.161640@.m73g2000cwd.googlegroups.com...
> Hi all,
> even though sysdatabases contains a row with [name] = 'master' I get
> the follwoing error message when sending commands to the db engine:
> Msg 911, Level 16, State 1, Server BEQV288H, Line 1
> Could not locate entry in sysdatabases for database 'master'. No entry
> found
> with that name. Make sure that the name is entered correctly.
> Msg 2812, Level 16, State 62, Server BEQV288H, Line 1
> Could not find stored procedure 'sp_attach_db'.
> [DBNETLIB]ConnectionCheckForData (CheckforData()).
> [DBNETLIB]General network error. Check your network documentation.
> What can I do?
> Thanks a lot in advance
> Daniel
>|||Hi Uri,
yes I did, though it is SQL Server 2000. Then I started in sqlservr -c
-f -T3608 mode cause the master db comes from a different system
environment and I have to change some system entries in sysaltfiles and
detach some databases.
I tried this before in Windows Server 2003 environment and now I try to
do it in Windows Server 2000 environment.
Greetings
Daniel
Uri Dimant schrieb:
> Hi
> Did you follow the below rules?
> 1. Stop MSSQLServer and SQLServerAgent services.
> 2. From a command prompt, enter this command:
> sqlservr.exe -m
> 3. Run Enterprise Manager to restore the master database from the backup
>
> SQL Server 2005
> C:\> sqlcmd
> 1> RESTORE DATABASE master FROM DISK = 'c:\foldername\master.bak';
> 2> GO<danielsanberger@.googlemail.com> wrote in message
> news:1159957373.692230.161640@.m73g2000cwd.googlegroups.com...
> > Hi all,
> >
> > even though sysdatabases contains a row with [name] = 'master' I get
> > the follwoing error message when sending commands to the db engine:
> >
> > Msg 911, Level 16, State 1, Server BEQV288H, Line 1
> > Could not locate entry in sysdatabases for database 'master'. No entry
> > found
> > with that name. Make sure that the name is entered correctly.
> > Msg 2812, Level 16, State 62, Server BEQV288H, Line 1
> > Could not find stored procedure 'sp_attach_db'.
> > [DBNETLIB]ConnectionCheckForData (CheckforData()).
> > [DBNETLIB]General network error. Check your network documentation.
> >
> > What can I do?
> >
> > Thanks a lot in advance
> > Daniel
> >

Wednesday, March 21, 2012

Problem having to restore tlogs WITH MOVE

I have a database i am m oving to another server, during the process I am
moving the data and log files to another drive.(Which I have done countless
times before with no problems)
The problem I am having is after I restore the database using the following
statement :
RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
WITH STANDBY = 'D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\Databasename\databas
ename.STANDBY'
,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\Databasename_Data.mdf'
,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\Databasename_Log.ndf'
I get these errors when trying to restore transaction logs :
[SQLSTATE 42000] (Error 3156) Device activation error. The physical fil
e
name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
may be incorrect.
[SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restore
d to
'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
WITH MOVE to identify a valid location for the file.
Has anyone encountered the same problem? This has me stumped, although
restoring the tlog with move, and standby works...this is not how it should
happen.
--
Senior SQL Server DBAHi,
What is the process u are following to move.
I mean to say that do u move the database (mdf and ldf) with move
option or u just copy it from one location to the other.
Ur logfile may be corrept while copiying .
Use with move option to move the files.
from
Doller
Clint Pugh wrote:
> I have a database i am m oving to another server, during the process I am
> moving the data and log files to another drive.(Which I have done countles
s
> times before with no problems)
> The problem I am having is after I restore the database using the followin
g
> statement :
> RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> WITH STANDBY = 'D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\Databasename\databas
ename.STANDBY'
> ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Data.mdf'
> ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Log.ndf'
> I get these errors when trying to restore transaction logs :
> [SQLSTATE 42000] (Error 3156) Device activation error. The physical f
ile
> name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ld
f'
> may be incorrect.
> [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be resto
red to
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. U
se
> WITH MOVE to identify a valid location for the file.
> Has anyone encountered the same problem? This has me stumped, although
> restoring the tlog with move, and standby works...this is not how it shou
ld
> happen.
> --
> Senior SQL Server DBA|||Hi,
If u are moving the tlog also then u can use something like this
USE master
GO
-- First determine the number and names of the files in the backup.
RESTORE FILELISTONLY
FROM MyNwind_1
-- Restore the files for MyNwind.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH NORECOVERY,
MOVE 'MyNwind_data_1' TO 'D:\MyData\MyNwind_data_1.mdf',
MOVE 'MyNwind_data_2' TO 'D:\MyData\MyNwind_data_2.ndf'
GO
-- Apply the first transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH NORECOVERY
GO
-- Apply the last transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH RECOVERY
GO
TO know more pls read move database in BOL
hope this helps u
from
Doller|||The files are being copied using SCP, this is required because of firewall
rules.
The TRN files are the restored to the DR Database.
This is working fine for 2 other databases on the same server.
--
Senior SQL Server DBA
"doller" wrote:

> Hi,
> What is the process u are following to move.
> I mean to say that do u move the database (mdf and ldf) with move
> option or u just copy it from one location to the other.
> Ur logfile may be corrept while copiying .
> Use with move option to move the files.
> from
> Doller
>
> Clint Pugh wrote:
>|||Seems like SQL Server cannot create the database file names you have specifi
ed. Perhaps the service
account don't have permissions, or that the file names are already in use by
some other database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Clint Pugh" <clintp@.datacom.co.nz> wrote in message
news:E8BAE427-D016-4117-B562-566171F0EE2F@.microsoft.com...
>I have a database i am m oving to another server, during the process I am
> moving the data and log files to another drive.(Which I have done countles
s
> times before with no problems)
> The problem I am having is after I restore the database using the followin
g
> statement :
> RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> WITH STANDBY = 'D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\Databasename\databas
ename.STANDBY'
> ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Data.mdf'
> ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Log.ndf'
> I get these errors when trying to restore transaction logs :
> [SQLSTATE 42000] (Error 3156) Device activation error. The physical f
ile
> name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ld
f'
> may be incorrect.
> [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be resto
red to
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. U
se
> WITH MOVE to identify a valid location for the file.
> Has anyone encountered the same problem? This has me stumped, although
> restoring the tlog with move, and standby works...this is not how it shou
ld
> happen.
> --
> Senior SQL Server DBA

Problem having to restore tlogs WITH MOVE

I have a database i am m oving to another server, during the process I am
moving the data and log files to another drive.(Which I have done countless
times before with no problems)
The problem I am having is after I restore the database using the following
statement :
RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
WITH STANDBY = 'D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\Databasename\databasename.STAN DBY'
,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\Databasename_Data.mdf'
,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\Databasename_Log.ndf'
I get these errors when trying to restore transaction logs :
[SQLSTATE 42000] (Error 3156) Device activation error. The physical file
name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
may be incorrect.
[SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
WITH MOVE to identify a valid location for the file.
Has anyone encountered the same problem? This has me stumped, although
restoring the tlog with move, and standby works...this is not how it should
happen.
Senior SQL Server DBA
Hi,
What is the process u are following to move.
I mean to say that do u move the database (mdf and ldf) with move
option or u just copy it from one location to the other.
Ur logfile may be corrept while copiying .
Use with move option to move the files.
from
Doller
Clint Pugh wrote:
> I have a database i am m oving to another server, during the process I am
> moving the data and log files to another drive.(Which I have done countless
> times before with no problems)
> The problem I am having is after I restore the database using the following
> statement :
> RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> WITH STANDBY = 'D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\Databasename\databasename.STAN DBY'
> ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Data.mdf'
> ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Log.ndf'
> I get these errors when trying to restore transaction logs :
> [SQLSTATE 42000] (Error 3156) Device activation error. The physical file
> name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
> may be incorrect.
> [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> Has anyone encountered the same problem? This has me stumped, although
> restoring the tlog with move, and standby works...this is not how it should
> happen.
> --
> Senior SQL Server DBA
|||Hi,
If u are moving the tlog also then u can use something like this
USE master
GO
-- First determine the number and names of the files in the backup.
RESTORE FILELISTONLY
FROM MyNwind_1
-- Restore the files for MyNwind.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH NORECOVERY,
MOVE 'MyNwind_data_1' TO 'D:\MyData\MyNwind_data_1.mdf',
MOVE 'MyNwind_data_2' TO 'D:\MyData\MyNwind_data_2.ndf'
GO
-- Apply the first transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH NORECOVERY
GO
-- Apply the last transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH RECOVERY
GO
TO know more pls read move database in BOL
hope this helps u
from
Doller
|||The files are being copied using SCP, this is required because of firewall
rules.
The TRN files are the restored to the DR Database.
This is working fine for 2 other databases on the same server.
Senior SQL Server DBA
"doller" wrote:

> Hi,
> What is the process u are following to move.
> I mean to say that do u move the database (mdf and ldf) with move
> option or u just copy it from one location to the other.
> Ur logfile may be corrept while copiying .
> Use with move option to move the files.
> from
> Doller
>
> Clint Pugh wrote:
>
|||Seems like SQL Server cannot create the database file names you have specified. Perhaps the service
account don't have permissions, or that the file names are already in use by some other database.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Clint Pugh" <clintp@.datacom.co.nz> wrote in message
news:E8BAE427-D016-4117-B562-566171F0EE2F@.microsoft.com...
>I have a database i am m oving to another server, during the process I am
> moving the data and log files to another drive.(Which I have done countless
> times before with no problems)
> The problem I am having is after I restore the database using the following
> statement :
> RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> WITH STANDBY = 'D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\Databasename\databasename.STAN DBY'
> ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Data.mdf'
> ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Log.ndf'
> I get these errors when trying to restore transaction logs :
> [SQLSTATE 42000] (Error 3156) Device activation error. The physical file
> name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
> may be incorrect.
> [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> Has anyone encountered the same problem? This has me stumped, although
> restoring the tlog with move, and standby works...this is not how it should
> happen.
> --
> Senior SQL Server DBA

Problem having to restore tlogs WITH MOVE

I have a database i am m oving to another server, during the process I am
moving the data and log files to another drive.(Which I have done countless
times before with no problems)
The problem I am having is after I restore the database using the following
statement :
RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
WITH STANDBY = 'D:\Program Files\Microsoft SQL
Server\MSSQL\BACKUP\Databasename\databasename.STANDBY'
,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\Databasename_Data.mdf'
,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
Server\MSSQL\Data\Databasename_Log.ndf'
I get these errors when trying to restore transaction logs :
[SQLSTATE 42000] (Error 3156) Device activation error. The physical file
name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
may be incorrect.
[SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
WITH MOVE to identify a valid location for the file.
Has anyone encountered the same problem? This has me stumped, although
restoring the tlog with move, and standby works...this is not how it should
happen.
--
Senior SQL Server DBAHi,
What is the process u are following to move.
I mean to say that do u move the database (mdf and ldf) with move
option or u just copy it from one location to the other.
Ur logfile may be corrept while copiying .
Use with move option to move the files.
from
Doller
Clint Pugh wrote:
> I have a database i am m oving to another server, during the process I am
> moving the data and log files to another drive.(Which I have done countless
> times before with no problems)
> The problem I am having is after I restore the database using the following
> statement :
> RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> WITH STANDBY = 'D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\Databasename\databasename.STANDBY'
> ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Data.mdf'
> ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Log.ndf'
> I get these errors when trying to restore transaction logs :
> [SQLSTATE 42000] (Error 3156) Device activation error. The physical file
> name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
> may be incorrect.
> [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> Has anyone encountered the same problem? This has me stumped, although
> restoring the tlog with move, and standby works...this is not how it should
> happen.
> --
> Senior SQL Server DBA|||Hi,
If u are moving the tlog also then u can use something like this
USE master
GO
-- First determine the number and names of the files in the backup.
RESTORE FILELISTONLY
FROM MyNwind_1
-- Restore the files for MyNwind.
RESTORE DATABASE MyNwind
FROM MyNwind_1
WITH NORECOVERY,
MOVE 'MyNwind_data_1' TO 'D:\MyData\MyNwind_data_1.mdf',
MOVE 'MyNwind_data_2' TO 'D:\MyData\MyNwind_data_2.ndf'
GO
-- Apply the first transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log1
WITH NORECOVERY
GO
-- Apply the last transaction log backup.
RESTORE LOG MyNwind
FROM MyNwind_log2
WITH RECOVERY
GO
TO know more pls read move database in BOL
hope this helps u
from
Doller|||The files are being copied using SCP, this is required because of firewall
rules.
The TRN files are the restored to the DR Database.
This is working fine for 2 other databases on the same server.
--
Senior SQL Server DBA
"doller" wrote:
> Hi,
> What is the process u are following to move.
> I mean to say that do u move the database (mdf and ldf) with move
> option or u just copy it from one location to the other.
> Ur logfile may be corrept while copiying .
> Use with move option to move the files.
> from
> Doller
>
> Clint Pugh wrote:
> > I have a database i am m oving to another server, during the process I am
> > moving the data and log files to another drive.(Which I have done countless
> > times before with no problems)
> > The problem I am having is after I restore the database using the following
> > statement :
> > RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> > WITH STANDBY = 'D:\Program Files\Microsoft SQL
> > Server\MSSQL\BACKUP\Databasename\databasename.STANDBY'
> > ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> > Server\MSSQL\Data\Databasename_Data.mdf'
> > ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> > Server\MSSQL\Data\Databasename_Log.ndf'
> >
> > I get these errors when trying to restore transaction logs :
> >
> > [SQLSTATE 42000] (Error 3156) Device activation error. The physical file
> > name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
> > may be incorrect.
> > [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
> > 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
> > WITH MOVE to identify a valid location for the file.
> >
> > Has anyone encountered the same problem? This has me stumped, although
> > restoring the tlog with move, and standby works...this is not how it should
> > happen.
> > --
> > Senior SQL Server DBA
>|||Seems like SQL Server cannot create the database file names you have specified. Perhaps the service
account don't have permissions, or that the file names are already in use by some other database.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Clint Pugh" <clintp@.datacom.co.nz> wrote in message
news:E8BAE427-D016-4117-B562-566171F0EE2F@.microsoft.com...
>I have a database i am m oving to another server, during the process I am
> moving the data and log files to another drive.(Which I have done countless
> times before with no problems)
> The problem I am having is after I restore the database using the following
> statement :
> RESTORE DATABASE CMAMSPROD FROM DISK = 'C:\Databasename.BAK'
> WITH STANDBY = 'D:\Program Files\Microsoft SQL
> Server\MSSQL\BACKUP\Databasename\databasename.STANDBY'
> ,MOVE 'Databasename_Data' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Data.mdf'
> ,MOVE 'Databasename_Log' TO 'D:\Program Files\Microsoft SQL
> Server\MSSQL\Data\Databasename_Log.ndf'
> I get these errors when trying to restore transaction logs :
> [SQLSTATE 42000] (Error 3156) Device activation error. The physical file
> name 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'
> may be incorrect.
> [SQLSTATE 42000] (Error 5105) File 'Databasename_Log' cannot be restored to
> 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Databasename_log.ldf'. Use
> WITH MOVE to identify a valid location for the file.
> Has anyone encountered the same problem? This has me stumped, although
> restoring the tlog with move, and standby works...this is not how it should
> happen.
> --
> Senior SQL Server DBAsql

Monday, March 12, 2012

Problem Doing SQL 2005 DB Restore - Media Families

I did a full DB backup that I am trying now to restore via the SQL Server Management Studio.

I select "Restore" and then "From Device" and point to the bak file that I want to restore from.

I then go into the Options page and check "Overwrite the existing database".

Below that, shows the Restore the database files as

RB_Data_Services_MSCRM

RB_Data_Services_MSCRM_Log

sysft_ftcat_documentindex

When I then click OK I get the following error. The Media Set has 3 Media Families but only 1 are provided. All members must be provided.

Any ideas as to what I did to do to be able to complete this restore?

Thank

Rick Bellefond

Have you treid using RESTORE statement from query analyzer?|||Check that Database Name of the Database your are restoring matches that of the database your are resoring too.|||

refer this it has the solution

http://forums.microsoft.com/technet/showpost.aspx?postid=259647&siteid=17&sb=0&d=1&at=7&ft=11&tf=0&pageid=1

Madhu

Problem Doing SQL 2005 DB Restore - Media Families

I did a full DB backup that I am trying now to restore via the SQL Server Management Studio.

I select "Restore" and then "From Device" and point to the bak file that I want to restore from.

I then go into the Options page and check "Overwrite the existing database".

Below that, shows the Restore the database files as

RB_Data_Services_MSCRM

RB_Data_Services_MSCRM_Log

sysft_ftcat_documentindex

When I then click OK I get the following error. The Media Set has 3 Media Families but only 1 are provided. All members must be provided.

Any ideas as to what I did to do to be able to complete this restore?

Thank

Rick Bellefond

Have you treid using RESTORE statement from query analyzer?|||Check that Database Name of the Database your are restoring matches that of the database your are resoring too.|||

refer this it has the solution

http://forums.microsoft.com/technet/showpost.aspx?postid=259647&siteid=17&sb=0&d=1&at=7&ft=11&tf=0&pageid=1

Madhu

Problem Doing SQL 2005 DB Restore

I did a full DB backup that I am trying now to restore via the SQL Server Management Studio.

I select "Restore" and then "From Device" and point to the bak file that I want to restore from.

I then go into the Options page and check "Overwrite the existing database".

Below that, shows the Restore the database files as

RB_Data_Services_MSCRM

RB_Data_Services_MSCRM_Log

sysft_ftcat_documentindex

When I then click OK I get the following error. The Media Set has 3 Media Families but only 1 are provided. All members must be provided.

Any ideas as to what I did to do to be able to complete this restore?

Thank

Rick Bellefond

Looks like you created a backup that spanned multiple media families. You need to add in all of the pieces of the backup that you took for this to work.|||

Michael,

I did not intend to have my backup span multiple media families but I guess that is what I did.

I was not able to use that backup but found one that I could use.

Thanks.

Rick