Creating database

  • Hi All,

    I tried to create a new db from both EM and QA, I got the same error message:

    Server: Msg 945, Level 14, State 2, Line 1

    Database 'testdb'cannot be opened due to inaccessible files or insufficient memory or disk space.  See the SQL Server errorlog for details.

    The CREATE DATABASE process is allocating 1.00 MB on disk 'testdb_data'.

    The CREATE DATABASE process is allocating 0.49 MB on disk 'testdb_log'.

     

    I'm a having a plenty of spaces and memory, but I did not know why I got this error message and did not allow me to create a new db.  Please help.

    Thanks for any inputs.

    Minh Vu

     

  • What does the server errlog says?

    Does the Windows' log help?

  • sqllog said: 'Starting up database testdb'

    windowlog had no error message.

    The weird thing is I couln't create the testdb, but why sql log said 'starting update database testdb'

    Thanks

    Minh Vu

  • What account are you using for the MSSQLSERVER Service, is it local system or another one, and does it have access to the data directory to create the files ?

    Generally it is best to create an account on your server that is in the  Administrators group for that server, that way it will have complete access to all resources it needs. If it is on the domain, then a domain account that is in the servers administrator account or allternatively a Domain Admin.

    Best to make the account with a strong password and in services assign that account to both the MSSQLServer service and the SQL Server Agent Service. You will need to do that more paticularly with domain accounts if you have more that one SQL server are are replicating.

    File access would be the first thing to check as when you create the DB it should have a default file location for the .mdf file and the .ldf file.

    Also when you are creating the db, you need to have system admin on the sql server so you can update the master db etc.

    But then you may already know all this.

  • Something just weird with sqlserver.  I fixed it by creating a new db from another sqlserver, copying the mdf files over and attaching it.  After that, everything came back normally.  I can create other dabases without any problems.

    Thanks for all of the helps.

    Minh Vu

  • I am getting this same error but trying your resolution does not work.

    Somehow SQL Server is trying to access an old lof and index file from 1 month ago. And they are no longer on the server.

  • Hi,

    By default sql server creats a database tempdb and stores information is sysdatabases in mater database.

    Pls check is there anyentry left with the samename.

    id there is then pls delete it.

    The other option u can try is enable the option in sp_configure

    sp_configure 'allow update',1

    configure with override.

    also check the sql server is running with admin login.

     

    HTH

    from

    Killer

Viewing 7 posts - 1 through 6 (of 6 total)

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