SQL Plus Accessing Databases

SQL Plus Accessing Databases, tutoriel & guide de travaux pratiques en pdf.

Accessing Databases

Use the following commands to access and copy data between tables on different databases.
CONN[ECT] [{ logon | /} [AS {SYSOPER | SYSDBA}]] where logon requires the following syntax: username [/ password ] [@ connect_identifier ] Connects a given username to the Oracle Database. If you omit connect_ identifier, SQL*Plus connects you to the default database. If you omit username and/or password, SQL*Plus prompts you for them. CONNECT followed by a slash (/) connects you using a default (OPS$) logon. When you run a CONNECT command, the site profile, glogin.sql, and the user profile, login.sql, are processed in that order. CONNECT does not reprompt for username or password if the initial connection does not succeed.
DISC[ONNECT] Commits pending changes to the database and logs the current user out of Oracle, but does not exit SQL*Plus. In SQL*Plus command line, use EXIT or QUIT to log out of Oracle and return control to your computer’s operating system. In iSQL*Plus, click the Logout button to log out of Oracle.
COPY {FROM database | TO database | FROM database TO database } {APPEND | CREATE | INSERT | REPLACE} destination_table [( column , column , column , …)] USING query where database has the following syntax: username [/ password ] @connect_identifier Copies data from a query to a table in the same or another database. APPEND, CREATE, INSERT or REPLACE specifies how COPY treats the existing copy of the destination table (if it exists). USING query identifies the source table and determines which rows and columns COPY copies from it. COPY supports CHAR, DATE, LONG, NUMBER and VARCHAR2 datatypes.
PASSW[ORD] [ username ] Allows you to change a password without displaying it on an input device. In iSQL*Plus, you can also use the Password screen to change your password.

Miscellaneous

ARCHIVE LOG {LIST | STOP} | {START | NEXT | ALL | integer }[TO destination ] Starts or stops automatic archiving of online redo logs, manually (explicitly) archives specified redo logs, or displays information about redo log files.
DESC[RIBE] {[ schema .] object [ @connect_identifier ]} Lists the column definitions for a table, view or synonym, or the specifications for a function or procedure.
RECOVER { general | managed | BEGIN BACKUP | END BACKUP} where the general clause has the following syntax: [AUTOMATIC] [FROM location ] { { full_database_recovery | partial_database_recovery | LOGFILE filename } [ {TEST | ALLOW integer CORRUPTION | parallel_clause } [TEST | ALLOW integer CORRUPTION | parallel_clause ]…] |CONTINUE [DEFAULT] | CANCEL} where the full_database_recovery clause has the following syntax: [STANDBY] DATABASE [ {UNTIL {CANCEL | TIME date | CHANGE integer } | USING BACKUP CONTROLFILE} [UNTIL {CANCEL | TIME date | CHANGE integer } | USING BACKUP CONTROLFILE]…] where the partial_database_recovery clause has the following syntax: {TABLESPACE tablespace [, tablespace ]… | DATAFILE { filename | filenumber } [, filename | filenumber ]…
| STANDBY {TABLESPACE tablespace [, tablespace ]… | DATAFILE { filename | filenumber } [, filename | filenumber ]…} UNTIL [CONSISTENT WITH] CONTROLFILE } where the parallel clause has the following syntax: { NOPARALLEL | PARALLEL [ integer ] } where the managed clause has the following syntax: MANAGED STANDBY DATABASE recover_clause | cancel_clause | finish_clause where the recover_clause has the following syntax: { { DISCONNECT [ FROM SESSION ] | { TIMEOUT integer | NOTIMEOUT } } | { NODELAY | DEFAULT DELAY | DELAY integer } | NEXT integer | { EXPIRE integer | NO EXPIRE } | parallel_clause | USING CURRENT LOGFILE | UNTIL CHANGE integer | THROUGH { [ THREAD integer ] SEQUENCE integer.

Cours gratuitTélécharger le cours complet

Télécharger aussi :

Laisser un commentaire

Votre adresse e-mail ne sera pas publiée. Les champs obligatoires sont indiqués avec *