|
| 1 | +# SQL Developer Examples |
| 2 | +## ConnectionHelper |
| 3 | +Accept connection info from the command line (and maybe on a [SocketServer](https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html)) |
| 4 | + |
| 5 | +### Command Line |
| 6 | +sqldeveloper -_conName_**=**_user_\[_**/**_\[_pw_]]**@**_host_**:**_port_(**:**_sid_|**/**_svc_)\[**#**_role_] |
| 7 | + |
| 8 | +Where: |
| 9 | +- *connName* is the name you would like for the connection |
| 10 | +- *user* is the user name for the schema you want to use |
| 11 | +- */password* is the password for that user *(optional - if missing e.g., user@ or user/@, SQLDeveloper will prompt for it)* |
| 12 | +- *host* is the host that the database is on |
| 13 | +- *port* is the port the database is listening on |
| 14 | +- *:sid* is the sid for the database *(One of :sid or /svc MUST be supplied)* |
| 15 | +- */svc* is the service name for the database *(One of :sid or /svc MUST be supplied)* |
| 16 | +- *#role* is the role *(optional - one of SYSDBA, SYSOPER, SYSBACKUP, SYSDG, SYSKM, SYSASM if used)* |
| 17 | + |
| 18 | +### [ConnectionHelperAddin](src/oracle/db/example/sqldeveloper/extension/connectionhelper/ConnectionHelperAddin.java) |
| 19 | +1. Creates the requested connection in a "Transient" folder |
| 20 | +2. Navigates to and opens the new connection |
| 21 | +3. Sets up a hook to remove the connection when SQLDeveloper shuts down |
| 22 | + |
| 23 | +### TODO |
| 24 | +* Preference page _(May need/want preference page as a load trigger hook)_ |
| 25 | + * CheckBox: Accept connection info on command line [false] |
| 26 | + * CheckBox: Persist command line connections [false] |
| 27 | +* [SocketServer](https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html) |
| 28 | +* Preference page |
| 29 | + * NumericSpinner: Listener port [4444] |
| 30 | + * CheckBox: Autostart server |
| 31 | + * Button: Start now |
| 32 | +* Simple client test app for [SocketServer](https://docs.oracle.com/javase/tutorial/networking/sockets/clientServer.html) |
| 33 | + |
| 34 | + |
0 commit comments