You are on page 1of 6

2.

-
CREATE USER ADMINISTRADOR IDENTIFIED BY ADMIN
2 DEFAULT TABLESPACE USERS
3 TEMPORARY TABLESPACE TEMP
4 QUOTA 500K ON USERS;
create user prueba00 identified by prueba00
2 default tablespace users
3 temporary tablespace temp
4* quota 0k on users
CREATE USER prueba00 IDENTIFIED BY prueba00 DEFAULT TABLESPACE users TEMPORARY
TABLESPACE temp;
0K
create user prueba00 identified by prueba00
default tablespace users
temporary tablespace temp
quota 0K on users;

create tablespace academo datafile


'C:\oraclexe\app\oracle\oradata
\XE\academo01.dbf' size 1m;
'/u02/oradata/CURSO01/academo01.dbf' size 1M
2 autoextend on next 200k maxsize 1400K
3 default storage (initial 16k next 16k
4 minextents 1 maxextents 3);

create tablespace academo datafile


'C:\oraclexe\app\oracle\oradata
\XE\academo01.dbf' size 1m
2 autoextend on next 200k maxsize 1400K
3 default storage (initial 16k next 16k
4 minextents 1 maxextents
3);--------------------------------------------------------------------------------
-----------------------------------------------------------------------------------
-
Enter password:
Connected.
SQL> show user
USER is "ADMINISTRADOR"
SQL> r
1* grant create session to administrador
grant create session to administrador
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> r
1* grant create session to administrador
grant create session to administrador
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> show user


USER is "ADMINISTRADOR"
SQL> r
1* grant create session to administrador
grant create session to administrador
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> 1 create user prueba00 identified by prueba00


SQL> 2 default tablespace users
SQL> 3 temporary tablespace temp
SQL> 4* quota 0k on users
SP2-0734: unknown command beginning "4* quota 0..." - rest of line ignored.
SQL> create user prueba00 identified by prueba00
2 *
3
SQL> /u01/app/oracle/admin/CURSO01 (CURSO01)> sqlplus
SP2-0734: unknown command beginning "/u01/app/o..." - rest of line ignored.
SQL> grant create user to administrador;
grant create user to administrador
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> grant create user to administrador;


grant create user to administrador
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> grant create user to administrador;


grant create user to administrador
*
ERROR at line 1:
ORA-01031: insufficient privileges

SQL> system
SP2-0042: unknown command "system" - rest of line ignored.
SQL> conn system
Enter password:
Connected.
SQL> grant create user to administrador;

Grant succeeded.

SQL> connect administrador


Enter password:
Connected.
SQL> create user prueba00 identified by prueba00
2 default tablespace users
3 temporary tablespace temp
4 quota 0k on users
5 * quota 0k on users
6 ;
* quota 0k on users
*
ERROR at line 5:
ORA-00922: missing or invalid option
SQL> connect administrador
Enter password:
Connected.
SQL> create user prueba00 identified by prueba00
2 2 default tablespace users
3 3 temporary tablespace temp
4 4* quota 0k on users
5 ;
2 default tablespace users
*
ERROR at line 2:
ORA-00922: missing or invalid option

SQL> connect administrador


Enter password:
Connected.
SQL> create user prueba00 identified by prueba00
2 default tablespace users
3 temporary tablespace temp
4 * quota 0k on users
5 ;
* quota 0k on users
*
ERROR at line 4:
ORA-00922: missing or invalid option

SQL> create user prueba00 identified by prueba00


2 2 default tablespace users
3 3 temporary tablespace temp
4 4* quota 0k on users;
2 default tablespace users
*
ERROR at line 2:
ORA-00922: missing or invalid option

SQL> create user prueba00 identified by prueba00


2 2 default tablespace users
3 3 temporary tablespace temp
4 4* quota 0k on users
5
SQL> connect administrador
Enter password:
Connected.
SQL> create user prueba00 identified by prueba00
2 default tablespace users
3 temporary tablespace temp
4 quota 0K on users;

User created.

SQL> connect system


Enter password:
Connected.
SQL> desc dba_sys_privs
Name Null? Type
----------------------------------------- -------- ----------------------------

GRANTEE NOT NULL VARCHAR2(30)


PRIVILEGE NOT NULL VARCHAR2(40)
ADMIN_OPTION VARCHAR2(3)

SQL> select * from dba_sys_privs where privilege= 'create session';

no rows selected

SQL> connect system


Enter password:
Connected.
SQL> desc dba_sys_privs
Name Null? Type
----------------------------------------- -------- ----------------------------

GRANTEE NOT NULL VARCHAR2(30)


PRIVILEGE NOT NULL VARCHAR2(40)
ADMIN_OPTION VARCHAR2(3)

SQL> select * from dba_sys_privs where privilege = 'CREATE USER ';

no rows selected

SQL> select * from dba_sys_privs where privilege ='CREATE USER';

GRANTEE PRIVILEGE ADM


------------------------------ ---------------------------------------- ---
DBA CREATE USER YES
SYS CREATE USER NO
APEX_040000 CREATE USER NO
ADMINISTRADOR CREATE USER NO
IMP_FULL_DATABASE CREATE USER NO

SQL> connect system


Enter password:
Connected.
SQL> desc dba_sys_privs
Name Null? Type
----------------------------------------- -------- ----------------------------

GRANTEE NOT NULL VARCHAR2(30)


PRIVILEGE NOT NULL VARCHAR2(40)
ADMIN_OPTION VARCHAR2(3)

SQL> select * from dba_sys_privs where privilege ='CREATE USER';

GRANTEE PRIVILEGE ADM


------------------------------ ---------------------------------------- ---
DBA CREATE USER YES
SYS CREATE USER NO
APEX_040000 CREATE USER NO
ADMINISTRADOR CREATE USER NO
IMP_FULL_DATABASE CREATE USER NO

SQL> select * from dba_sys_privs where privilege ='CREATE SESSION';


GRANTEE PRIVILEGE ADM
------------------------------ ---------------------------------------- ---
DBA CREATE SESSION YES
DATAPUMP_IMP_FULL_DATABASE CREATE SESSION NO
USUARIO1 CREATE SESSION NO
IMP_FULL_DATABASE CREATE SESSION NO
OEM_MONITOR CREATE SESSION NO
CTXSYS CREATE SESSION NO
ADMINISTRADOR CREATE SESSION NO
APEX_040000 CREATE SESSION YES
SYS CREATE SESSION NO
DATAPUMP_EXP_FULL_DATABASE CREATE SESSION NO
EXP_FULL_DATABASE CREATE SESSION NO

GRANTEE PRIVILEGE ADM


------------------------------ ---------------------------------------- ---
RECOVERY_CATALOG_OWNER CREATE SESSION NO
MDSYS CREATE SESSION NO
CONNECT CREATE SESSION NO
APPQOSSYS CREATE SESSION NO
XDB CREATE SESSION NO
HR CREATE SESSION NO
OUTLN CREATE SESSION NO
DIP CREATE SESSION NO
APEX_PUBLIC_USER CREATE SESSION NO
ANONYMOUS CREATE SESSION NO

21 rows selected.

SQL> create tablespace academo datafile


2 '/u02/oradata/CURSO01/academo01.dbf' size 1M
3 2 autoextend on next 200k maxsize 1400K
4 3 default storage (initial 16k next 16k
5 4 minextents 1 maxextents 3);
2 autoextend on next 200k maxsize 1400K
*
ERROR at line 3:
ORA-02180: invalid option for CREATE TABLESPACE

SQL> create tablespace academo datafile


2
SQL> create tablespace academo datafile 'C:\oraclexe\app\oracle\oradata
2 \XE\pruebarenombrada.dbf' size 100m;
create tablespace academo datafile 'C:\oraclexe\app\oracle\oradata
*
ERROR at line 1:
ORA-01119: error in creating database file 'C:\oraclexe\app\oracle\oradata
\XE\pruebarenombrada.dbf'
ORA-27040: file create error, unable to create file
OSD-04002: unable to open file
O/S-Error: (OS 123) El nombre de archivo, el nombre de directorio o la sintaxis
de la etiqueta del volumen no son correctos.

SQL> create tablespace pruebarenombrada datafile 'C:\oraclexe\app\oracle\oradata

2 \XE\pruebarenombrada.dbf' size 100m;


create tablespace pruebarenombrada datafile 'C:\oraclexe\app\oracle\oradata
*
ERROR at line 1:
ORA-01543: tablespace 'PRUEBARENOMBRADA' already exists

SQL> create tablespace academo datafile


2 'C:\oraclexe\app\oracle\oradata
3 \XE\academo01.dbf' size 1m
4 2 autoextend on next 200k maxsize 1400K
5 3 default storage (initial 16k next 16k
6 4 minextents 1 maxextents 3);
2 autoextend on next 200k maxsize 1400K
*
ERROR at line 4:
ORA-02180: invalid option for CREATE TABLESPACE

SQL> create tablespace academo datafile 'C:\oraclexe\app\oracle\oradata\XE\acade


mo01.dbf'size 1m
2 autoextend on next 200k maxsize 1400k
3 default storage (initial 16k next 16k
4 minextents 1 maxextents 3);

Tablespace created.

SQL> create tablespace nomina datafile


'C:\oraclexe\app\oracle\oradata\XE\nomina01.dbf'size 1m
2 autoextend on next 100k maxsize 1500k
3 default storage (initial 16k next 16k
4 minextents 1 maxextents 3);
create tablespace nomina datafile 'C:\oraclexe\app\oracle\oradata\XE\academo01.d
bf'size 1m
*
ERROR at line 1:
ORA-01537: cannot add file 'C:\oraclexe\app\oracle\oradata\XE\academo01.dbf' -
file already part of database

SQL> create tablespace nomina datafile 'C:\oraclexe\app\oracle\oradata\XE\academ

You might also like