How To Create New Oracle Database For Erusman VMs - SWG-Source/swg-main GitHub Wiki

=============================================================== Original discussion thread text for search result purposes:

SWGSOURCE FORUMS MARK FORUMS READ SEARCH FORUMS SUBSCRIBED FORUMS SUBSCRIBED THREADS NEW THREADS SHOWCASESWG FILESMEMBERSCHAT1 / 4 /

Forums SWG NGE Source Server Development FAQ & Guides How To Create New Oracle Database For V2.4 Vm Discussion in 'FAQ & Guides' started by Erusman, Jul 14, 2017.

Subscribe to Thread Erusman Erusman Well-Known Member Joined:May 9, 2016 Messages:673 Likes Received:298 #1Erusman, Jul 14, 2017 Last edited: Sep 8, 2017 How to Create a new Oracle database for v2.9VM by Erusman.

This guide will walk you through creating a new Oracle 12c R2 database in my v2.4 VM. (under construction)

First, you will need to understand the more databases you have running the more memory they will take up. Average its around 300mbs.

To do any kind of modifications you will need to first login to user 'oracle'. You want to manually logout of user 'root' when the VM first starts by hitting "NGE Server v2.4 by Erusman" button on toolbar. Then hit the little green guy running button. Hit 'logout' and login as oracle user. oracle swg Terminator Terminal will appear. (note you may get a swg/swg-main saying not found but this is because I haven't updated the config for terminator terminal for oracle user. Just ignore it) At prompt oracle@swg:~$ simply type the following cd $ORACLE_HOME cd bin This will place you in the binaries for oracle 12c. Now we want to launch Database confirguration assistant.. so type. ./dbca Next Hit option to "Create a database" Next under "Global database name" enter a name for your new database. We will call this swg3. So enter swg3 Administrative password just enter 'swg' And uncheck "Create as Container Database option" Hit Next You will get a Window showing that says the admin password doesn't meet requirements. Just hit Yes to continue. You will get a SGA size is greater then on system this is due to 2gigs defined in /etc/syscontl.cfg just ignore and Just hit Yes to continue. A summary will appear of memory etc. Just hit "Finish" to start the creation of the database. Creation of the database could take up to 3 to 5 minutes to complete. When it is done just hit close.

After we created our new 'swg3' database we now need to turn it on in our oratab file. In terminal just enter nano /etc/oratab Look for a line that says swg3:/u01/app/oracle/product/12.2.0/dbhome_1:N and change it too swg3:/u01/app/oracle/product/12.2.0/dbhome_1:Y Ctrl X, Y and Enter to save Your all done. su - swg reboot now Your VM will reboot and your new database swg3 will be running with the default listener. (You should now see how you would turn off a database as well :p)

You will notice an increase in startup memory in conky. From 1.15 to around 1.41GB. You can now run build_linux.sh and import the database to your new 'swg3' database. Just be sure you enter //127.0.0.1/swg3 when it prompts you for it.

Last step will be running a few sql commands for new 'swg3' datagbase to add user swg etc. Just open SQL developer and create a new connection to your new database. Use "system" & "swg" then for sid, enter "swg3" <--- or name of your new database. Copy below into the "Worksheet" window. And run the script with white page and small green arrow icon.

ALTER USER SYSTEM IDENTIFIED by "swg"; ALTER SESSION SET "_ORACLE_SCRIPT"=true; CREATE USER swg IDENTIFIED by "swg"; GRANT ALL PRIVILEGES TO swg; GRANT UNLIMITED TABLESPACE TO swg; alter system set sessions=3000 scope=spfile; alter system set processes=3000 scope=spfile; alter profile default limit password_life_time unlimited;

You now have the ability to create a new swg-main3 folder if you wish and copy entire contents of v2.1 or put another prebuilt server in it etc. However!, you will need to edit the build_linux.sh script and replace all the swg-main1 references to swg-main3.

Good luck

Do or DO NOT there is NO TRY!

Erusman REPORT BOOKMARKLIKE + QUOTE REPLY Tekaoh likes this. Tekaoh Tekaoh Active Member Joined:Apr 20, 2017 Messages:32 Likes Received:6 #2Tekaoh, Jul 14, 2017 Would this work to create a database that I can import my old 2.3d database into? and then copy /swg-main from 2.3d into /swg-main3 in 2.4? REPORT BOOKMARKLIKE + QUOTE REPLY Erusman Erusman Well-Known Member Joined:May 9, 2016 Messages:673 Likes Received:298 #3Erusman, Jul 14, 2017 Tekaoh said: ↑ Would this work to create a database that I can import my old 2.3d database into? and then copy /swg-main from 2.3d into /swg-main3 in 2.4? Yes, and no. The problem with old v2.3d database is that it was using Oracle 11G R2. @IrishDarkshadow@IrishDarkshadow method wont work by using SQLdeveloper to copy 11G R2 Enterprise to 12 that I am using in v2.4. You will get errors. I tried and it didn't work. However any old VM that ran XE you can use that method to transfer over to 12c in 2.4. Its just the 11G R2 enterprise to 12c R2 Enterprise that that method is the problem. You will probably have to look up method other oracle users have done to transfer 11g r2 enterprise to 12c. I believe you need to use Rman and datapump import / export. I haven't attempted but I am sure its possible. Just not with @IrishDarkshadow@IrishDarkshadow method. HOWEVER, I have not tried all possibilities. I mean you might have to import the tables using build_linux.sh script to the new database first and name it the same galaxy cluster you did in that database you want to import over. Be sure if you are creating a whole new swg-main3 folder.. you will need to add all the path differences in build_linux.sh script. That should be the only differences you will need to do to get it running in swg-main3 folder. If you do try and get a method to work between 11g r2 enterprise to 12c, let me know. Again, @IrishDarkshadow@IrishDarkshadow method may still work. It just might need a few prerequisites setup first. REPORT BOOKMARKLIKE + QUOTE REPLY Tekaoh likes this. IrishDarkshadow IrishDarkshadow Well-Known Member Joined:May 18, 2017 Messages:441 Likes Received:131 #4IrishDarkshadow, Jul 14, 2017 I'm currently writing up a guide for importing a simple object into the game (movie poster / painting). I have downloaded the new 2.4 vm but have not worked with it yet. Hopefully I can finish up the guide I'm doing today so I can start to test the new VM tomorrow and update the db transfer guide as needed.

The transfer method just pulls the tables / rows from one database and places them into another database. The new vm might need there to be a database already in there with the table structure / schema in place. I'll play around with it tomorrow hopefully to figure it out. In the interim if we have an SQL experts on here that can test it out before I get to it then that would work too. REPORT BOOKMARKLIKE + QUOTE REPLY Write your reply...

Write your reply...

Users Who Are Viewing This Thread (Users: 1, Guests: 0) Users Who Have Read This Thread (Total: 0) Share This Page ABOUT US Community for sharing and guides on how to get a SWG Server up and running. Our goal is to allow people to share information freely and publicly and to preserve that information.

QUICK JUMP Home About Forums Downloads USEFUL LINKS Alpha Delta Omega REGULATIONS Forum software by XenForo™ ©2010-2017 XenForo Ltd.

SWGSource Home Help Terms and Rules

===============================================================