Con le operazioni di prima sono riuscito ad abilitare l'interfaccia di gestione via web per oracle. In questa sezione prendo appunti da questa sorgente http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25610/toc.htm per eseguire le prime operazioni basilari
Unlocking the Sample User Account
Per usare oracle bisogna avere un utente. Di default è presente un user HR che ha a disposizione una serie di tabelle e di schema di esempio per sicurezza quest'utente è disabilitato.
Per modificare le impostazioni di un account andare Home>Administration>Manage Database Users cliccare sull'utente. Bisogna settare la password , mettere some stato unlocked , nei ruoli assicurarsi di che siano checked CONNECT e RESOURCE. Cliccare su alter user.
A questo punto si può fare il logout e riconnettersi come utente hr.
Creating a Simple Application
Facciamo un po' di pratica creando un'applicazione, basandoci sulla tabella EMPLOYEES che è parte dello schema hr.
Nella guida sono spiegati tutti i passi per creare un'applicazione web a partire da una tabella già presente il tutto in pochi click. Molto carino
2 Day DBA
Questa http://docs.oracle.com/cd/B25329_01/doc/admin.102/b25107/toc.htm sembra la guida per amministrare la base di dati.
2 - Starting Up and Shutting Down
Entrare come
SQLPLUS / AS SYSDBA
The slash (/) indicates that the database should authenticate you with operating system authentication.
At the SQL Command Line prompt, enter the following command:
STARTUP
Si avrà in output qualcosa del genere
ORACLE instance started.
Total System Global Area 599785472 bytes
Fixed Size 1220804 bytes
Variable Size 180358972 bytes
Database Buffers 415236096 bytes
Redo Buffers 2969600 bytes
Database mounted.
Database opened.
Per fare una prova che tutto funzioni eseguire una query che deve sicuramente funzionare
select count(*) from hr.employees;
Per spegnere
SHUTDOWN IMMEDIATE
Da qualcosa del tipo
Database closed.
Database dismounted.
ORACLE instance shut down.
Se si preme CTRL-C to interrupt the command, and then enter the following command:
SHUTDOWN ABORT
The database must go through a recovery process when it starts up after a SHUTDOWN ABORT command. It is recommended that you enable the recovery process to take place immediately, after which you can shut down the database normally. To do this, enter the following commands when the SHUTDOWN ABORT completes:
STARTUP
SHUTDOWN IMMEDIATE
3 - Connecting to the Database
Bisogna avere il client installato, posso farlo come sopra con apt installando il client oltre che il server. Altrimenti installo i pacchetti risolvendo prima le dipendenze.
Formato sintattico
username/password@[//]host[:port][/service_name]
This example initiates a remote connection using the default port number, and includes the optional service name.
CONNECT system/mypassword@mydbserver.mydomain.com/XE