directory lookup for the file failed with the operating system error 2

  • Dear All,

    I am getting a problem.I have SQL server 2005 installed on C:\..drive.and I have S:\ drive as a LUN.

    Now If I am trying to create a database on S:\ drive then it is giving error:"directory lookup for the file failed with the operating system error 2 Microsoft Error 5133"

    Help..Please

    Thanks

  • Ajay,

    Does the service account that you are using have permission to read/write there?

    Can that account do anything on that drive outside SQL Server? For example, can you copy a simple text file there? You want to confirm that there is not an operating system or permission issue first.

    Steve

  • Is this a clustered SQL Server?

    Are you creating the DB from management studio gui or from script? If script, paste it here please?

    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
  • That is not clustered...

    Thanks

  • I have detached the database and attach it after moving DB files to S: drive (SAN Disk)

    I am Using GUI of SSMS.

    Thanks

  • Straightforward: If I want to create the database in different drive then this error is coming...

    Help Please...

    Thanks

  • Please post the code used to create the DB and the exact error message that you get.

    Either write the create DB statement yourself or use the 'script' button on the Create database dialog.

    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
  • I have run the scripts and it works successfully but the same thing if I am doing using the GUI then it giving error:

    TITLE: Microsoft SQL Server Management Studio

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

    Create failed for Database 'as'. (Microsoft.SqlServer.Smo)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=9.00.3042.00&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Create+Database&LinkId=20476

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

    ADDITIONAL INFORMATION:

    An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

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

    Directory lookup for the file "e:\as.mdf\as.mdf" failed with the operating system error 2(The system cannot find the file specified.).

    CREATE DATABASE failed. Some file names listed could not be created. Check related errors. (Microsoft SQL Server, Error: 5133)

    For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.3080&EvtSrc=MSSQLServer&EvtID=5133&LinkId=20476

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

    BUTTONS:

    OK

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

    Thanks

  • guptaajay1985 (11/12/2009)


    Directory lookup for the file "e:\as.mdf\as.mdf" failed with the operating system error 2

    That doesn't look like a valid filename to me. Double check what it is that you're setting things to, make sure there's no typo happening.

    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
  • Thanx Gilla ,

    as.mdf means application server.

    Thanks

  • guptaajay1985 (11/13/2009)


    Thanx Gilla ,

    as.mdf means application server.

    Huh?

    Do you really have a directory called E:\as.mdf\? Not a file, a directory?

    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
  • Dear I am directly saving it in the E:\ drive.

    Thanks

  • Not according to the error message you aren't.

    Directory lookup for the file "e:\as.mdf\as.mdf" failed

    Check what you've got set for the directory and what you have for the filename. Remember that the gui has one place for the directory, one for the file. Take a screenshot of the create database dialog and post here.

    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
  • The Upload limit has been exceeded

    Thanks

  • Then go to "Edit Attachments" (it's part of the user control panel) and delete some of your old uploads.

    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

Viewing 15 posts - 1 through 15 (of 25 total)

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