Sunday, February 27, 2022

NLS_CHARACTERSET Change Oracle

 [oracle@OC-APP ~]$ sqlplus  / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 27 17:27:30 2022


Copyright (c) 1982, 2014, Oracle.  All rights reserved.



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing opt                                                                                        ions


SQL>

SQL>

SQL> SELECT value AS db_charset FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';


DB_CHARSET

----------------------------------------------------------------

WE8MSWIN1252


SQL>

SQL>

SQL>

SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> exit

Disconnected from Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options

[oracle@OC-APP ~]$

[oracle@OC-APP ~]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Sun Feb 27 17:31:51 2022


Copyright (c) 1982, 2014, Oracle.  All rights reserved.


Connected to an idle instance.


SQL>

SQL> startup mount;

ORACLE instance started.


Total System Global Area 1.0066E+10 bytes

Fixed Size                  3721176 bytes

Variable Size            1778386984 bytes

Database Buffers         8254390272 bytes

Redo Buffers               29831168 bytes

Database mounted.

SQL> ALTER SYSTEM ENABLE RESTRICTED SESSION;


System altered.


SQL> ALTER SYSTEM SET JOB_QUEUE_PROCESSES=0;


System altered.


SQL> ALTER SYSTEM SET AQ_TM_PROCESSES=0;


System altered.


SQL> ALTER DATABASE OPEN;


Database altered.


SQL> ALTER DATABASE CHARACTER SET AL32UTF8;

ALTER DATABASE CHARACTER SET AL32UTF8

*

ERROR at line 1:

ORA-12712: new character set must be a superset of old character set



SQL> ALTER DATABASE CHARACTER SET INTERNAL_USE AL32UTF8;


Database altered.


SQL> shutdown immediate

Database closed.

Database dismounted.

ORACLE instance shut down.

SQL> startup

ORACLE instance started.


Total System Global Area 1.0066E+10 bytes

Fixed Size                  3721176 bytes

Variable Size            1778386984 bytes

Database Buffers         8254390272 bytes

Redo Buffers               29831168 bytes

Database mounted.

Database opened.

SQL>

SQL>

SQL>

SQL> SELECT value AS db_charset FROM nls_database_parameters WHERE parameter = 'NLS_CHARACTERSET';


DB_CHARSET

--------------------------------------------------------------------------------

AL32UTF8


SQL>


Thursday, February 24, 2022

FAL Server and FAL Client

For Primary Database site:

FAL_SERVER=STANDBY

FAL_CLIENT=PRIMARY


For Standby Database site:

FAL_SERVER=PRIMARY

FAL_CLIENT=STANDBY

X11Forwarding

 /etc/ssh/sshd_config

X11Forwarding yes

X11DisplayOffset 10

X11UseLocalhost yes


APEX 19.2 installation

 CREATE TABLESPACE APEXTS DATAFILE '/u01/app/oracle/app/oracle/oradata/cdb1/misapex/apexts01.dbf' SIZE 1G AUTOEXTEND ON NEXT 10M MAXSIZE 1024M;


@apexins APEXTS APEXTS TEMP /i192/


@apxconf.sql

 

@apex_epg_config.sql /u01/soft/apex19c     -- Embedded PL/SQL gateway and Load Image


@apex_rest_config.sql 


ABCD1234


alter user anonymous account unlock;

alter user xdb account unlock;

alter user APEX_190200 identified by "XXXXX" account unlock;

alter user FLOWS_FILES account unlock;

alter user APEX_PUBLIC_USER identified by xxxxx;


alter user xdb identified by "xxxxx" account unlock;



alter user anonymous identified by "xxxx" account unlock;


alter user anonymous account unlock;



select dbms_xdb.gethttpport from dual;




apex 21 installation

 CREATE TABLESPACE APEXTS DATAFILE '/u01/app/oracle/oradata/ntest/apexts/apexts01.dbf' SIZE 1G AUTOEXTEND ON NEXT 10M MAXSIZE 1024M;


@apexins.sql sysaux sysaux temp /i212/


alter session set "_oracle_script"=true;

drop user APEX_210200 cascade;



SQL> select dbms_xdb.gethttpport from dual;


GETHTTPPORT

-----------

          0



SQL> EXEC dbms_xdb.sethttpport(8089);


PL/SQL procedure successfully completed.



@apex_rest_config.sql


ABCD1234



[oracle@BAMISDB ORDS]$ which java

/usr/bin/java





/u01/ORDS/conf_ords



Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//10.xx.1.xxx:1521/misapex




[oracle@BAMISDB ORDS]$ which java

/usr/bin/java

[oracle@BAMISDB ORDS]$

[oracle@BAMISDB ORDS]$ /usr/bin/java -jar mis.war install

This Oracle REST Data Services instance has not yet been configured.

Please complete the following prompts



Enter the location to store configuration data: /u01/ORDS/conf_ords

Enter the name of the database server [localhost]:10.88.1.112

Enter the database listen port [1521]:1521

Enter 1 to specify the database service name, or 2 to specify the database SID [1]:

Enter the database service name:misapex

Enter the database password for ORDS_PUBLIC_USER:

Confirm password:

Requires to login with administrator privileges to verify Oracle REST Data Services schema.


Enter the administrator username:sys

Enter the database password for SYS AS SYSDBA:

Confirm password:

Connecting to database user: SYS AS SYSDBA url: jdbc:oracle:thin:@//10.xx.1.xx:1521/misapex


Retrieving information.

Enter 1 if you want to use PL/SQL Gateway or 2 to skip this step.

If using Oracle Application Express or migrating from mod_plsql then you must enter 1 [1]:1

Enter the database password for APEX_PUBLIC_USER:

Confirm password:

Enter 1 to specify passwords for Application Express RESTful Services database users (APEX_LISTENER, APEX_REST_PUBLIC_USER) or 2 to skip this step [1]:1

Enter the database password for APEX_LISTENER:

Confirm password:

Enter the database password for APEX_REST_PUBLIC_USER:

Confirm password:

Enter a number to select a feature to enable:

   [1] SQL Developer Web  (Enables all features)

   [2] REST Enabled SQL

   [3] Database API

   [4] REST Enabled SQL and Database API

   [5] None

Choose [1]:

2021-11-22T09:03:54.347Z INFO        reloaded pools: []

Installing Oracle REST Data Services version 21.3.1.r3012050

... Log file written to /home/oracle/ords_install_core_2021-11-22_150354_00509.log

... Verified database prerequisites

... Created Oracle REST Data Services proxy user

... Created Oracle REST Data Services schema

... Granted privileges to Oracle REST Data Services

... Created Oracle REST Data Services database objects

... Log file written to /home/oracle/ords_install_datamodel_2021-11-22_150414_00405.log

... Log file written to /home/oracle/ords_install_apex_2021-11-22_150417_00351.log

Completed installation for Oracle REST Data Services version 21.3.1.r3012050. Elapsed time: 00:00:26.6


Enter 1 if you wish to start in standalone mode or 2 to exit [1]:2

[oracle@BAMISDB ORDS]$




[oracle@BAMISDB apex]$ sqlplus / as sysdba


SQL*Plus: Release 12.1.0.2.0 Production on Mon Nov 22 17:23:03 2021


Copyright (c) 1982, 2014, Oracle.  All rights reserved.



Connected to:

Oracle Database 12c Enterprise Edition Release 12.1.0.2.0 - 64bit Production

With the Partitioning, OLAP, Advanced Analytics and Real Application Testing options


SQL> alter session set container=misapex;


Session altered.


SQL> @apxchpwd.sql

...set_appun.sql

================================================================================

This script can be used to change the password of an Application Express

instance administrator. If the user does not yet exist, a user record will be

created.

================================================================================

Enter the administrator's username [ADMIN]

User "ADMIN" does not yet exist and will be created.

Enter ADMIN's email [ADMIN] info@bankasia-bd.com

Enter ADMIN's password []

--------------------------------------------------------------------------------

Password does not conform to this site's password complexity rules.

* Password must contain at least one punctuation character

(!"`'#$%&()[]{},.*+-/|\:;?_~).

* Password must contain at least one lower-case alphabetic character.

--------------------------------------------------------------------------------

declare

*

ERROR at line 1:

ORA-20001: Password validation failed.

ORA-06512: at line 30




SQL> @apxchpwd.sql

...set_appun.sql

================================================================================

This script can be used to change the password of an Application Express

instance administrator. If the user does not yet exist, a user record will be

created.

================================================================================

Enter the administrator's username [ADMIN]

User "ADMIN" does not yet exist and will be created.

Enter ADMIN's email [ADMIN] info@bankasia-bd.com

Enter ADMIN's password []

Created instance administrator ADMIN.


SQL>

SQL>

SQL>

RAC Physical Network Interface

For RAC Configuration:

>> There will be Physical Network Interface for both Public IP & Private IP. That's means Public IP & Private IP must be placed in Physical Network Interface.

>> For Scan IP & Virtual IP, does not require Physical Network Interface. After configuration, it will automatically attach to sub interface.