Article ID: 950891 - Last Review: February 20, 2009 - Revision: 1.0
You cannot restore a database from a backup file when you use a SQL Server login ID that has the dbcreator server role to connect to an instance of SQL Server 2005
System TipThis article applies to a different operating system than the one you are using. Article content that may not be relevant to you is disabled.
In SQL Server Management Studio, you use a SQL Server login ID that has the dbcreator server role to connect to an instance
of Microsoft SQL Server 2005.
You try to restore a database from a database
backup file.
In the Specify Backup dialog box, you
specify File as the backup media, and then you click Add.
You receive an error message that
resembles the following:
C:\Program Files\Microsoft SQL
Server\MSSQL.1\MSSQL\Backup Cannot access the specified path or file on the
server. Verify that you have the necessary security privileges and that the
path or file exists.
If you know that the service account can access a
specific file, type in the full path for the file in the File Name control in
the Locate dialog box.
You click OK to dismiss the error message. In the Locate Backup File dialog box, you
specify the database backup and file path, and then you click OK.
In
this scenario, you receive the following error
message:
The Database Engine service could not resolve the
specified file location. Either the location does not exist, or the current
login account does not have access to it. Verify that the file location exists,
and that the login account has permissions on it.
Method 1: Run the RESTORE statement in SQL Server Management
Studio
Start SQL Server Management Studio, and then connect to an
instance of SQL Server 2005.
Click New Query.
Run the restore statement. To do this, use one of the following
methods:
To restore the entire database from the database backup file,
use a statement that resembles the following:
RESTORE DATABASE <DBName> FROM DISK = '<BackupFilePath>\<BackupFileName>'
GO
Note In this statement, <DBName> represents the name of the database that you want
to restore to, <BackupFilePath> represents the path of the database
backup file, and <BackupFileName> represents the name of the backup
file.
To restore a specific file from the database backup file,
use a statement that resembles the following:
RESTORE DATABASE <DBName> FILE = <FileName> FROM DISK = '<BackupFilePath>\<BackupFileName>'
GO
Note In this statement, <FileName> represents the name of the file that
you want to restore.
Note In this statement, <ServerName> represents the name of the server that is
running the instance of SQL Server 2005; <InstanceName> represents the
name of the instance of SQL Server 2005; <LoginName> is the name of the
SQL Server login ID that you use to connect to the instance of SQL Server 2005; and
<LoginPassword> represents the password of the SQL Server
login ID.
Run the RESTORE statement. To do this, use one of the following
methods:
To restore the entire database from the database backup file,
use a statement that resembles the following:
RESTORE DATABASE <DBName> FROM DISK = '<BackupFilePath>\<BackupFileName>'
GO
Note In this statement, <DBName> represents the name of the database that you want
to restore to, <BackupFilePath> represents the path of the database
backup file, and <BackupFileName> represents the name of the backup
file.
To restore a specific file from the database backup file,
use a statement that resembles the following:
RESTORE DATABASE <DBName> FILE = <FileName> FROM DISK = '<BackupFilePath>\<BackupFileName>'
GO
Note In this statement, <FileName> represents the name of the file that
you want to restore.
To open the Specify Backup dialog box,
follow these steps:
Open SQL Server Management Studio, and then connect to an
instance of SQL Server 2005.
Right-click Databases, and then click
Restore Database or Restore Files and
Filegroups.
In the Restore Database dialog box or in
the Restore Files and Filegroups dialog box, click
From device, and then click the ellipsis button. (The ellipsis button contains three dots.)