Hello and welcome to our community! Is this your first visit?
Register
Enjoy an ad free experience by logging in. Not a member yet? Register.
Results 1 to 5 of 5
  1. #1
    Regular Coder
    Join Date
    May 2003
    Location
    St. Peters MO
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Can anyone help with SQL SERVER 2000 Question

    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'.

  • #2
    UE Antagonizer Fumigator's Avatar
    Join Date
    Dec 2005
    Location
    Utah, USA, Northwestern hemisphere, Earth, Solar System, Milky Way Galaxy, Alpha Quadrant
    Posts
    7,691
    Thanks
    42
    Thanked 637 Times in 625 Posts
    (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'.
    Did you notice this part?

  • #3
    Regular Coder
    Join Date
    May 2003
    Location
    St. Peters MO
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Yes I did. And I have checked the path to be sure that the spelling and everything is correct.

    Is there something is that I should have done first before creating this or executing it?

    I have followed the instruction line by line in the books and compared them to what I have more then once.

    I am just getting started with this and this is the first problem that I have had so far. And I am just not sure what to do to solve the problem.
    Last edited by cwdlmdd; 10-23-2007 at 02:10 AM.

  • #4
    Senior Coder
    Join Date
    Jun 2002
    Location
    Zwolle, The Netherlands
    Posts
    1,120
    Thanks
    2
    Thanked 31 Times in 31 Posts
    is the file there? is it already in use with sql server?
    I am the luckiest man in the world

  • #5
    Regular Coder
    Join Date
    May 2003
    Location
    St. Peters MO
    Posts
    100
    Thanks
    0
    Thanked 0 Times in 0 Posts
    No it is not. From what I read in the book the code should create the file for me and place those files in it.


  •  

    Posting Permissions

    • You may not post new threads
    • You may not post replies
    • You may not post attachments
    • You may not edit your posts
    •