Pages

30/11/2019

oracle sql developer access mysql, mssql


How to access MySQL through Oracle SQL Developer
如何使用Oracle SQL Developer 存取 MySQL


在軟件工程上,很多時侯會接觸不同的Database,
例如有
MsSQL, MySQL, Oracle DB, MongoDB, SQLite, Azure DB, Amazon Database, Microsoft Access
假如每一款Database也使用不同的存取工具是一件不太理想的事情,比如安裝、定期更新、學習每款工貝的使用方法,N款工具,增加N倍工作量,會為自已製造不少麻煩。

今次,杜芬宅介紹使用Oracle SQL Developer

License Model

Named User license / Per Seat Licenses

The user name is specified when the software is purchased or registered, and while you can install the software on multiple systems, only the named user can access the software on one system at any given time.
銷售合約指明有多少使用者,使用者的登入名稱,只有指明的使用者可以使用產品/服務。
費用以多少名使用者計算。

Concurrent User license

Enables a pool of licenses to be shared across a group of potential users, with the licensing mechanism ensuring that at no point in time is the maximum concurrent number of licenses exceeded.
容許在產品/服務中建立多個使用帳戶,但限制同時存取產品/服務的最高使用者數量。

Processor License

Processor License allows an unlimited number of users to access the software that is installed on that processor for products licensed through a per processor model. Each processor in the Operating System Environment (OSE) will need a license.
The seller will set a base for each branch/model CPU, the selling price calculation method is
Total license price = CPU cores * base * processor license price

按電腦的CPU數收取費用,賣方會為不同廠商和型號的CPU設一個基數,
軟件授權費用 = CPU核數 * 基數 * 價錢


For Oracle Database Standard Edition 2
Named User Plus: USD 350 / year
Processor License: USD 17500 / year

Core Factor Table

Oracle 產品的價錢都不是一般的平,不會是平民使用的東西。
打個比喻,有資本可以負擔這成本的公司,規模不會是一間辦公室,不會是一層辦公室,會是一棟大廈。

使用Oracle DB的客戶例如有政府,企業,頒授副學士或以上學歷的教育機構……
接下來完整教學,看圖識字。

Download

Visit https://www.oracle.com/tools/downloads/sqldev-v192-downloads.html
Download the latest "Windows 64-bit with JDK 8 included" version

if you use the without JDK version "Windows 32-bit/64-bit", you will need to install Java JDK.(https://www.oracle.com/technetwork/java/javase/downloads/jdk13-downloads-5672538.html)


Check "I accept the Oracle License Agreement"
Click [Download sqldeveloper ...] button

It will asks for sign in
Create an account if you don't have
Sign in with your Oracle account

The download will auto started after sign in, if not
Click "if you are not ..." button

Installation

Unzip the downloaded zip file


Execute the "sqldeveloper.exe" file

Click [No] button on ask "Confirm Import Preferences"

Untick the box "Allow automated usage reporting to Oracle"
Click [OK] button

My installed version is 18.2.0.183 Build 183.1748


Add MySQL JDBC


Visit http://dev.mysql.com/downloads/file.php?id=456317

Find the "mysql-connector-java-5.*.zip"
Click [Download] button

Click "No thanks, just start my download."


Unzip the zip file, you will see the "mysql-connector-java-5.1.48.jar"

Run "SQL developer"
Select Tools > Preferences...

Expand and select "Third Party JDBC Drivers"
Click [Add Entry...] button

Locate to your unzipped "mysql-connector-java-5.1.48.jar" location
Select on the "mysql-connector-java-5.1.48.jar" and click [Select]

Click [OK]
Close the SQL Developer

Restart the SQL Developer
Click the add icon, you will see a "MySQL" tab
Input the MySQL connection information
Click [Save] could save the connection information for next connect
Click [Test], you will find the connection test result on the bottom left
Click [Connect] to start your query


Add MsSQL ODBC

Visit https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver15
Download the "JDBC Driver for SQL Server"

For an early version, visit https://sourceforge.net/projects/jtds/files/
jTDS - SQL Server and Sybase JDBC driver v1.3.1




Unzip the zip file, you will see the "jtds-*.jar"


Do the same as above

Run "SQL developer"
Select Tools > Preferences...
Expand and select "Third Party JDBC Drivers"
Click [Add Entry...] button
Locate to your unzipped "jtds-*.jar" location
Select on the "jtds-*.jar" and click [Select]

Click [OK]
Close the SQL Developer

Restart the SQL Developer
Click the add icon, you will see a "SQL Server" tab



Reference

甲骨文Oracle的版本與授權,以DB為例
https://blog.xuite.net/chiouchienchung/twblog/174429884-%E7%94%B2%E9%AA%A8%E6%96%87Oracle%E7%9A%84%E7%89%88%E6%9C%AC%E8%88%87%E6%8E%88%E6%AC%8A%EF%BC%8C%E4%BB%A5DB%E7%82%BA%E4%BE%8B

Oracle資料庫如何授權收費(Database Licensing)
https://www.itread01.com/content/1549626871.html

License Price Lists - Oracle Technology
https://www.oracle.com/corporate/pricing/#technology

Oracle License and Services Agreement (OLSA)
https://www.oracle.com/corporate/contracts/contract-documents/license-services-agreement.html#lsa

Oracle Processor Core Factor Table
http://www.oracle.com/us/corporate/contracts/processor-core-factor-table-070634.pdf

Download Microsoft JDBC Driver for SQL Server
https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-ver15

Oracle SQL Developer Downloads
https://www.oracle.com/technetwork/developer-tools/sql-developer/downloads/index.html

MySQL : Connections in SQL Developer
https://oracle-base.com/articles/mysql/mysql-connections-in-sql-developer

MySQL Connectors
https://www.mysql.com/products/connector/

Connect SQL Server
https://www.oracle.com/technetwork/database/migration/connect-sqlserver-1945229.html

Configure JDBC Driver in SQL Developer
https://www.oracle.com/technetwork/database/migration/jdbc-migration-1923524.html

jTDS - SQL Server and Sybase JDBC driver
http://sourceforge.net/project/showfiles.php?group_id=33291

Download Microsoft JDBC Driver for SQL Server
https://docs.microsoft.com/en-us/sql/connect/jdbc/download-microsoft-jdbc-driver-for-sql-server?view=sql-server-2017

No comments:

Post a Comment