.mdf

  • Hi,

    I was told that a .mdf file cannot be uploaded or moved from 1 location meaning in vs.net to an iis, is this true?

  • mdf is the data file for sql server database. It's accomanied by an *.ldf file which is the log file. You can attach the *.mdf file to a new instance by creating a new logfile (certain conditions apply). But it's ok for you to copy the file to the new server

  • chrisians2929 (1/10/2012)


    Hi,

    I was told that a .mdf file cannot be uploaded or moved from 1 location meaning in vs.net to an iis, is this true?

    You can not move the .mdf file if the associated database is online. for moving the .mdf file you have to first detach the database from SQL server.

  • No, it can be copied or moved, but it's not as simple as copying or moving access files or excel spreadsheets.

    If you're moving the database across servers, a better bet by far is backup/restore. If you just want to move the file from one directory to another, you can detach the DB first, move the files and reattach, or you can use the ALTER DATABASE statement to change the server's metadata, then take the DB offline and move the files.

    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
  • Gila, create database for attach_rebuild_log is not a valid option here? I see your points with the metadata an so on. Myself I prefer backup/restore but it's not unusual to get an *.mdf file from a vendor to be deployed (attached) to a server.

  • Create database for attach_rebuild_log is for when you've lost the transaction log, and it is by no means guaranteed to work. Deleting the transaction log or moving just the mdf and expecting SQL to recover fine is like playing russian roulette with your database

    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
  • chrisians2929 (1/10/2012)


    Hi,

    I was told that a .mdf file cannot be uploaded or moved from 1 location meaning in vs.net to an iis, is this true?

    are you referring to the attach db functionality in .NET, such as attaching a .NET roles and memberships database?

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

    "Ya can't make an omelette without breaking just a few eggs" 😉

  • what about encapsulation?

  • chrisians2929 (1/14/2012)


    what about encapsulation?

    What about it? Not really a DB term.

    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
  • Will you please explain what do you mean by ‘what about encapsulation’?

  • what i mean is that i think Sql working with Win Server IIS

    is the best golden hand shake microsoft has ever made

    and i think that all the technology works in the best unicen

    with the encapsulation of that combination

  • Sorry, what are you talking about? That made no sense at all.

    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
  • it works on iis too

    when u upload a complete website with the db it all works

  • chrisians2929 (1/22/2012)


    it works on iis too

    when u upload a complete website with the db it all works

    Are you saying you uploaded the .mdf files to the IIS ?? That doesn't make any sense !!


    Sujeet Singh

  • yip,

    but lets not talk about this anymore,

    its mine and your secret,

    its my key and cut above the rest,

    this is many hours of my logic

    and my key to employment or money in my pocket from anywhere in South Africa

    or the world.

    any ideas??

    Cybernet Applications

    i run it

    but in this country if you don`t know anybody and you not part of the crowd what you know means nothing

    they don`t care if you have money or family

    we will refer to it as that thing called "um" ok

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

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