Drop Table

Support Forum for database administrators and web based access to important newsgroups related to databases
Register on Database Support Forum Edit your profileCalendarFind other Database Support forum membersFrequently Asked QuestionsSearch this forum -> 
For Database admins: Free Database-related Magazines Now Free shipping to Texas


Post New Thread










Thread
Author

CREATE FILE access denied
I get this error message when trying to create a database. This happens from
the Management Studio, from regular queries, etc. No other posts seem to
resolve this problem exactly that I can find. Thanks for any insight into
this problem...

USE MASTER
CREATE DATABASE XYZ
ON (Name = XYZ_data,  FILENAME='C:\\XYZ_da
ta.mdf')
LOG ON (Name = XYZ_log,  FILENAME='C:\\XYZ_lo
g.ldf')

Error message:
Msg 1802, Level 16, State 4, Line 2
CREATE DATABASE failed. Some file names listed could not be created. Check
related errors.
Msg 5123, Level 16, State 1, Line 2
CREATE FILE encountered operating system error 5(Access is denied.) while
attempting to open or create the physical file 'c:\XYZ_data.mdf'.


Report this thread to moderator Post Follow-up to this message
Old Post
XCode247
12-31-05 01:23 AM


Re: CREATE FILE access denied
Hi

Check that the account that SQL Server runs under has file system
permissions on c:\

OS Error 5 = access denied.

Regards
--------------------------------
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland

IM: mike@epprecht.net

MVP Program: http://www.microsoft.com/mvp

Blog: http://www.msmvps.com/epprecht/

"XCode247" < XCode247@discussions
.microsoft.com> wrote in message
news:7DE6CBB0-087A-4CD2-9B45- AEAE45532C06@microso
ft.com...
>I get this error message when trying to create a database. This happens
>from
> the Management Studio, from regular queries, etc. No other posts seem to
> resolve this problem exactly that I can find. Thanks for any insight into
> this problem...
>
> USE MASTER
> CREATE DATABASE XYZ
> ON (Name = XYZ_data,  FILENAME='C:\\XYZ_da
ta.mdf')
> LOG ON (Name = XYZ_log,  FILENAME='C:\\XYZ_lo
g.ldf')
>
> Error message:
> Msg 1802, Level 16, State 4, Line 2
> CREATE DATABASE failed. Some file names listed could not be created. Check
> related errors.
> Msg 5123, Level 16, State 1, Line 2
> CREATE FILE encountered operating system error 5(Access is denied.) while
> attempting to open or create the physical file 'c:\XYZ_data.mdf'.
>



Report this thread to moderator Post Follow-up to this message
Old Post
Mike Epprecht \(SQL MVP\)
12-31-05 01:23 AM


RE: CREATE FILE access denied
Yes, sure enough...

In Configuration Manager, Service properties. The 'Log on as' account was
'Network Service'. The help button from that page says a 'domain user accoun
t
with minimal rights' is recommended. Changing the account causes it to work.



Report this thread to moderator Post Follow-up to this message
Old Post
XCode247
12-31-05 01:23 AM


Sponsored Links





Last Thread Next Thread
Post New Thread

MS SQL Server archive

Show a Printable Version Email This Page to Someone! Receive updates to this thread
Microsoft SQL Server
Access database support
PostgreSQL Replication
SQL Server ODBC
FoxPro Support
PostgreSQL pgAdmin
SQL Server Clustering
MySQL ODBC
Web Applications with dBASE
SQL Server CE
MySQL++
Sybase Database Support
MS SQL Full Text Search
PostgreSQL Administration
SQL Anywhere support
DB2 UDB Database
Paradox Database Support
Filemaker Database
Berkley DB
SQL 2000/2000i database
ASE Database
Forum Jump:
All times are GMT. The time now is 04:12 AM.

 
Mobile devices forum | Database support forum archive




Copyrights DropTable.com Database Support Forum 2004 - 2006