Reconnecting to a different database

If you have questions or if you want to share your opinion about Aware IM post your message on this forum
Post Reply
bwalk
Posts: 54
Joined: Thu May 10, 2018 12:10 am

Reconnecting to a different database

Post by bwalk »

Hello Group,
I have a Business Space that was created using the default MySQL database, BASDB and BASDBTest.
I have copied all the tables for this Business Space to it's database within the MySQL database.
Is there a way I can reconnect the existing Business Space to this new MySQL database or do I need to create a new business space and import the bsv?
I hope this makes sense. If not I can try to modify my explanation.
Thanks
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reconnecting to a different database

Post by Jaymer »

edit basserver.props in c:\awareim\bin

you should see 4 references to basdb & basdbtest
try renaming those to the new "pair"

jaymer...
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
bwalk
Posts: 54
Joined: Thu May 10, 2018 12:10 am

Re: Reconnecting to a different database

Post by bwalk »

Hello Jaymer,
I will give that a try later today.
Thanks
BobK
Posts: 545
Joined: Thu Jan 31, 2008 2:14 pm
Location: Cincinnati, Ohio, USA

Re: Reconnecting to a different database

Post by BobK »

Just in case you were unaware... :)

If you do as Jaymer suggests, AwareIM will no longer use the BASDB and BASDBTEST databases. So, you also have to copy all the tables that AwareIM uses internally to your new DB. Also, all of the BS tables will still need the BS prefix.
Bob
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reconnecting to a different database

Post by Jaymer »

Good catch Bob. Yes he would’ve probably got an error when he went to start up. I misread his original post. He said he copied all tables in the business space, but yeah that needs to be plus all the system tables too. Hope that works.
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
bwalk
Posts: 54
Joined: Thu May 10, 2018 12:10 am

Re: Reconnecting to a different database

Post by bwalk »

I just want to separate the new BS tables from the AwareIM default so that these tables will be in their own DB.
Thanks
Jaymer
Posts: 2454
Joined: Tue Jan 13, 2015 10:58 am
Location: Tampa, FL
Contact:

Re: Reconnecting to a different database

Post by Jaymer »

i think what you're going to need to do is
1) create a new BSV, and set its location(s) to the new database you want
2) export original BSV / import to the new BSV (and new loc)
3) publish it to create all the tables
4) shutdown aware & MySQL
5) physically copy the database tables to the new location
6) restart all and test the "new" app to see if all the data is there
Click Here to see a collection of my tips & hacks on this forum. Or search for "JaymerTip" in the search bar at the top.

Jaymer
Aware Programming & Consulting - Tampa FL
Post Reply