Drop Table
Support Forum for database administrators and web based access to important newsgroups related to databasesI 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'.
Post Follow-up to this messageHi 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'. >
Post Follow-up to this messageYes, 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.
Post Follow-up to this message
Show a Printable Version
Email This Page to Someone!
Receive updates to this thread