urgent help

  • hi all,

    we have server on which our database D1 is missing.

    by running

    select * from sysdatabases.Output is not showning D1 in server.

    I have trace out the mdf and ldf file but they are on network whenever i try to create database using above files it says "Database cannot be created as mentioned file is in use"

    How i am going to create database using mdf and ldf which are on network?

    Please help urgent...

    Thanks,

    Neerav

  • if the files are "in use", could it be that someone renamed database "D1" to another name?

    With the select * from sysdatabases, Can you check the filename column and see if the filename matches your path to the mdf you found?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • hi lowell,

    That i have already checked.

    what is procedure to restore database from mdf and ldf files which are in network

    Or

    Creating database from mdf and ldf files

  • if you have the mdf and ldf files, in SSMS in the Object Explorer window on the left, you would simply right click on the Database Folder and select Attach...

    then you would brows to the MDF file and click OK.

    I'm pretty sure the files have to be local to the server(on it's disks, not on a network drive)

    in order to attach it as a database.

    by "on the network" do you mean on a Storage Area Network?

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • That's correct they have to be local drives or SAN attached. You can't use UNC paths.

    If the files are still locked you will not be able to attach them. To sanity check, I would stop your SQL Server and see if the files are still locked. If they are then you can be positive that they aren't hiding ie renamed as already mentioned.

    This situation is a little odd. Could the files you have found be a UAT/DEV environment? You could be saver looking at restoring a backup. At least you know what you are getting!

  • since from the perspective of the server you are looking at, the mdf files are located on a \\UNC drive, I'd speculate that an instance of SQL server on the server that hosts the UNC path has those files locked, and not the server you wish to attach the mdf's to.

    connect to that server and see if the files are used for a database on that server, then take a backup of the database and restore on your real server.

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

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

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