Oracle SQL Commands

If a graphical DBMS access tool is not available, you can use Oracle SQL commands through SQL*DBA or SQL*Plus.

Example: Create a tablespace using the CREATE TABLESPACE command

CREATE TABLESPACE mm_data	/* The tablespace name. */
DATAFILE �C:\ORANT\DATABASE\mmdata.dat�ᾉ/* The data file name. */
SIZE integer_value K or M or G	/* The data file size */
DEFAULT STORAGE (	/* The default storage parameters */
    INITIAL integer_value K or M or G	/* The initial extent size */
    NEXT integer_value K or M or G	/* The next extent size */
    PCTINCREASE integer_value	/* The percent to grow extents */
    MINEXTENTS integer_value	/* The minimum number of extents */
    MAXEXTENTS integer_value	/* The maximum number of extents */
);

                                                    

Example: Create an Oracle user using the CREATE USER command

CREATE USER mm_user_1  /* The user id name */
IDENIFIED BY password  /* The user password */
DEAFULT TABLESPACE tablespace_name  /* The user�s default tablespace */
TEMPORARY TABLESPACE tablespace_name  /* The user�s temporary tablespace */
QUOTA unlimited_or_integer_K_M_G ON tablespace_name /* The user�s quota on a tablespace */
;

                                                    

Example: Grant user privileges using the GRANT command

GRANT role_or_privilege_name	
TO user_or_role	
;

Back to Top