dbTalk Databases Forums  

Attaching AdventureWorks DB Fails

microsoft.public.sqlserver.setup microsoft.public.sqlserver.setup


Discuss Attaching AdventureWorks DB Fails in the microsoft.public.sqlserver.setup forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
ShirleyH
 
Posts: n/a

Default Attaching AdventureWorks DB Fails - 04-26-2007 , 11:24 AM






I downloaded the newest set of samples and instructions from MS. I
successfully unpacked them, and the AdventureWorks_DAta.mdf and ldf are
there. In SQL2005, (via a query) or the gui when I browse to the mdf and
select to attach it, it fails telling me the operating system is denying me
access.

I have gone to the mdf file and the ldf file, and checked the properties.
The Read Only attribute is not on. I have also checked the OS security
permissions and the account I am logged in to the OS with is a local
administrator account with full access rights on this file.

Here is the query text I tried running:
exec sp_attach_db @dbname=N'AdventureWorks',
@filename1=N'E:\Program Files\SQLData\Adventureworks_Data.mdf',
@filename2=N'E:\Program Files\SQLData\Adventureworks_log.ldf'

Any help is appreciated, I'm stuck.

Reply With Quote
  #2  
Old   
Roger Wolter[MSFT]
 
Posts: n/a

Default Re: Attaching AdventureWorks DB Fails - 04-26-2007 , 02:56 PM






It doesn't matter what account you are running as - what matters is the
account that the SQL Server service runs as. If for example, you are using
SQL Server Express which runs as Network Service, Network Service has very
few privileges by default.

--
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm

"ShirleyH" <ShirleyNOSPAMH (AT) abshernw (DOT) com> wrote

Quote:
I downloaded the newest set of samples and instructions from MS. I
successfully unpacked them, and the AdventureWorks_DAta.mdf and ldf are
there. In SQL2005, (via a query) or the gui when I browse to the mdf and
select to attach it, it fails telling me the operating system is denying
me
access.

I have gone to the mdf file and the ldf file, and checked the properties.
The Read Only attribute is not on. I have also checked the OS security
permissions and the account I am logged in to the OS with is a local
administrator account with full access rights on this file.

Here is the query text I tried running:
exec sp_attach_db @dbname=N'AdventureWorks',
@filename1=N'E:\Program Files\SQLData\Adventureworks_Data.mdf',
@filename2=N'E:\Program Files\SQLData\Adventureworks_log.ldf'

Any help is appreciated, I'm stuck.


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.