Sql error 1807.

  • Hi

    I have downloaded a trail version of SQL 2008 Enteprise from Microsoft.

    I have some Sql 2000 databases that I want to backup and import into the new SQL 2008. I am totally new to SQL so I have some problems

    In SQL 2008, I tried to create new database. I give it a name and click OK. After some time it does return an error:

    ---------------------------------------------------

    Create failed for database 'Testdatabase' (Microsoft.SqlServer.Smo)

    Could not obtail exclusive lock on database 'Model'. Retry the operation later.

    Create database failed.Some files nakmes listed could not be created. (Microsoft SQL Server, Error:1807)

    --------------------------------------------------------

    I read somewhere that its using "model" as a template for creating new database.

    I had to go in "model", Option and set "Auto Close to TRUE"

    I have tried that and I still get the same problem

    Can anyone give me some hint where to look

    Thanks for your time

    Kind Regards

    Morten

  • That error indicates that something was using model. Were there any connections or queries to the model database at the time? (including your query that was trying to create the database)

    Oh, and turn auto-close OFF for model.

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • Hi

    Thanks for your reply.

    I dont know why it happened as it was a new install.

    I found a solution by writing

    "

    USE model

    GO

    Create database test;

    "

    That seems to have resolve the issue.

    Why I had it in the first place I have no idea as I had just installed SQL 2008 and rebooted once

    Regards

    Morten

Viewing 3 posts - 1 through 2 (of 2 total)

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