Unlock user
ALTER SESSION SET CONTAINER = lportal;
ALTER USER "LPORTAL" IDENTIFIED BY "lportal" ACCOUNT UNLOCK;
or in two steps:
ALTER USER "LPORTAL" ACCOUNT UNLOCK;
ALTER USER "LPORTAL" IDENTIFIED BY "lportal";
Create user without quota and password expire
ALTER SESSION SET CONTAINER = lportal;
ALTER PROFILE DEFAULT LIMIT PASSWORD_REUSE_TIME unlimited PASSWORD_LIFE_TIME unlimited;
CREATE USER "LPORTAL" IDENTIFIED BY "lportal" DEFAULT TABLESPACE "USERS" TEMPORARY TABLESPACE "TEMP";
ALTER USER "LPORTAL" QUOTA UNLIMITED ON "USERS";
GRANT "CONNECT" TO "LPORTAL" ;
GRANT "RESOURCE" TO "LPORTAL" ;
ALTER USER "LPORTAL" DEFAULT ROLE "CONNECT","RESOURCE";
CREATE OR REPLACE DIRECTORY dbdumps AS '/opt/oracle/dbdumps';
GRANT READ, WRITE ON DIRECTORY dbdumps TO lportal;
COMMIT;
Set PASSWORD_GRACE_TIME to unlimited
ALTER PROFILE DEFAULT LIMIT PASSWORD_GRACE_TIME unlimited;
Misc
Change SGA, PGA size
SQL> SHOW PARAMETER sga;
NAME TYPE VALUE
allow_group_access_to_sga boolean FALSE
lock_sga boolean FALSE
pre_page_sga boolean TRUE
sga_max_size big integer 4608M
sga_min_size big integer 0
sga_target big integer 4608M
unified_audit_sga_queue_size integer 1048576
SQL> ALTER SYSTEM SET sga_target=2048M SCOPE=both;
SQL> ALTER SYSTEM SET sga_max_size=2048M SCOPE=SPFILE;
SQL> SHOW PARAMETER pga;
NAME TYPE VALUE
pga_aggregate_limit big integer 3G
pga_aggregate_target big integer 1536M
SQL> ALTER SYSTEM SET pga_aggregate_target=1G SCOPE=both;
SQL> ALTER SYSTEM SET pga_aggregate_limit=1G SCOPE=both;
SQL> SELECT SUM(pga_alloc_mem) FROM v$process;
SQL> SELECT * FROM V$SGA_TARGET_ADVICE;
Set page size in sqlplus
SQL> SET PAGESIZE
Run an Oracle export file with to_timestamp that has localized month names (with hungarian month names):
$ export NLS_LANG=Hungarian_Hungary.AL32UTF8
$ sqlplus
-- Disable & parsing:
SQL> set define off
SQL> @script.sql