I'm going through the SQL Server 2008 I&M self-paced training manual, and when I do the exercise for creating a database, here's what happens:
CREATE DATABASE TK432 ON PRIMARY
( NAME = N'TK432_Data', FILENAME = N'c:testTK432.mdf',
SIZE = 8MB, MAXSIZE = UNLIMITED, FILEGROWTH = 16MB ),
FILEGROUP FG1
( NAME = N'TK432_Data2', FILENAME = N'c:testTK432.ndf',
SIZE = 8MB, MAXSIZE = UNLIMITED, FILEGROWTH = 16MB ),
FILEGROUP Documents CONTAINS FILESTREAM DEFAULT
( NAME = N'Documents', FILENAME = N'c:testTK432Documents' )
LOG ON
( NAME = N'TK432_Log', FILENAME = N'c:testTK432.ldf',
SIZE = 8MB, MAXSIZE = 2048GB, FILEGROWTH = 16MB )
GO
Msg 5133, Level 16, State 1, Line 1
Directory lookup for the file "c:testTK432.mdf" failed with the operating system error 2(The system cannot find the file specified.).
Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
I'm not sure what I'm doing wrong - I copied it right from the book.
Thanks!
Software/Hardware used:
ASKED:
May 9, 2009 4:11 PM
UPDATED:
February 6, 2011 3:43 PM
Have you created the ‘test’ directory in your C: drive root directory ?
Do you have write permissions on it ?
Doh!!! I just spent ages trying to resolve this.
Thank you so much