Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 SQL Server Administration (2005)
 SQL server - trouble restoring database backup

Author  Topic 

strungout
Starting Member

7 Posts

Posted - 2009-12-15 : 10:31:12
SOLVED

Hi all

Been stuck on this issue for a while now, i'm trying to restore a database backup file into a new database.....but with no luck.

I'm using:
Microsoft SQL Server Management Studio Express v9.0
SQL server 2005

And following this tutorial:
http://www.linglom.com/2008/01/12/how-to-backup-and-restore-database-on-microsoft-sql-server-2005/


I have issues when i reach step 5/6 of the restore process. Please see the attached screenshot. It should display a tree structure of my folders/files, but i get that error message instead. Now, as you can see the path definitely exists, and i've checked my user account and i have administrator privileges, so i'm really not sure what the problem could be

Appreciate replys

cheers

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-15 : 10:54:56
Could you try with the RESTORE DATABASE command instead just in case something is messed up with the GUI?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

strungout
Starting Member

7 Posts

Posted - 2009-12-15 : 11:08:34
quote:
Originally posted by tkizer

Could you try with the RESTORE DATABASE command instead just in case something is messed up with the GUI?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."




Just tried that and got the following error

"The operating system returned the error '5(Access is denied.)'"

One thing i just remembered, my SQL account isn't the main admin account for this program, will this make a difference? (the admin password is unknown)
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-15 : 12:24:59
It's a permissions issue. The SQL Server service account doesn't seem to have access to that path. Is it a local admin?

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

strungout
Starting Member

7 Posts

Posted - 2009-12-15 : 12:50:44
Not 100% sure what you mean by local admin, but yes, i think it is.
This is new territory for me so its a bit confusing. Unsure where and how to change permissions to allow my account to restore DB backups



*edit. Local admin, as in My Computer admin? Yes, my windows account has admin privileges
Go to Top of Page

tkizer
Almighty SQL Goddess

38200 Posts

Posted - 2009-12-15 : 12:53:35
No as in the service account. Go to control panel, admin tools, services, and then look at the SQL Server service. Ensure that account has local admin.

Tara Kizer
Microsoft MVP for Windows Server System - SQL Server
http://weblogs.sqlteam.com/tarad/

Subscribe to my blog

"Let's begin with the premise that everything you've done up until this point is wrong."
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-15 : 14:49:12
This comes up an awful lot. So I thought I'd add a few screenshots to Tara's explanation.

A. Finding/Adding local administrator accounts:





B. Finding/Changing the SQL Server Service Account:




Go to Top of Page

strungout
Starting Member

7 Posts

Posted - 2009-12-16 : 05:48:42
Thanks for the reply Russel. I have done what you suggested, still no luck with the database restore. I restarted the service after changing the permissions too

A.


B.
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-16 : 07:20:10
what if you execute

xp_cmdshell 'dir "C:\Program Files\Microsoft SQL Server\MSSQL.2\MSSQL\Backup"'
Go to Top of Page

strungout
Starting Member

7 Posts

Posted - 2009-12-16 : 07:52:22
solved

In part B of Russell's steps, i changed it to 'Local system account' rather than 'this account'

seemed to do the job


Thanks for your patience
Go to Top of Page
   

- Advertisement -