cwdlmdd
10-22-2007, 11:11 PM
I have copied this small bit of code right out of the Microsoft book. That should execute in the SQL Query Analyzer but it wont.
Which you would think that it would work just fine! But it doesn't. And I can not see where the problems is. I am hoping that someone can help me. I have compared it with the book quite a few times and it looks to same to me.
Here is the code and the error message that I am getting. Is the code case sensitive like it is in some of the other programming?
I can not see where the problem is!
USE master
GO
CREATE DATABASE BookShopDB
ON PRIMARY
(
NAME = Bookshop_dat,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Bookshop.mdf',
SIZE = 4,
MAXSIZE = 10,
FILEGROWTH = 1)
LOG ON
(
NAME = Bookshop_log,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Bookshop.ldf',
SIZE = 2,
MAXSIZE = 5,
FILEGROWTH = 1)
GO
Server: Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\BookShop.mdf'.
Server: Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check previous errors.
The CREATE DATABASE process is allocating 4.00 MB on disk 'BookShop_dat'.
The CREATE DATABASE process is allocating 2.00 MB on disk 'BookShop_log'.
Which you would think that it would work just fine! But it doesn't. And I can not see where the problems is. I am hoping that someone can help me. I have compared it with the book quite a few times and it looks to same to me.
Here is the code and the error message that I am getting. Is the code case sensitive like it is in some of the other programming?
I can not see where the problem is!
USE master
GO
CREATE DATABASE BookShopDB
ON PRIMARY
(
NAME = Bookshop_dat,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Bookshop.mdf',
SIZE = 4,
MAXSIZE = 10,
FILEGROWTH = 1)
LOG ON
(
NAME = Bookshop_log,
FILENAME = 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\Bookshop.ldf',
SIZE = 2,
MAXSIZE = 5,
FILEGROWTH = 1)
GO
Server: Msg 5123, Level 16, State 1, Line 1
CREATE FILE encountered operating system error 3(The system cannot find the path specified.) while attempting to open or create the physical file 'C:\Program Files\Microsoft SQL Server\MSSQL\Data\BookShop.mdf'.
Server: Msg 1802, Level 16, State 1, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check previous errors.
The CREATE DATABASE process is allocating 4.00 MB on disk 'BookShop_dat'.
The CREATE DATABASE process is allocating 2.00 MB on disk 'BookShop_log'.