Quantcast
Channel: ฟอรัม Getting started with SQL Server
Viewing all articles
Browse latest Browse all 8428

CREATE DATABASE with data file and log file in query pane

$
0
0

I ran the below code and got this error message.  Can someone help me fix this.

CREATE DATABASE project
ON
(Name= 'project_dat',
FILENAME ='C:\project.mdf',
SIZE = 10,
MAXSIZE = 100,
FILEGROWTH = 5)

LOG ON
(NAME = project_log,
FILENAME = 'C:\project.ldf',
SIZE =40,
MAXSIZE = 100,
FILEGROWTH = 10); 

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


skilo


Viewing all articles
Browse latest Browse all 8428

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>