Migrating Server Questions

  • hi guys i've got some questions hope you can help me

    1. We have a database which have 2 ldf (<ldf_1, ldf_2) and 2 mdf (mdf_1, mdf_2). We are planning to migrate Database1 to another server and just make it 1 mdf and ldf (mdf_1 and ldf_2) what are the possible solutions??

    2. In Database1 there are two tables that are with same name table1 the only difference is that the first has (dbo) as owner and the other is (lester_user). I know that if we migrate the database user (lester_user) will be orphaned. If i will recreate this user (lester_user) how can SQL distinguish the table (table1) with dbo owner and lester_user owner??? what script should i use??? thanks...

    "-=Still Learning=-"

    Lester Policarpio

  • #2 first: User sp_changeobjectowner to reset the owner of the new table to Lester.

    #1: Did the db originally have 2 files for each? Lots of people like this, makes it easy to separate things across drives and improve performance.

    If you want to combine, you can move all the objects to the single MDF, then you should be able to remove it with ALTER database. Alternatively, if you're moving to a new server, use DTS or bcp out/in to move the data and objects. Create a new db as you want it and things will be in one file.

    The Generate scripts should allow you to script out all the schema, objects, and permissions.

  • Thanks for the response..

    #2 Do i need to create another user? Or can i change the owner to dbo resulting to 2 Table1 with same dbo owner? i dont think it is possible??

    Steve Jones - Editor (11/29/2007)


    If you want to combine, you can move all the objects to the single MDF, then you should be able to remove it with ALTER database. Alternatively, if you're moving to a new server, use DTS or bcp out/in to move the data and objects. Create a new db as you want it and things will be in one file.

    - Can i move all the objects to a single MDF using DTS???

    "-=Still Learning=-"

    Lester Policarpio

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

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