Privilegios en oracle..ejercicio

Solo disponible en BuenasTareas
  • Páginas : 6 (1252 palabras )
  • Descarga(s) : 0
  • Publicado : 8 de enero de 2012
Leer documento completo
Vista previa del texto
CREATE TABLE RECURSOS (ATRIB INT)
*
ERROR en lÝnea 1:
ORA-01031: privilegios insuficientes

SQL> CREATE TABLE RECURSOS (ATRIB INT);
CREATE TABLE RECURSOS (ATRIB INT)
*
ERROR en lÝnea 1:
ORA-01031: privilegios insuficientes

SQL> DISCONNECT;
Desconectado de Personal Oracle Database 11g Release 11.1.0.6.0 - Production
With the Partitioning, OLAP, Data Mining and Real ApplicationTesting options
SQL> CONNECT USER1;
Introduzca la contrase±a:
Conectado.
SQL> CREATE TABLE RECURSOS (ATRIB INT);

Tabla creada.

SQL> SELECT * FROM TAB;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
RECURSOS TABLE

SQL> CREATE SYNONYM EMP FOR SCOTT.EMP;

Sin¾nimo creado.

SQL> SELECT *FROM TAB;

TNAME TABTYPE CLUSTERID
------------------------------ ------- ----------
EMP SYNONYM
RECURSOS TABLE

SQL> SELECT * FROM EMP;

EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- -------- ---------- ----------
DEPTNO
----------7369 SMITH CLERK 7902 17/12/80 800
20

7499 ALLEN SALESMAN 7698 20/02/81 1600 300
30

7521 WARD SALESMAN 7698 22/02/81 1250 500
30

EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- -------- ---------- ----------DEPTNO
----------
7566 JONES MANAGER 7839 02/04/81 2975
20

7654 MARTIN SALESMAN 7698 28/09/81 1250 1400
30

7698 BLAKE MANAGER 7839 01/05/81 2850
30

EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ---------- ------------------ ----------
DEPTNO
----------
7782 CLARK MANAGER 7839 09/06/81 2450
10

7788 SCOTT ANALYST 7566 19/04/87 3000
20

7839 KING PRESIDENT 17/11/81 5000
10

EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ---------- --------- ------------------ ---------- ----------
DEPTNO
----------
7844 TURNER SALESMAN 7698 08/09/81 1500 0
30

7876 ADAMS CLERK 7788 23/05/87 1100
20

7900 JAMES CLERK 7698 03/12/81 950
30

EMPNO ENAME JOB MGR HIREDATE SAL COMM
---------- ------------------- ---------- -------- ---------- ----------
DEPTNO
----------
7902 FORD ANALYST 7566 03/12/81 3000
20

7934 MILLER CLERK 7782 23/01/82 1300
10

14 filas seleccionadas.

SQL> SELECT ENAME FROM EMP;

ENAME
----------
SMITH
ALLEN
WARD
JONES
MARTIN
BLAKE
CLARK
SCOTT
KING
TURNER
ADAMS

ENAME----------
JAMES
FORD
MILLER

14 filas seleccionadas.

SQL> UPDATE EMP SET NAME = 'JUAN';
UPDATE EMP SET NAME = 'JUAN'
*
ERROR en lÝnea 1:
ORA-00904: "NAME": identificador no vßlido

SQL> UPDATE EMP SEE ENAME = 'JUAN';
UPDATE EMP SEE ENAME = 'JUAN'
*
ERROR en lÝnea 1:
ORA-00971: falta la palabra clave SET

SQL> UPDATE EMP SET ENAME = 'JUAN';UPDATE EMP SET ENAME = 'JUAN'
*
ERROR en lÝnea 1:
ORA-01031: privilegios insuficientes

SQL> UPDATE EMP SET ENAME = 'JUAN';

14 filas actualizadas.

SQL> SELECT ENAME FROM EMP;

ENAME
----------
JUAN
JUAN
JUAN
JUAN
JUAN
JUAN
JUAN
JUAN
JUAN
JUAN
JUAN

ENAME
----------
JUAN
JUAN
JUAN

14 filas seleccionadas.

SQL> ROLLBACK;

Rollback terminado....
tracking img