gsp tool connect to database to extract metadata
Execute the script first compile, then run.
1, compile
- mac & linux
./compile.sh
- windwos
compile.bat
2, run
- mac & linux
./run.sh /t <database type> [/h <host> /P <port>] [/jdbc <jdbcurl>] /u <username> /p <password> /db <database>
- windwos
run.bat /t <database type> [/h <host> /P <port>] [/jdbc <jdbcurl>] /u <username> /p <password> /db <database>
https://www.gudusoft.com/dl/dbConnect-1.2.0.zip
update date: 2021/11/26
In order to run this utility, please install Oracle JDK1.8 or higher on your computer correctly.
unzip dbConnect-1.1.0.zip
Usage: ./start.sh /t <database type> [/h <host> /P <port>] [/jdbc <jdbcurl>] /u <username> /p <password> /db <database>
/t: Required, set the database type.
/h: Optional, specify the host of jdbc connection
/P: Optional, specify the port of jdbc connection, note it's capital P.
/u: Optional, specify the username of jdbc connection.
/p: Optional, specify the password of jdbc connection, note it's lowercase P.
/db: Optional, specify the database of jdbc connection.
/jdbc: Optional, specify the jdbc url of connection.
Here is the list of available database after /t option:
azure,db2,greenplum,hive,mssql,sqlserver,mysql,netezza,oracle,postgresql,postgres,redshift,snowflake,teradata
Tables are under this database: AdventureWorksDW2019
.
./start.sh /t mssql /h localhost /P 1433 /u root /p password /db AdventureWorksDW2019
Connect using the specified JDBC URL.
Note that on Windows, this approach does not work.
./start.sh /t mssql /jdbc jdbc:sqlserver://127.0.0.1:1433;DatabaseName=AdventureWorksDW2019 /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t mssql /driver com.microsoft.sqlserver.jdbc.SQLServerDriver /jdbc jdbc:sqlserver://127.0.0.1:1433;DatabaseName=AdventureWorksDW2019 /u root /p password
Tables are under this database: orcl
.
./start.sh /t oracle /h localhost /P 1521 /u root /p password /db orcl
Connect using the specified JDBC URL.
./start.sh /t oracle /jdbc jdbc:oracle:thin:@127.0.0.1:1521/orcl /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t oracle /driver oracle.jdbc.driver.OracleDriver /jdbc jdbc:oracle:thin:@127.0.0.1:1521/orcl /u root /p password
Tables are under employees
database.
./start.sh /t mysql /h localhost /P 3306 /u root /p password /db employees
Connect using the specified JDBC URL.
./start.sh /t mysql /jdbc jdbc:mysql://127.0.0.1:3306/employees /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t mysql /driver com.mysql.cj.jdbc.Driver /jdbc jdbc:mysql://127.0.0.1:3306/employees /u root /p password
Tables are under kingland
database.
./start.sh /t postgresql /h localhost /P 5432 /u root /p password /db kingland
Connect using the specified JDBC URL.
./start.sh /t postgresql /jdbc jdbc:postgresql://127.0.0.1:5432/kingland /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t postgresql /driver org.postgresql.Driver /jdbc jdbc:postgresql://127.0.0.1:5432/kingland /u root /p password
Tables are under MASTER_DB
database.
./start.sh /t netezza /h localhost /P 5480 /u root /p password /db MASTER_DB
Connect using the specified JDBC URL.
./start.sh /t netezza /jdbc jdbc:netezza://127.0.0.1:5480/MASTER_DB /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t netezza /driver org.netezza.Driver /jdbc jdbc:netezza://127.0.0.1:5480/MASTER_DB /u root /p password
Tables are under postgres
database.
./start.sh /t greenplum /h localhost /P 2345 /u root /p password /db postgres
Connect using the specified JDBC URL.
Note that on Windows, this approach does not work.
./start.sh /t greenplum /jdbc jdbc:pivotal:greenplum://127.0.0.1:2345;DatabaseName=postgres /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t greenplum /driver com.pivotal.jdbc.GreenplumDriver /jdbc jdbc:pivotal:greenplum://127.0.0.1:2345;DatabaseName=postgres /u root /p password
Tables are under DEMO_DB
database.
./start.sh /t snowflake /h localhost /P 443 /u root /p password /db DEMO_DB
Connect using the specified JDBC URL.
Note that on Windows, this approach does not work.
./start.sh /t snowflake /jdbc jdbc:snowflake://127.0.0.1:443?db=DEMO_DB /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t snowflake /driver net.snowflake.client.jdbc.SnowflakeDriver /jdbc jdbc:snowflake://127.0.0.1:443?db=DEMO_DB /u root /p password
Tables are under DBC
database.
./start.sh /t teradata /h localhost /P 1025 /u root /p password /db DBC
Connect using the specified JDBC URL.
Note that on Windows, this approach does not work.
./start.sh /t teradata /jdbc jdbc:teradata://127.0.0.1/DBS_PORT=1025 /u root /p password /db DBC
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t teradata /driver com.teradata.jdbc.TeraDriver /jdbc jdbc:teradata://127.0.0.1/DBS_PORT=1025 /u root /p password /db DBC
If you want to use version 17, delete the Teradata driver package from the lib directory and move the teradata driver package to the lib directory with the database set to DBC.
Connect to Hive server and fetch the metadata to help resolve the ambiguous columns in SQL query.
Tables are under default
database.
You can use the command like this:
./start.sh /t hive /h localhost /P 10000 /u root /p password /db default
Connect using the specified JDBC URL.
./start.sh /t hive /jdbc jdbc:hive2://localhost:10000/default /u root /p password
Connect using the specified JDBC URL and you can use other driver.First, you need to place the driver package in the lib directory.
./start.sh /t hive /driver org.apache.hive.jdbc.HiveDriver /jdbc jdbc:hive2://localhost:10000/default /u root /p password