How to bring your old DB over to new Ver. DB files

Page 1 of 3 123 LastLast
Results 1 to 15 of 33
  1. #1
    Valued Member HellSing is offline
    MemberRank
    Apr 2005 Join Date
    VenezuelaLocation
    148Posts

    How to bring your old DB over to new Ver. DB files

    This guide was written by Khorr0 and just translated by me...Good job Khorr0

    Good this guide is something noobish because I no longer have as much time like before perfecting my works. Of all ways I think that you need some other form or util.

    First they need to do backup of its old data base.

    We are going to use for example, that I have a Server 97d and I want to move data to a Version 1.1E

    Well first, I do backup of my server 97. Now perform server MX 1.1E setup as bla must bla bla, and I recover new DB 1.1e in the data base Muonline truth? (like always)

    Now I create another one db that is called Muonline2 and in this I recover my db 97d

    In MuOnline2 change the following tables adding to them 2 in the end:

    Code:
     
    AccountCharacter
    Character
    Guild *
    GuildMember *
    MEMB_INFO
    MEMB_STAT
    OptionData
    VI_CURR_INFO
    warehouse
    So that they are left as:

    Code:
     
    AccountCharacter2
    Character2
    Guild2 *
    GuildMember2 *
    MEMB_INFO2
    MEMB_STAT2
    OptionData2
    VI_CURR_INFO2
    warehouse2
    Now we are concerned with moving the information from the database of MuOnline97d to MuOnline that is new db as:

    1.- We entered our enterprise manager of SQL
    2.- we give to right click to the database MuOnline>All Tasks>Import Data
    3.- Click next on the first window
    4.- In second we leave everything as is and change the database to MuOnline2 being sure to enter your Sql Username and Password.
    5.- the third window we did not touch except to change the SQL Username and Password.
    6.- In the fourth window we choose ?Copy the table(s) and view(s) from source database?
    7.- In the following window the tables and views you want to select are:

    Code:
     
    AccountCharacter2
    Character2
    Guild2 *
    GuildMember2 *
    MEMB_INFO2
    MEMB_STAT2
    OptionData2
    VI_CURR_INFO2
    warehouse2
    *It is not recommend to transfer the Guild and GuildMember tables however?do so at your own risk.

    Once finished with the process we go to Start>All Programs>MS SQL Server> Query Analyzer, in the analyzer we initiated the session with the premises, Windows authentication. Inside we already choose above db with which it worked: Mu Online and we executed this script:
    Now execute the following script immeaditly:

    Code:
     
    Insert Into AccountCharacter (Id, GameID1, GameID2, GameID3, GameID4, GameID5, GameIDC)
    Select AccountCharacter2.Id, AccountCharacter2.GameID1, AccountCharacter2.GameID2, AccountCharacter2.GameID3, AccountCharacter2.GameID4, AccountCharacter2.GameID5, AccountCharacter2.GameIDC from AccountCharacter2 
    GO
     
    Insert Into Character (AccountID, Name, cLevel, LevelUpPoint, Class, Experience, Strength, Dexterity,Vitality, Energy, Inventory, MagicList, Money, Life, MaxLife, Mana, MaxMana, MapNumber, MapPosX, MapPosY, MapDir, PkCount, PkLevel, PkTime, MDate, LDate, CtlCode, DbVersion, Quest)
    Select Character2.AccountID, Character2.Name, Character2.cLevel, Character2.LevelUpPoint, Character2.Class, Character2.Experience, Character2.Strength, Character2.Dexterity,Character2.Vitality, Character2.Energy, Character2.Inventory, Character2.MagicList, Character2.Money, Character2.Life, Character2.MaxLife, Character2.Mana, Character2.MaxMana, Character2.MapNumber, Character2.MapPosX, Character2.MapPosY, Character2.MapDir, Character2.PkCount, Character2.PkLevel, Character2.PkTime, Character2.MDate, Character2.LDate, Character2.CtlCode, Character2.DbVersion, Character2.Quest from Character2 
    GO
     
    Insert Into Guild ( G_Name, G_Mark, G_Score, G_Master, G_Count, G_Notice) 
    Select Guild2.G_Name, Guild2.G_Mark, Guild2.G_Score, Guild2.G_Master, Guild2.G_Count, Guild2.G_Notice from Guild2
    GO
     
    Insert Into GuildMember ( Name, G_Name, G_Level)
    Select GuildMember2.Name, GuildMember2.G_Name, GuildMember2.G_Level from GuildMember2
    GO
     
    Insert Into MEMB_INFO ( memb___id, memb__pwd, memb_name, sno__numb, post_code, addr_info, addr_deta, tel__numb, phon_numb, mail_addr, fpas_ques, fpas_answ, job__code, appl_days, modi_days, out__days, true_days, mail_chek, bloc_code, ctl1_code)
    Select MEMB_INFO2.memb___id, MEMB_INFO2.memb__pwd, MEMB_INFO2.memb_name, MEMB_INFO2.sno__numb, MEMB_INFO2.post_code, MEMB_INFO2.addr_info, MEMB_INFO2.addr_deta, MEMB_INFO2.tel__numb, MEMB_INFO2.phon_numb, MEMB_INFO2.mail_addr, MEMB_INFO2.fpas_ques, MEMB_INFO2.fpas_answ, MEMB_INFO2.job__code, MEMB_INFO2.appl_days, MEMB_INFO2.modi_days, MEMB_INFO2.out__days, MEMB_INFO2.true_days, MEMB_INFO2.mail_chek, MEMB_INFO2.bloc_code, MEMB_INFO2.ctl1_code from MEMB_INFO2
    GO
     
    Insert Into MEMB_STAT ( memb___id, ConnectStat, ServerName, IP, ConnectTM, DisConnectTM)
    Select MEMB_STAT2.memb___id, MEMB_STAT2.ConnectStat, MEMB_STAT2.ServerName, MEMB_STAT2.IP, MEMB_STAT2.ConnectTM, MEMB_STAT2.DisConnectTM from MEMB_STAT2
    GO
     
    Insert Into OptionData (Name, Skillkey, GameOption, Qkey, Wkey, Ekey, ChatWindow)
    Select OptionData2.Name, OptionData2.Skillkey, OptionData2.GameOption, OptionData2.Qkey, OptionData2.Wkey, OptionData2.Ekey, OptionData2.ChatWindow from OptionData2
    GO
     
    Insert Into VI_CURR_INFO ( ends_days, chek_code, used_time, memb___id, memb_name, memb_guid, sno__numb, Bill_Section, Bill_Value, Bill_Hour,Surplus_Point, Surplus_Minute, Increase_Days)
    Select VI_CURR_INFO2.ends_days, VI_CURR_INFO2.chek_code, VI_CURR_INFO2.used_time, VI_CURR_INFO2.memb___id, VI_CURR_INFO2.memb_name, VI_CURR_INFO2.memb_guid, VI_CURR_INFO2.sno__numb, VI_CURR_INFO2.Bill_Section, VI_CURR_INFO2.Bill_Value, VI_CURR_INFO2.Bill_Hour, VI_CURR_INFO2.Surplus_Point, VI_CURR_INFO2.Surplus_Minute, VI_CURR_INFO2.Increase_Days from VI_CURR_INFO2
    GO
     
    Insert Into warehouse ( AccountID, Items, Money, EndUseDate, DbVersion, pw)
    Select warehouse2.AccountID, warehouse2.Items, warehouse2.Money, warehouse2.EndUseDate, warehouse2.DbVersion, warehouse2.pw from warehouse2
    GO
    And ready we have db totally functional for the 1.1E

    Remember That the database you want to use(the new database, like MX 1.1E in this example) must be totally clean with no users. Another thing if in the import of the database with I number 2 gives error to them: Table or something could not be transferred as, try it again but with only one table at a time continuing till all tables are done with no errors.

    If somebody has errors of the following types:

    "NOT true_days' can insert value NULL in the column '..etc

    That is because these trying to put a value NULL of db old to one column that does not allow to value null in db new. Solution PERMIT the VALUE NULL to the column that gives the error to you, also you need put the value of it to NULL in to design table.

    Another error is for example:

    "NOT it can insert a row of keys duplicated in the object "OPTIONDATA" bla bla "

    This is because the table option dates from new db has data for that reason it cannot to duplicate to existing data, you must totally have it in target
    Last edited by HellSing; 06-06-06 at 09:51 PM.


  2. #2
    Account Upgraded | Title Enabled! Svaike is offline
    MemberRank
    Jan 2005 Join Date
    LithuaniaLocation
    212Posts
    nice, but as you write it is guide:)

  3. #3
    Valued Member HellSing is offline
    MemberRank
    Apr 2005 Join Date
    VenezuelaLocation
    148Posts
    ops im sorry i think that i was in the guides section.. sorry..

  4. #4
    Account Upgraded | Title Enabled! Svaike is offline
    MemberRank
    Jan 2005 Join Date
    LithuaniaLocation
    212Posts
    Quote Originally Posted by HellSing
    ops im sorry i think that i was in the guides section.. sorry..
    you may delte thrad and open new thread in guide section:) anyway that is very usefull^^

  5. #5
    Enthusiast Spellior is offline
    MemberRank
    Feb 2006 Join Date
    EstoniaLocation
    31Posts
    But how move DB from 1.02d ver. to 0.99.62T?

  6. #6
    Valued Member [/root.] is offline
    MemberRank
    Nov 2005 Join Date
    100Posts
    But how move DB from 1.02d ver. to 0.99.62T?
    Good Question

  7. #7
    Alpha Member javaz97 is offline
    MemberRank
    May 2006 Join Date
    HellLocation
    1,537Posts
    DECLARE @rank int
    SET @rank = 0
    WHILE @rank < 2513 --Number OF row


    BEGIN
    update MEMB_INFO
    set memb_guid = @rank, @rank = @rank + 1
    --SET @rank = @rank + 1
    --order by memb___id asc

    END

    ** Query to Resort memb_guide

    Please check relationship
    new db change all table

    Create Table and value resort Match all table and fix ect...
    try doing and fix yourself
    Last edited by javaz97; 07-06-06 at 04:36 AM. Reason: Automerged Doublepost

  8. #8
    Happy Face lopko is offline
    MemberRank
    Jul 2005 Join Date
    GlobalLocation
    494Posts
    is this guide working for transfering acc and charracters from 1.02d to 1.02I????pls tell me!

  9. #9
    Don't be a hater 1Word is offline
    MemberRank
    Jan 2006 Join Date
    At homeLocation
    1,779Posts
    i think so lopko ...

  10. #10
    Happy Face lopko is offline
    MemberRank
    Jul 2005 Join Date
    GlobalLocation
    494Posts
    Quote Originally Posted by Executio
    i think so lopko ...
    ok i will try!

  11. #11
    Member limpbizket is offline
    MemberRank
    Aug 2005 Join Date
    Hard DriveLocation
    82Posts
    i dont exsakly understand :S just need to backup 97d version db put in the 1.01e server files restore like new in SQL manager and write script in the old one db?

  12. #12
    Account Upgraded | Title Enabled! RedMG is offline
    MemberRank
    Feb 2006 Join Date
    Viêòt NamLocation
    749Posts
    Nice but I think you shouldpost it in Guide, Thx

  13. #13
    Apprentice noporeao is offline
    MemberRank
    Mar 2006 Join Date
    Brazil - Distrito Federal -BrasiliaLocation
    7Posts
    Nice.. good job..:3dflagsdo

  14. #14
    Account Upgraded | Title Enabled! Svaike is offline
    MemberRank
    Jan 2005 Join Date
    LithuaniaLocation
    212Posts
    1 big mistake when restoring 97d to 1.01E :) in 97d plate set, in 1.01E much more better:D remember that items codes differs, so better to clean inventory and vault

  15. #15
    Proficient Member JoKeR007 is offline
    MemberRank
    Jun 2006 Join Date
    152Posts
    i wana change my server to ver 1.0L i do all steps on here but i got this error
    PHP Code:
    ServerMsg 2627Level 14State 1Line 1 
    Violation of PRIMARY KEY constraint 
    'PK_AccountCharacter'Cannot insert duplicate key in object 'AccountCharacter'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_Character'Cannot insert duplicate key in object 'Character'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_Guild'Cannot insert duplicate key in object 'Guild'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_GuildMember'Cannot insert duplicate key in object 'GuildMember'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_MEMB_INFO'Cannot insert duplicate key in object 'MEMB_INFO'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_MEMB_STAT'Cannot insert duplicate key in object 'MEMB_STAT'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_OptionData'Cannot insert duplicate key in object 'OptionData'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_VI_CURR_INFO'Cannot insert duplicate key in object 'VI_CURR_INFO'
    The statement has been terminated
    ServerMsg 2627Level 14State 1Line 2 
    Violation of PRIMARY KEY constraint 
    'PK_warehouse'Cannot insert duplicate key in object 'warehouse'
    The statement has been terminated
    also in the webpage and mueditor show no accs (0 accounts)
    i tryed alot ...same error

    Quote Originally Posted by HellSing
    Another error is for example

    "NOT it can insert a row of keys duplicated in the object "OPTIONDATA" bla bla "

    This is because the table option dates from new db has data for that reason it cannot to duplicate to existing data, you must totally have it in target
    can some 1 explan this :this is my problem but i dont undertsnad it..
    Last edited by JoKeR007; 20-06-06 at 08:18 AM. Reason: Automerged Doublepost



Page 1 of 3 123 LastLast

Advertisement