Migrating From Reality to Default Database Schema

Discussion in 'Announcements' started by seaweeduk, Oct 8, 2013.

  1. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124
    I am waiting anxiously to hear whats happening with the planned Reality changes.

    Personally I am tired of the extra problems caused by reality (no gender selection, traps don't work etc) and want to move my server back to the default hive. However I do not want to lose the contents of my database which I have had running almost a year.

    I am looking for a way to migrate from one schema to the other and was wondering if anyone had anything? Thevisad did say he'd be providing a way for people to migrate with the upcoming reality changes he mentioned last month so I was hoping something might be available?

    With 1.8.0.2 things like traps aren't working properly, there's tent duping issues etc and I just want to get away from all these problems Reality is causing and run the server under the original schema.
     
  2. Soul

    Soul Valued Member!

    Joined:
    Mar 24, 2013
    Messages:
    196
    Likes Received:
    34
    No idea seaweeduk, but i'm pretty much wanting the same thing. Cant take a few hundreds of players nagging my head of over loss of there characters and humanity they've build up over the past year playing on our servers...
     
  3. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124

    Yup I switched our db over last night people are pissed :/
     
  4. Soul

    Soul Valued Member!

    Joined:
    Mar 24, 2013
    Messages:
    196
    Likes Received:
    34
    ? how did you switch over your db
    i see no new server files released anywhere
     
  5. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124

    @Hive comes with everything you need import the SQL files to a new db and thats it, Call pMain(1) to spawn vehicles etc
     
  6. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124
    I'll leave these here for now

    Code:
    INSERT INTO NEWSERVER.character_data ( playerid, PlayerUID, InstanceID, Datestamp, LastLogin, Inventory, Backpack, Worldspace, Medical, Alive, Generation, LastAte, LastDrank, KillsZ, HeadshotsZ, distanceFoot, duration, currentState, KillsH, Model, KillsB, Humanity, last_updated)
    select '1000', profile.unique_id, '1', start_time, last_updated, inventory, backpack, worldspace, medical, '1', '1', NOW(), NOW(), zombie_kills, headshots, '0', survival_time, state, survivor_kills, model, bandit_kills, profile.humanity, last_updated  FROM survivor inner join profile on survivor.unique_id = profile.unique_id where is_dead = 0
    Code:
    INSERT INTO NEWSERVER.character_dead ( playerid, PlayerUID, InstanceID, Datestamp, LastLogin, Inventory, Backpack, Worldspace, Medical, Alive, Generation, LastAte, LastDrank, KillsZ, HeadshotsZ, distanceFoot, duration, currentState, KillsH, Model, KillsB, Humanity, last_updated)
    select '1000', profile.unique_id, '1', start_time, last_updated, inventory, backpack, worldspace, medical, '0', '1', NOW(), NOW(), zombie_kills, headshots, '0', survival_time, state, survivor_kills, model, bandit_kills, profile.humanity, last_updated  FROM survivor inner join profile on survivor.unique_id = profile.unique_id where is_dead = 1
    I lost the queries I ran earlier for profiles/player_data but I'll write them again later if anyone wants them

    Also imported my vehicles spawn points just object_data left to go now....
     
    Soul likes this.
  7. Soul

    Soul Valued Member!

    Joined:
    Mar 24, 2013
    Messages:
    196
    Likes Received:
    34
    so basically you're running reality 1.8 with official hive, does that mean your using official hiveext.dll
    argh i'm actually confuseled this time xD
     
  8. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124

    I'm not using anything Reality related any more, official hive on a private database only reality thing I use is restarter.exe :)

    Download this - http://se1.dayz.nu/latest/1.8.0.2/@Hive-1.8.0.2-Patch.rar

    Import each of the sql files to a new db
    configure hiveext.ini to point to the new db
    run the sql command call pmain(1) to spawn your vehicles
    Start your server, you can use restarter.exe to keep it running just remember to swap the option for @reality_1.chernarus for @Hive in the -mod part of restarter.ini
     
  9. Soul

    Soul Valued Member!

    Joined:
    Mar 24, 2013
    Messages:
    196
    Likes Received:
    34
    i do run my own bat files to cleanup the database and respawn vehicles each server restart so that's another thing i'd need to look into...
     
  10. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124

    It's all built into sql procedures/functions by the look of it. I've not had time to have a proper dig about yet but call Pmain(INSTANCENUMBER) will cleanup and respawn vehicles. You can schedule it to run within sql itself or setup a batch file to run an sql query with that command.
     
  11. Sharkking

    Sharkking Valued Member!

    Joined:
    Apr 24, 2013
    Messages:
    319
    Likes Received:
    26
    If you are running a mysql community server the batch to spawn/delete vehicles and more would be

    Code:
    "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -u<DBUSER> -p<DBPASS> --database=<DBNAME> --execute="call pMain(1);call pMain(1);call pMain(1);call pMain(1);"
    Within pMain you can also set the vehicle spawn limit.

    Code:
        DECLARE iVehSpawnMax INT DEFAULT 250;
    you should take a look at the pCleanup function as there is stuff like Tent deleting that may not fit your needs.
     
  12. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124

    Shouldn't that be

    Code:
    "C:\Program Files\MySQL\MySQL Server 5.6\bin\mysql.exe" -u<DBUSER> -p<DBPASS> --database=<DBNAME> --execute="call pMain(1);"
    Why run it 4 times?
     
  13. rosska85

    rosska85 Valued Member!

    Joined:
    Aug 13, 2013
    Messages:
    508
    Likes Received:
    66
    Sadly our hosts, HFB, don't give us access to the start up commands. It's just a button called start. So I can't actually change the paths for any files during startup or restart. Their whole control panel is tied to Reality. I'm fearing that this may cause issues.
     
  14. Sharkking

    Sharkking Valued Member!

    Joined:
    Apr 24, 2013
    Messages:
    319
    Likes Received:
    26

    if you have a larger number of ISpawnMax it can be that a one time call only spawns like 100 vehicles instead of 250 because of the maxnum and chance calculation from the object_classes table. This only applys if you start with an empty object_data table and can be removed after first start. (nevertheless it doesn´t hurt)
     
  15. Marcuz

    Marcuz New Member

    Joined:
    Feb 5, 2013
    Messages:
    16
    Likes Received:
    0
    If anyone needs the query to do the profiles use this:

    Code:
    ALTER TABLE NEWSERVER.player_data MODIFY COLUMN playerName VARCHAR(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL;
     
    INSERT INTO NEWSERVER.player_data (playerUID, playerName)
    SELECT unique_id, name FROM profile
     
  16. seaweeduk

    seaweeduk OpenDayZ Rockstar!

    Joined:
    Nov 19, 2012
    Messages:
    535
    Likes Received:
    124

    Ah ok we don't have that problem < 100 vehicles :)
     
  17. Soul

    Soul Valued Member!

    Joined:
    Mar 24, 2013
    Messages:
    196
    Likes Received:
    34
    we have about 221 vehicles currently on our reality hive
    i tried the call pmain and it spawned 89 vehicles while i set the max to 250
    tried calling it multiple times and it kept to 89, weird aint it?
     
  18. rosska85

    rosska85 Valued Member!

    Joined:
    Aug 13, 2013
    Messages:
    508
    Likes Received:
    66
    Might be a stupid question, but did you up the max allowed for each vehicle type in your DB? It may well have hit the limits for them.
     
  19. Soul

    Soul Valued Member!

    Joined:
    Mar 24, 2013
    Messages:
    196
    Likes Received:
    34
    nope not a stupid question, i'm seariously confused atm sorry guys
    but reality comming to an end is going to give me a serious headache
    due to the way our server directory is setup and on top of that its all
    handled by tcadmin wich is also a serious bitch to setup :(

    basically its like this

    Code:
    //DayZServers <-- contains arma2 co and everything else
    //
    //  //uk431 <-- contains all game server setups
    //  //  //1 <-- server 1
    //  //  //2 <-- server 2
    ...
    DayZServers contain:
    - Arma 2 CO
    - dayz dll files
    - mod folders
    - seperate server folders
     
  20. indepth

    indepth Member

    Joined:
    Feb 4, 2013
    Messages:
    98
    Likes Received:
    17
    Anyone got a SQL command to import the vehicle from REALITY to hives shema?
    Can't figure it out. I just want the spawn, don't care of the actual vehicles on the server.


    Indepth!
     

Share This Page