billchen198318 / bamboobsc

next version move to https://github.com/billchen198318/hillfog, bambooBSC is an opensource Balanced Scorecard (BSC) Business Intelligence (BI) Web platform. BSC's Vision, Perspectives, Objectives of strategy, Key Performance Indicators (KPIs), Strategy Map, and SWOT, PDCA & PDCA report, Time Series Analysis.
Apache License 2.0
227 stars 109 forks source link

Oracle DB support #34

Closed maltourky closed 7 years ago

maltourky commented 8 years ago

Dear Bill,

how are you, i hope you are fine. i am php developer and not in java development at all so please be patient to my questions.

i did download the oracle driver ojdbc6.jar and put it in all WEB-INF\lib for all webapps and also did configure Oracle driver in the database table qc_data_source_driver with the following class name oracle.jdbc.driver.OracleDriver and in the table qc_data_source_conf i configure the JDBC_URL jdbc:oracle:thin:username/password@database:1521:xe

i tried to change the configuration file applicationContext-dataSource.properties in each webapps like the following:

dataSource.driverClass=oracle.jdbc.driver.OracleDriver dataSource.jdbcUrl=jdbc:oracle:thin:@//darabase:1521/XE dataSource.user=username dataSource.password=password dataSource.maxPoolSize=48 dataSource.minPoolSize=1 dataSource.initialPoolSize=1 dataSource.maxIdleTime=120

after restart the server nothing appears in the page except the top bar with the application dropdown and only the refresh option is there

so could you please guide me how to make it work migrating to the oracle database?

thanks for your time.

billchen198318 commented 8 years ago

Config qc_data_source_conf and put ojdbc6.jar is only support OLAP for QCHARTS-WEB, if you want all bambooBSC system support Oracle db, you need jump current mysql bbcore data to Oracle, thanks.

billchen198318 commented 8 years ago

maybe give me some day to try how to jump mysql to oracle db, my pc is very low, run oracle db is busy and not easy.

billchen198318 commented 8 years ago

I want to know some questions:

  1. Do you want to use the OLAP features like(01 - Basic query, 02 - Analytics)
  2. Or want bambooBSC use MySQL database change to Oracle-DB

please answer to me. 1 or 2.

thanks.

maltourky commented 8 years ago

Dear chen, It is 2 i want to move totally to use oracle db instead of the current MYSQL database.

billchen198318 commented 7 years ago

OK, i will to try how to jump Oracle-DB, i will response issues if jump MySQL to Oracle-DB is success complete.

maltourky commented 7 years ago

That would be grate and tell me if there is anything I can do from my side.

billchen198318 commented 7 years ago

I tested all day The main problem now is: Some of the bambooBSC table field name is a reserved word in Oracle-DB, like SYS_ID So if want to transfer to Oracle, then the table mapper Object and table field name must be change. I think currently is no way support Oracle-DB in 0.6.6 release. Support Oracle-DB plan i want move do in next version 0.7.0 .

move issues to Plan for 0.7.0 version https://github.com/billchen198318/bamboobsc/issues/33

maltourky commented 7 years ago

i did manage to migrate the Database form MySQL to Oracle - using Oracle SQL Developer - with errors in the fields that marked not null but has null value, otherwise everything work perfectly.

if the migration did not work the try to copy the tables one by one and that at lest create the table empty.

and here is a drop form Oracle SQL Developer for the table TBSYS: `CREATE TABLE "BBCORE"."TB_SYS" ( "OID" CHAR(36 CHAR) NOT NULL ENABLE, "SYS_ID" VARCHAR2(10 CHAR) NOT NULL ENABLE, "NAME" VARCHAR2(100 CHAR) NOT NULL ENABLE, "HOST" VARCHAR2(200 CHAR) NOT NULL ENABLE, "CONTEXT_PATH" VARCHAR2(100 CHAR) NOT NULL ENABLE, "IS_LOCAL" VARCHAR2(1 CHAR) NOT NULL ENABLE, "ICON" VARCHAR2(20 CHAR) NOT NULL ENABLE, "CUSERID" VARCHAR2(24 CHAR) NOT NULL ENABLE, "CDATE" DATE NOT NULL ENABLE, "UUSERID" VARCHAR2(24 CHAR), "UDATE" DATE ) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAULT CELL_FLASH_CACHE DEFAULT) TABLESPACE "SYSTEM" ;`

i want to correct the JDBC_URL to jdbc:oracle:thin:username/password@Server:1521:xe

billchen198318 commented 7 years ago

i has manage to migrate the Database form MySQL to Oracle completed. but in bambooBSC runtime run SQL error, because SYS_ID cannot in SQL SELECT command with Oracle-DB expression version.

This SQL command cannot run with my Oracle-DB expression version. It need for bambooBSC.

    select
        tbsys0_.OID as OID1_2_,
        tbsys0_.CDATE as CDATE2_2_,
        tbsys0_.CONTEXT_PATH as CONTEXT_PATH3_2_,
        tbsys0_.CUSERID as CUSERID4_2_,
        tbsys0_.HOST as HOST5_2_,
        tbsys0_.ICON as ICON6_2_,
        tbsys0_.IS_LOCAL as IS_LOCAL7_2_,
        tbsys0_.NAME as NAME8_2_,
        tbsys0_.SYS_ID as SYS_ID9_2_,
        tbsys0_.UDATE as UDATE10_2_,
        tbsys0_.UUSERID as UUSERID11_2_ 
    from
        tb_sys tbsys0_ 
    where
        1=1 
        and tbsys0_.SYS_ID='CORE'

This SQL command is generate by Hibernate ORM framework lib.