Unable to create database on a particular local di

  • I am unable to create an new SQL Server database on my E: drive. The sever has 4 drives C:, E:, G: and H: and because the other drives are nearly full I want to create it on the E: drive. When I try to create the database through the Enterprise Manager I am unable to see the E: drive in the dialog box. I have tried to create a database with SQL and then I get this:

    (SQL statement)

    use master

    go

    create database Test

    on

    (name = Test_dat,

    filename='e:\test\testdat.mdf',

    size = 10MB,

    maxsize = 50MB,

    filegrowth = 5MB)

    log on

    ( name = Test_log,

    filename='e:\test\testlog.ldf',

    size = 5MB,

    maxsize = 25MB,

    filegrowth = 5MB)

    go

    (Result)

    Server: Msg 5105, Level 16, State 2, Line 1

    Device activation error. The physical file name 'e:\test\testdat.mdf' may be incorrect.

    Server: Msg 1802, Level 16, State 1, Line 1

    CREATE DATABASE failed. Some file names listed could not be created. Check previous errors.

    I don’t have the problem on any of the other drives, what could be the cause of this?

    Thanks

    Jan Vandezande.

    Jan


    Jan

  • I've seen this be a permissions issue in the past. You have created all the directory structures and the like yes?

    Wes

  • Wes,

    I must say I am only recently assigned for this problem, but I was able find out that there are two hard disks. First the C: drive of 7GB with the SQL Server installation and second a disk of 20GB with primary partition E: and secondary partitions G: and H:.

    I also found out that the SQL Server version is 8.00.194 with no service packs installed.

    Would it help to install the SP1?

    thanks

    Jan


    Jan

  • U R creating the database on E drive

    Check whether the directory "test" is present since the file testdat.mdf is supposed to reside finally in e:\test\ ,

    If it does not exist create the a folder named test in the 'E drive ' and run the create database statement

    Mouli

  • I have created the directory "test" for my test database, the problem is SQL Server can not find the E: drive at all.

    Jan


    Jan

  • How about trying the same task through Enterprise Manager? You can always drop the db if it works.

    Andy

  • I started with that in the first place, the problem there is that I can not see or access the E: drive in the dialog box. After I tried with the Enterprise Manager I did the small test with SQL code.

    Jan


    Jan

  • You said you found out that the server has an E: drive, but the error you're getting sounds like there may not be one there. Can you either verify by getting to the server physically or by using management tools to see what drives are actually there?

    K. Brian Kelley

    bk@warpdrivedesign.org

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

  • I hate to ask the stupid questions but, can you see the drive external of SQL Server and if so, can you write to it?

    I have to agree with Brian K. that it sounds like the drive is physically not there or is not really formatted properly. I can't think of anything that SQL Server would do to limit access to a drive so, I would start within the OS configuration for that drive and see how you make out from there.

    Hope this helps!

    David

    David

    @SQLTentmaker

    “He is no fool who gives what he cannot keep to gain that which he cannot lose” - Jim Elliot

  • I am glad to tell you that the problem is solved, and it has everything to do with access rights. The user group with full permission to the E: drive was misspelled (missing ‘s’ in administrators) because my username was added to this user group and SQL Server is using the windows userid and password SQL Server was not able to access the E: drive.

    Jan


    Jan

  • Glad it was something simple like that!

    K. Brian Kelley

    bk@warpdrivedesign.org

    http://www.sqlservercentral.com/columnists/bkelley/

    K. Brian Kelley
    @kbriankelley

Viewing 11 posts - 1 through 10 (of 10 total)

You must be logged in to reply to this topic. Login to reply