Top.....Instalac 18c XE.....Instalac APEX 20.1.....Conv. 6i to APEX (Devsuite10g on WinXP) 2020.08.17
J:
sqlplus / as sysdba or sqlplus.exe sys/MYPSW@//SSPC2:1521/XE as sysdba
@users - my script, see below
quit or ALTER SESSION SET container = XEPDB1;
sqlplus.exe sys/MYPSW@//SSPC2:1521/XEPDB1 as sysdba
@users
quit or ALTER SESSION SET container = CDB$ROOT;
Sqlplus hr/hr@ora7 - on PC where 18c XE is installed (if listener port is default = 1521) Sqlplus HR/HR@XEPDB1 or Sqlplus hr/hr@xepdb1 XEPDB1 and ora7 are synonims (plugable DB name) conn / as sysdba is same as conn system/MYPSW@sspc2:1521/XEPDB1 as SYSDBA (both conn to SYS user)
Sqlplus HR/HR@sspc2/XEPDB1 - on some other intranet PC Sqlplus HR/HR@sspc2:1521/XEPDB1
sqlplus system@dbhost.example.com:1521/XEPDB1 - on internet PC
sqlplus /nolog
conn / as sysdba - connects even if Net Services DB listener lsnrctl is not running
shutdown abort
startup
lsnrctl allows you to connect to DB over TCP/IP from the same machine or other machines on the network.
release 18.0.0.0.0 ver 18.4.0.0.0 from OracleXE184_Win64.zip
Top.....Instalac 18c XE.....Instalac APEX 20.1.....Conv. F6i to APEX (Devsuite10g on WinXP)
Specified value of MEMORY_TARGET is too small, needs to be at least 2048 M
SHOW PARAMETER PFILE;
SHOW PARAMETER MEMORY_TARGET
ALTER SYSTEM SET MEMORY_TARGET='2048 M' SCOPE=spfile;
SHUTDOWN --ORA-01034 is simple error, it means that your DB is down! !!!!!!!!!!!!!!!!!!!!!!!!!!!
NOT POSSIBLE : STARTUP
ORA-01034: ORACLE not available
ORA-27101: shared memory realm does not exist
You can edit pfile you created to correct errors you have. Then once your instance is started, you can create an spfile out of that pfile.
J:
cd J:\app\oraclexe\product\18.0.0\dbhomeXE\bin
sqlplus /nolog
sqlplus / as sysdba
--outputs : Connected to an idle instance.
create pfile = 'c:\temp\init.ora' from spfile;
--Then you edit file see *.memory_target=2048 M and use that to start startup pfile=c:\temp\init.ora
--once your database is open
create spfile from pfile='c:\temp\init.ora';
ORA-32006: SEC_CASE_SENSITIVE_LOGON initialization parameter has been deprecated
xe.__data_transfer_cache_size=0
xe.__db_cache_size=1107296256
xe.__inmemory_ext_roarea=0
xe.__inmemory_ext_rwarea=0
xe.__java_pool_size=16777216
xe.__large_pool_size=33554432
xe.__oracle_base='J:\app\oraclexe\product\18.0.0'#ORACLE_BASE set from environment
xe.__pga_aggregate_target=536870912
xe.__sga_target=1610612736
xe.__shared_io_pool_size=83886080
xe.__shared_pool_size=352321536
xe.__streams_pool_size=0
*.audit_file_dest='J:\app\oraclexe\product\18.0.0\admin\XE\adump'
*.audit_trail='db'
*.compatible='18.0.0'
*.control_files='J:\app\oraclexe\product\18.0.0\oradata\XE\control01.ctl','J:\app\oraclexe\product\18.0.0\oradata\XE\control02.ctl'
*.db_block_size=8192
*.db_name='XE'
*.diagnostic_dest='J:\app\oraclexe\product\18.0.0'
*.dispatchers='(PROTOCOL=TCP) (SERVICE=XEXDB)'
*.enable_pluggable_database=true
*.local_listener='LISTENER_XE'
*.memory_target=2048 M
*.nls_language='AMERICAN'
*.nls_territory='AMERICA'
*.open_cursors=300
*.pga_aggregate_target=512m
*.processes=320
*.remote_login_passwordfile='EXCLUSIVE'
*.sec_case_sensitive_logon=FALSE
*.sga_target=1536m
*.undo_tablespace='UNDOTBS1'
# J:\app\oraclexe\product\18.0.0\dbhomeXE\dbs\init.ora
# Change '<ORACLE_BASE>' to point to the oracle base (the one you specify at
# install time) J:/app/oraclexe/product/18.0.0
#db_name='ORCL'
db_name='XE'
#memory_target=1G
memory_target=2048 M
processes = 150
#audit_file_dest='<ORACLE_BASE>/admin/orcl/adump'
audit_file_dest='J:/app/oraclexe/product/18.0.0/admin/orcl/adump'
audit_trail ='db'
db_block_size=8192
db_domain=''
db_recovery_file_dest='J:/app/oraclexe/product/18.0.0/fast_recovery_area'
db_recovery_file_dest_size=2G
diagnostic_dest='J:/app/oraclexe/product/18.0.0'
dispatchers='(PROTOCOL=TCP) (SERVICE=ORCLXDB)'
open_cursors=300
remote_login_passwordfile='EXCLUSIVE'
undo_tablespace='UNDOTBS1'
# You may want to ensure that control files are created on separate physical
# devices
control_files = (ora_control1, ora_control2)
compatible ='11.2.0'
set oracle_sid=XE =DATABASE NAME
sqlplus /nolog
conn sys/SYSPSW as sysdba
shutdown abort
startup
Sources: https://docs.oracle.com/en/database/oracle/oracle-database/18/xeinw/
Big articles https://dbvisit.com/blog/oracle-database-18c-express-edition-getting-started-part-4 Linux, dockerIf you don’t already have an account you will need to create one to download the s/w:
https://profile.oracle.com/myprofile/account/create-account.jspx
on Windows 10 pro 64 bit Ver : 10.0.19041
L:\1_downloads\data\1_instalac\ora18c\setup.exe
J:\app\oraclexe\product\18.0.0
J:\app\oraclexe\product\18.0.0\dbhomeXE
Server: localhost
Port: 1521
Multitenant container DB : localhost:1521 Container DB will be called XE
Pluggable DB : XEPDB1 localhost:1521/XEPDB1
Enterprise Express URL : https://localhost:5500/em
Click Finish, to close installer
https://localhost:5500/em
User Name: sys
Password: ...
Container name: Leave blank (Enter a PDB name if you want to access a specific PDB or leave it blank to access the root container. )
as sysdba: tick box
After you install Oracle Database XE, EM Express is only available from the local server, it cannot be accessed remotely.
To make EM Express available to remote clients, start SQLPlus, log in as SYSTEM , and execute following procedure. From CLI run following commands. In the commands, replace "oracle_home" with path to your Oracle Home; see 18c XE Installation Guide Table 5-1 for more details about Oracle Home.
J:
cd J:\app\oraclexe\product\18.0.0\dbhomeXE\bin
sqlplus system or sqlplus /nolog sqlplus / as sysdba
EXEC DBMS_XDB.SETLISTENERLOCALACCESS(FALSE);
select sys_context( 'userenv', 'current_schema' ) from dual;
prints SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
---------------------------------------
SYS
conn hr/hr@xepdb1
select sys_context( 'userenv', 'current_schema' ) from dual;
prints SYS_CONTEXT('USERENV','CURRENT_SCHEMA')
---------------------------------
HR
You cannot change your identity in a definers rights procedure, it is fixed AT COMPILE time by definition.
https://asktom.oracle.com/pls/asktom/asktom.search?tag=how-to-get-current-schema
start J:\app\oraclexe\product\18.0.0\dbhomeXE\demo\schema\human_resources\hr_main.sql
After DB 18c install. 35 rows selected then 36 :
PDBADMIN 101 2020-08-25 00:44:00
SCOTT, HR and other sample schemas are in PDB and not in CDB. So, you need to login as sysdba into PDB :
sqlplus SYS/password@XEPDB1 AS SYSDBA
show con_name
sho user
show pdbs
ALTER USER HR IDENTIFIED BY HR ACCOUNT UNLOCK;
grant CONNECT,DBA,RESOURCE to HR IDENTIFIED BY HR;
conn HR/HR@XEPDB1
select tname from tab;
exit
ALTER USER system IDENTIFIED BY MYPSW ACCOUNT UNLOCK ALTER USER system IDENTIFIED BY MYPSW
sqlplus scott/tiger@pdborcl
SQL> sho user; USER is "SCOTT"
SET LINESIZE 254 trimspool on arraysize 100 tab off
COLUMN username HEADING username FORMAT A30
COLUMN password HEADING password FORMAT A15
select username, password from dba_users order by username ;
http://www.rebellionrider.com/how-to-unlock-hr-user-in-oracle-database-18c-by-manish-sharma/ By Manish Sharma - January 5, 2019 Unlocking hr (or any) schema in DB 18c :
Finding out container ID of pluggable DB which contains our schema
--Conn to container DB CBD$ROOT :
Sqlplus / as sysdba
--Query v$PDBS dynamic performance view to see container names and IDs of all pluggable DBs created inside root container :
SELECT name, con_id FROM v$pdbs;
NAME CON_ID (container ID)
------------------ ------------------------------
PDB$SEED 2 seed pluggable DB
**XEPDB1** 3 **name of default pluggable DB** created during installation (ORCLPDB) - **has all our sample (test) schemas**.
PDB$SEED is the seed pluggable DB & a system supplied template which container DB uses for creating user defined pluggable DBs.
Finding out service name of pluggable DB - usually, pluggable DB and its service shares the same name, but check it:
SELECT name Service_Name FROM v$active_services WHERE con_id =3; --displays xepdb1
Creating an entry in TNSNAMES.ora network configuration file inside "Network\admin" folder inside our DB_HOME :
J:\app\oraclexe\product\18.0.0\dbhomeXE\network\admin
PS C:\WINDOWS\system32> echo %dbhomeXE%
%dbhomeXE%
Mode LastWriteTime Length Name
---- ------------- ------ ----
d----- 25.8.2020. 0:16 sample
-a---- 25.8.2020. 0:19 658 listener.ora
-a---- 25.8.2020. 0:19 464 sqlnet.ora
-a---- 25.8.2020. 0:19 263 sqlnet20082512AM1922.bak
-a---- 25.8.2020. 0:38 625 tnsnames.ora <======
Using our pluggable database name and its corresponding service we need to create an entry for our listener - using NETCA utility or we can do it manually (is faster).
#J:\app\oraclexe\product\18.0.0\dbhomeXE\network\admin\tnsnames.ora
#tnsnames.ora Network Configuration File:
#Generated by Oracle configuration tools.
#name of Container DB (privileged users like sys)
XE =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sspc2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)
#name of default pluggable DB created during install. (all sample schemas, APEX apps...) :
XEPDB1 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sspc2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = xepdb1)
)
)
ora7 =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = sspc2)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = xepdb1)
)
)
LISTENER_XE =
(ADDRESS = (PROTOCOL = TCP)(HOST = sspc2)(PORT = 1521))
ORACLR_CONNECTION_DATA =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC1521))
)
(CONNECT_DATA =
(SID = CLRExtProc)
(PRESENTATION = RO)
)
)
In Win CLI with admin rights restart listener : Lsnrctl reload
lsnrctl status
lsnrctl start
Switching from Container DB XE CDB$ROOT to Pluggable DB XEPDB1
High privileged users like sys are placed inside a container DB and all sample schemas are in default pluggable DB, which means in order to unlock them we need to switch to XEPDB1.
ALTER SESSION SET container = XEPDB1;
Unlocking HR user
SELECT name, open_mode FROM v$pdbs;
NAME OPEN_MODE
---------------------------- -------------------
XEPDB1 READ WRITE
If open mode is mounted - means DB isn't open. To open your pluggable DB :
ALTER PLUGGABLE DATABASE open;
Once you've done all the above steps and configured your DB properly then :
ALTER USER HR IDENTIFIED BY HR ACCOUNT UNLOCK;
grant CONNECT,DBA,RESOURCE to HR IDENTIFIED BY HR;
exit
Sqlplus HR/HR@localhost:1521/XEPDB1
show con_name --(CDB$ROOT) XEPDB1 sho user --(SYS) USER is "HR"
conn hr/hr@ora7
set linesize 150
select COUNTRIES.*, rowidtochar(ROWID) as ROWID_ from COUNTRIES;
--err: ORA-01410: invalid ROWID
drop table t;
create table t as (select COUNTRIES.* from COUNTRIES);
select t.*, rowidtochar(ROWID) as ROWID_ from t;
--treba drop tablice zbog ORGANIZATION INDEX, pa ovo ne ide:
--alter table LOCATIONS disable constraint LOC_C_ID_FK;
-- delete COUNTRIES;
alter table LOCATIONS drop constraint LOC_C_ID_FK;
drop table COUNTRIES;
CREATE TABLE countries
( country_id CHAR(2)
CONSTRAINT country_id_nn NOT NULL
, country_name VARCHAR2(40)
, region_id NUMBER
, CONSTRAINT country_c_id_pk
PRIMARY KEY (country_id)
)
--ORGANIZATION INDEX <-- zbog ovoga javi ORA-01410: invalid ROWID:
;
ALTER TABLE countries
ADD ( CONSTRAINT countr_reg_fk
FOREIGN KEY (region_id)
REFERENCES regions(region_id)
) ;
insert into COUNTRIES (select t.* from t);
--alter table LOCATIONS enable constraint LOC_C_ID_FK;
alter table LOCATIONS add CONSTRAINT "LOC_C_ID_FK"
FOREIGN KEY ("COUNTRY_ID") REFERENCES "HR"."COUNTRIES" ("COUNTRY_ID") ;
--commit;
select COUNTRIES.*, rowidtochar(ROWID) as ROWID_ from COUNTRIES;
prompt kad tablica nije ORGANIZATION INDEX gornji select radi !!
Sqlplus HR/HR@//sspc2:1521/XEPDB1
conn HR/HR@//sspc2:1521/XEPDB1
ORA-01017: invalid username/password; logon denied
Warning: You are no longer connected to ORACLE.
#J:\app\oraclexe\product\18.0.0\dbhomeXE\NETWORK\ADMIN\sqlnet.ora
#sqlnet.ora Network Configuration File:
#Generated by Oracle configuration tools.
#This file is actually generated by netca. But if customers choose to
#install "Software Only", this file wont exist and without the native
#authentication, they will not be able to connect to the database on NT.
SQLNET.AUTHENTICATION_SERVICES= (NTS)
#From 12cR2 and beyond oracle enforced higher authentication level
#Two options:
#1. RESET PASSWORD of these accounts (password_versions) value should be updated, and make sure your application CLIENT IS COMPATIBLE WITH 18c !
#2. LOWER AUTHENTICATION by setting following parameter in sqlnet.ora file for example : **SQLNET.ALLOWED_LOGON_VERSION=11**
SQLNET.ALLOWED_LOGON_VERSION=11
NAMES.DIRECTORY_PATH= (TNSNAMES, EZCONNECT)
SET LINESIZE 254 trimspool on arraysize 100 tab off
COLUMN username HEADING username FORMAT A30
COLUMN PASSWORD_VERSIONS HEADING PASSWORD_VERSIONS FORMAT A15
select USERNAME, PASSWORD_VERSIONS from dba_users order by USERNAME ;
username PASSWORD_VERSIO
------------------------------ ---------------
...
HR 11G 12C
...
Two options:
cd [oracle_home]\bin
Shows values of a number of important parameters:
Specifying port is optional when the listener is setup with default port 1521 . You must specify port number if you use another port.
If you are connecting from a remote computer, you need to provide hostname eg SSPC2 (where XE is installed) instead of localhost.
Eg you can connect to root container of DB from a client computer with SQLPlus using following commands:
cd [oracle_home]\bin
sqlplus system@dbhost.example.com:1521
You can connect to default pluggable database XEPDB1 using following commands:
cd [oracle_home]\bin
sqlplus system@dbhost.example.com:1521/XEPDB1
Replace dbhost.example.com with your DB host name. If needed, replace 1521 with port number the listener listens on. You can replace XEPDB1 with name of another PDB you want to connect to.
To shorten connect strings or avoid hardcoding host name and port in app. code and DBA scripts, you can define an alias for connect string in configuration file [oracle_home]\network\admin\tnsnames.ora on DB clients. See Configuring Local Naming Method for more details.
See Also:
By default, when Ora. DB service is started, container DB is started and opened, but any pluggable DBs must be opened before use - manually or set to automatically open.
Start menu, type services.msc, OracleServiceXE service in Services window, Right-click service name.
OracleOraDB18Home[n]TNSListener , where [n] is a number chosen by Oracle Database XE installer based on other Oracle homes previously installed on the host.
cd [oracle_home]\bin
sqlplus / as sysdba
SQL> SHUTDOWN IMMEDIATE
or
SQL> STARTUP
SQL> ALTER PLUGGABLE DATABASE ALL OPEN;
Pluggable DBs can be set to automatically open when container DB opens by connecting to the container database via SQL Plus (as above), and issuing following SQL:
ALTER PLUGGABLE DATABASE ALL OPEN;
ALTER PLUGGABLE DATABASE ALL SAVE STATE;
select name, open_mode, cdb from v$database ;
NAME OPEN_MODE CDB
--------- -------------------- ---
XE READ WRITE YES
was but no more err SP2-0382: The SHOW PDBS command is not available (on 18c XE)
ipconfig
Ethernet adapter Ethernet:
Connection-specific DNS Suffix . :
IPv4 Address. . . . . . . . . . . : 192.168.5.12
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . : 192.168.5.1
Ethernet adapter Ethernet 3:
Connection-specific DNS Suffix . :
Link-local IPv6 Address . . . . . : fe80::a099:c564:36e6:bf89%12
IPv4 Address. . . . . . . . . . . : 192.168.56.1 (Oracle Linux on Virtual Box)
Subnet Mask . . . . . . . . . . . : 255.255.255.0
Default Gateway . . . . . . . . . :
sqlplus system/MYPSW@192.168.5.12:1521/XEPDB1
Connected.
or
conn system/MYPSW@localhost:1521/XEPDB1
Connected.
or
conn system/MYPSW@sspc2:1521/XEPDB1
CONN SYS as SYSDBA
ALTER SYSTEM SET SEC_CASE_SENSITIVE_LOGON = FALSE SCOPE=BOTH;
SHOW PARAMETER SEC_CASE_SENSITIVE_LOGON
show con_name
-- XEPDB1
sho user
-- USER is "HR"
ALTER USER hr identified by hr account unlock;
grant CONNECT,DBA,RESOURCE to HR IDENTIFIED BY HR;
conn HR/HR@localhost:1521/XEPDB1
Connected. - case sensitive if we do not SEC_CASE_SENSITIVE_LOGON = FALSE !!
select tname from tab;
https://www.oracle.com/downloads/
Click new connection:
Name: XEPDB1_sys
Username: sys
Password: MYPSW
Save Password: check box
Role: SYSDBA
Hostname: localhost
Port: 1521
Service name: xepdb1
Then click test, should see : Status Success
Click Save -> Click Connect
You are now connected to 18c XE db.
in s/w base dir/network/admin/tnsnames.ora file to add an connection alias for xepdb1 as below, for me that directory is : J:\app\oracle\product\18.0.0\dbhomeXE\network\admin
XEPDB1 = (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = ACER-HOME-PC)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XEPDB1) ) )
CREATE PLUGGABLE DATABASE pdb2 ADMIN USER pdb_adm IDENTIFIED BY Password1
FILE_NAME_CONVERT=('J:\app\oraclexe\product\18.0.0\dbhomeXE\oradata\XE\PDBSEED\',J:\app\oraclexe\product\18.0.0\dbhomeXE\oradata\XE\PDB2\');
https://smarttechways.com/ https://smarttechways.com/2019/03/05/ora-16000-database-or-pluggable-database-open-for-read-only-acc
(Will need a reboot at the end to complete, but can reboot later if needed)
As per documentation: https://docs.oracle.com/en/database/oracle/oracle-database/18/xeinw/deinstalling-oracle-database-xe.html#GUID-DC36940C-D201-457B-A3D5-D6E2BB800120
Use Add or Remove Programs to deinstall Oracle Database XE:
In the Windows Control Panel, select Add or Remove Programs.
Select Oracle Database 18c Express Edition.
Click Change/Remove or Uninstall.
Follow the prompts to deinstall Oracle Database Express Edition. After few minutes, the window will close and the deinstallation will be complete.
If you want to save your data files but remove the Oracle Database XE software and database, then first export the data before you deinstall.
Caution:
When you deinstall Oracle Database XE, all components, including data files, the database, and the software, are removed. Because the deinstallation process removes all files from the directory in which Oracle Database XE is installed, back up any files from the directory (if needed) before you deinstall. The database will no longer be operational after deinstallation. You can deinstall Oracle Database XE using one of the following methods:
Use Add or Remove Programs to deinstall Oracle Database XE:
12.11.2 Deinstalling Using Silent Mode
If the downloaded software is available, you can use setup.exe to deinstall Oracle Database XE. For example, if you downloaded and extracted the files to a directory called xe_temp , enter the following command to deinstall Oracle Database XE:
c:\xe_temp> setup.exe /s /x /v"/qn /Lv c:\test1.log"
If you do not have the downloaded software ( setup.exe ) you can deinstall using: msiexec /qn /x {C220B7FD-3095-47FC-A0C0-AE49DE6E320A}
You can replace /qn with /qb to display the progress bar.
Note:
Oracle Database XE is configured by default to be able to process character data in all supported languages simultaneously:
The database is created with the Unicode AL32UTF8 character set. AL32UTF8 is the recommended database character set suitable for storing data in practically any language. Multiple languages can be mixed even in a single character value. While not a recommended option, you can create the database with another supported database character set by calling setup.exe from the Command Prompt as follows:
setup.exe /v"CHAR_SET=\
where \
The Oracle Database Express Edition (XE) supports the same globalization features that Oracle Database Enterprise Edition (EE) provides.
Connections
Configure client applications connecting to an Oracle Database according to your locale preferences and your I/O device character set. You must configure client applications connecting to an Oracle Database according to your locale preferences and your I/O device character set. If your applications do not have their own specific methods to configure locale preferences, then the method you use to configure an Oracle database client connection depends on the access API you use to connect to the database. Check your application documentation, before you configure locale preferences for your applications.
For applications that connect to Oracle Databases using Oracle Call Interface (OCI) use NLSLANG and other client settings with names that start with NLS\ to set the locale conventions and client character set for Oracle Database sessions. It is important that you set the character set part of the NLS_LANG value properly. The character set you set must correspond to the character set used by your I/O devices, which in case of Microsoft Windows is either the ANSI Code Page (for GUI applications), such as WE8MSWIN1252, or the OEM Code Page (for Console mode applications), such as US8PC437. By doing this, the OCI API is notified about the character set of data that it receives from the application. OCI can then convert this data correctly to and from the database character set.
NLS_LANG and the other NLS settings can be specified either as environment variables or as Windows Registry settings. Environment variable values take precedence over Registry values. Oracle Universal Installer sets a default value for the NLS_LANG setting in Registry when it creates a new Oracle home. The NLS_LANG value is based on the language of the Windows user interface, which is the language of Windows menu items and dialog box labels.
Caution:
Failure to set the client character set correctly can cause data loss. Java applications that connect to Oracle Databases by using Oracle JDBC do not use NLS_LANG. Instead, Oracle JDBC maps the default locale of the Java VM in which the application runs to the Oracle Database language and territory settings. Oracle JDBC then configures the connected database session using these settings. Because Java works internally in Unicode, the client character set is always set to Unicode.
Unless an application explicitly changes it, the default locale of the Java VM is set based on the locale of the user operating system on which the Java VM runs. Check your Java VM documentation for information about configuring the Java VM default locale.
Note:
In 3-tier architecture deployments, application servers that are database clients can have settings in their configuration files that specify the NLS_LANG value or the Java VM locale. Check the documentation accompanying these servers.
Related Topics
Oracle Database Administrator’s Reference for Microsoft Windows
See Also:
Oracle Database Globalization Support Guide for more information about configuring user locale preferences
prompt **********************************************************
prompt J:\app\oraclexe\product\18.0.0\dbhomeXE\bin\users.sql SAYS
prompt **********************************************************
-- if SQL*Plus writes trailing spaces when spooling data to a file
SET LINESIZE 254 trimspool on arraysize 100 tab off
COLUMN PARAMETER HEADING PARAMETER FORMAT A30
COLUMN value HEADING value FORMAT A100
COLUMN USERNAME HEADING USERNAME FORMAT A20
COLUMN COMP_NAME HEADING COMP_NAME FORMAT A30
COLUMN FILE_NAME HEADING FILE_NAME FORMAT A70
COLUMN tablespace_name HEADING tablespace_name FORMAT A15
prompt ******** 1. nls_database_parameters :
prompt select * from nls_database_parameters ;
prompt ******** 2. francuski e - all ok if this script is in npp "encoding UTF-8" :
prompt select 'š đ č ć ž é' non_eng_letters, ascii('é') from dual ;
select 'š đ č ć ž é' non_eng_letters, ascii('é') from dual ;
prompt ******** 3. nls_session_parameters :
prompt select PARAMETER, VALUE from nls_session_parameters ;
prompt ******** 4. nls_instance_parameters :
prompt select PARAMETER, VALUE from nls_instance_parameters ;
-- delete t_user where user_name != 'MERCEDES' EE8PC852 US8PC437 EE8MSWIN1250
-- delete t_user where user_alias != 'ora7'
prompt
prompt
prompt ********* APEX: ********
prompt https://docs.oracle.com/cd/E59726_01/install.50/e39144/pre_require.htm#HTMIG376
prompt name and location of the server parameter file eg SPFILEXE.ORA
prompt or initialization parameter file: (initsid.ora) :
prompt SHOW PARAMETER PFILE OUTPUTS :
prompt J:\APP\ORACLEXE\PRODUCT\18.0.0\DBHOMEXE\DATABASE\SPFILEXE.ORA
SHOW PARAMETER PFILE
prompt ***** DETERMINE CURRENT VALUES OF MEMORY_TARGET PARAM.: *****
prompt 0 = your db is using manual memory management - Consult Ora DB Admins Guide to learn how to configure an equivalent memory size using MANUAL MEMORY MANAGEMENT,
prompt instead of continuing with the steps that follow.
prompt If system is using SERVER PARAMETER FILE, set value of the MEMORY_TARGET initialization parameter to at least 300 MB so:
prompt ALTER SYSTEM SET MEMORY_TARGET='300M' SCOPE=spfile; then SHUTDOWN and STARTUP
prompt SHOW PARAMETER MEMORY_TARGET OUTPUTS :
prompt NAME TYPE VALUE
prompt memory_target big integer 0
SHOW PARAMETER MEMORY_TARGET
prompt
prompt
select default_tablespace, temporary_tablespace from dba_users where username like 'APEX%'
/
select tablespace_name, file_name
, (maxbytes - bytes) / 1024/1024 as "Available Space MB"
, autoextensible
from dba_data_files
--where tablespace_name in ('SYSAUX', 'SYSTEM')
/
prompt E N D A P E X ********************************************
prompt
prompt
select comp_name, version, status from dba_registry where comp_id = 'XDB';
--NLS_LANGUAGE=american NLS_TERRITORY=america
--NLS_CHARACTERSET=US8PC437
alter session set
nls_numeric_characters=',.'
nls_date_format='YYYY-MM-DD HH24:MI:SS'
/
-- ne ide: alter session set NLS_LANG=american_america.US8PC437
-- NLS_CHARACTERSET=US8PC437
--SELECT distinct PARAMETER FROM V$NLS_VALID_VALUES
-- CHARACTERSET SORT TERRITORY LANGUAGE
--SELECT PARAMETER, VALUE FROM V$NLS_VALID_VALUES where PARAMETER='CHARACTERSET' order by VALUE
-- EE8ISO8859P2 EE8MSWIN1250 EE8PC852 UTF8
select * from t_tip_doc
/
select a.USER_ID, a.CREATED
, u.NAZIV, u.USER_NAME, u.USER_PASSWORD, u.USER_ALIAS
from all_users a, t_user u
where u.user_name = a.username(+)
order by u.user_name
/
select * from t_user order by user_name
/
prompt D:\>echo %NLS_LANG% vrati AMERICAN_AMERICA.EE8MSWIN1250
prompt D:\>chcp vrati Active code page: 852 = console page win CLI-a
prompt U nls_database_parameters: nlsdbcharset= AL32UTF8 ili EE8MSWIN1250 :
select value from nls_database_parameters where parameter ='NLS_CHARACTERSET'
/
prompt select banner from v$version where banner like 'Oracle Database%';
prompt OUTPUTS : Oracle Database 18c Express Edition Release 18.0.0.0.0 - Production
select banner from v$version where banner like 'Oracle Database%';
prompt select instance_name, status, database_status from v$instance;
prompt OUTPUTS :
prompt INSTANCE_NAME STATUS DATABASE_STATUS
prompt xe OPEN ACTIVE
select instance_name, status, database_status from v$instance;
select USERNAME, USER_ID, CREATED from all_users order by username
/
prompt After DB 18c install. 35 rows selected. :
prompt system/MYPSW has no APEX... users
prompt
prompt
prompt show con_name displays :
show con_name
prompt sho user displays :
sho user
prompt show pdbs displays :
show pdbs
prompt
prompt
prompt ALTER SESSION SET container = XEPDB1; show con_id or SELECT name, con_id FROM v$pdbs;
prompt ALTER SESSION SET container = CDB$ROOT; (PDB$SEED=2) SELECT name Service_Name FROM v$active_services WHERE con_id =3;
prompt
prompt
both backup tables, and they both support flashback database, but there are some important differences:
Data Pump Export (expdp) - The export utility is a "logical" backup, usually done by specifying specific tables. If you fail to do a "consistent" export, or if you fail to include related tables and use RESTRICTED and CONSISTENT mode (with referential integrity constraints), you may not be able to recover properly. Export is often used as a supplement to RMAN, usually for the restore of specific tables.
Recovery manager (rman) - RMAN is designed for backup and recovery, a extension of the Enterprise Backup Utility (EBU). RMAN takes full, physical, consistent backups of your database files..
Advantages & disadvantages of Export:
Advantages & disadvantages of RMAN:
Tutorial : https://support.dbagenesis.com/knowledge-base/oracle-data-pump-utility-expdp-impdp/
Video : https://www.youtube.com/watch?v=b0o4tb7P_xg or https://www.youtube.com/watch?v=rPqcnOZK984
Link to articles: https://support.dbagenesis.com eg https://support.dbagenesis.com/knowledge-base/install-oracle-linux-on-virtualbox/
which will be used by Oracle for performing exports and imports :
# mkdir -p /u02/dp_exp_dir
Create directory inside DB or use existing DATA_PUMP_DIR (see below) :
SQL> create directory datapump as '/u02/dp_exp_dir';
create directory datapumpmy as 'J:\app\oraclexe\product\18.0.0\admin\xe\dpdumpmy\';
Grant permissions on directory :
SQL> grant read,write on directory datapumpmy to hr ;
View directory information :
desc dba_directories
SET LINESIZE 254 trimspool on arraysize 100 tab off
COLUMN PARAMETER HEADING PARAMETER FORMAT A30
COLUMN OWNER HEADING OWNER FORMAT A15
COLUMN DIRECTORY_NAME HEADING DIRECTORY_NAME FORMAT A30
COLUMN DIRECTORY_PATH HEADING DIRECTORY_PATH FORMAT A100
select substr(OWNER,1,30) OWNER, substr(DIRECTORY_NAME,1,30) DIRECTORY_NAME, substr(DIRECTORY_PATH,1,100) DIRECTORY_PATH, ORIGIN_CON_ID from dba_directories;
OWNER DIRECTORY_NAME DIRECTORY_PATH ORIGIN_CON_ID
---------------- ------------------------------ ----------------------------------------------------------- -------------
SYS ORA_DBMS_FCP_LOGDIR J:\app\oraclexe\product\18.0.0\dbhomeXE\cfgtoollogs ALL ARE = 1
SYS ORA_DBMS_FCP_ADMINDIR J:\app\oraclexe\product\18.0.0\dbhomeXE\rdbms\admin
SYS SDO_DIR_WORK
SYS SDO_DIR_ADMIN c:\ade\aime_v\oracle/md/admin
SYS ORACLECLRDIR J:\app\oraclexe\product\18.0.0\dbhomeXE\bin\clr
SYS XMLDIR J:\app\oraclexe\product\18.0.0\dbhomeXE\rdbms\xml
SYS XSDDIR J:\app\oraclexe\product\18.0.0\dbhomeXE\rdbms\xml\schema
SYS ORACLE_OCM_CONFIG_DIR2 J:\app\oraclexe\product\18.0.0\dbhomeXE\ccr\state
SYS ORACLE_OCM_CONFIG_DIR J:\app\oraclexe\product\18.0.0\dbhomeXE\ccr\state
SYS OPATCH_INST_DIR J:\app\oraclexe\product\18.0.0\dbhomeXE\OPatch
SYS **DATA_PUMP_DIR** J:\app\oraclexe\product\18.0.0\admin\xe\dpdump\
SYS OPATCH_SCRIPT_DIR J:\app\oraclexe\product\18.0.0\dbhomeXE\QOpatch
SYS OPATCH_LOG_DIR J:\app\oraclexe\product\18.0.0\dbhomeXE\rdbms\log
SYS ORACLE_BASE J:\app\oraclexe\product\18.0.0
SYS ORACLE_HOME J:\app\oraclexe\product\18.0.0\dbhomeXE
15 rows selected.
In case you want to know all the options available with expdp utility, you can use below command
$ expdp help=y
To take DB level export
$ expdp directory=datapump dumpfile=fullprod.dmp logfile=fullprod.log full=y
$ expdp directory=datapump dumpfile=scott_bkp.dmp logfile=scott_bkp.log schemas='SCOTT'
To take table level export
$ expdp directory=datapump dumpfile=emp_bkp.dmp logfile=emp_bkp.log tables='SCOTT.EMP'
To take row level export
$ expdp directory=datapump dumpfile=emprows_bkp.dmp logfile=emprows_bkp.log tables='SCOTT.EMP' query=\"where deptno=10\"
In case you want to know all the options available with impdp utility, you can use below command
$ impdp help=y
To import full database
$ impdp directory=datapump dumpfile=fullprod.dmp logfile=imp_fullprod.log full=y
To import source schema objects into same schema name
$ impdp directory=datapump dumpfile=scott_bkp.dmp logfile=imp_schema.log remap_schema='SCOTT:SCOTT'
$ impdp directory=datapump dumpfile=scott_bkp.dmp logfile=imp_schema.log remap_schema='HR:HRDPIMP_TEST'
To import a table
$ impdp directory=datapump dumpfile=emp_bkp.dmp logfile=imp_emp.log tables='EMP' remap_schema='SCOTT:SCOTT'
To import a table to another user
$ impdp directory=datapump dumpfile=emp_bkp.dmp logfile=imp_emp.log tables='EMP' remap_schema='SCOTT:SYSTEM'
To import tables to another tablespace (only in datapump)
$ impdp directory=datapump dumpfile=emp_bkp.dmp logfile=imp_emp.log tables='EMP' remap_schema='SCOTT:SCOTT' remap_tablespace='MYDATA:MYTBS'
https://support.dbagenesis.com/knowledge-base/oracle-expdp-par-file-example/ A sample data pump export and import :
Data Pump schema level Export:
====================
expdp directory=datapump dumpfile=scott_bkp.dmp logfile=scott_bkp.log schemas='SCOTT'
Data Pump Import:
=================
impdp directory=datapump dumpfile=scott_bkp.dmp logfile=imp_schema.log remap_schema='SCOTT:SCOTT'
In real-time, you might perform very complex export and import and frequently - daily or weekly. Data Pump jobs can be automated using PAR file :
Username=hr/hr tables=hr.emp directory=EXP_DIR dumpfile=QUERY_EXP.dmp logfile=QUERY_EXP.log
To call the above export PAR file :
Top.....Instalac 18c XE.....Instalac APEX 20.1.....Conv. F6i to APEX (Devsuite10g on WinXP)
Requires release 20.1 requires an Oracle Database release 11.2.0.4, Oracle REST Data Services (ORDS) 19.x or later.
NOT ON : Win 10 64 bit Oracle DB 11g XE Release 11.2.0.2.0 - 64bit Production !!!
apex_20.1_en.zip from http://www.oracle.com/technetwork/developer-tools/apex/downloads/index.html
PS J:\app\oraclexe\product\18.0.0\dbhomeXE\bin> tnsping xe
TNS Ping Utility for 64-bit Windows: Version 18.0.0.0.0 - Production on 06-SEP-2020 22:36:18
Copyright (c) 1997, 2018, Oracle. All rights reserved.
Used parameter files:
J:\app\oraclexe\product\18.0.0\dbhomeXE\network\admin\sqlnet.ora
Used TNSNAMES adapter to resolve the alias
Attempting to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP)(HOST = sspc2)(PORT = 1521)) (CONNECT_DATA = (SERVER = DEDICATED) (SERVICE_NAME = XE)))
OK (0 msec)
Find out in which container APEX is currently installed into:
select r.COMP_NAME, r.VERSION, c.NAME, c.CON_ID from CDB_REGISTRY r, V$CONTAINERS c where r.CON_ID=c.CON_ID and r.COMP_ID='APEX' order by CON_ID;
no rows selected
select COMP_ID, VERSION, STATUS from CDB_REGISTRY where COMP_ID='APEX' order by CON_ID;
no rows selected
on Windows 10 pro 64 bit Ver : 10.0.19041 DB 18c
BY VINISH KAPOOR ON APRIL 3, 2019 on Windows and Unix/Linux systems :
https://www.foxinfotech.in/2020/04/installing-oracle-apex-20-1.html
BY VINISH KAPOOR ON APRIL 26, 2020 :
https://www.foxinfotech.in/2019/04/install-oracle-apex-19-1-in-eleven-easy-steps.html
Run all Apex 20.1 installation scripts from J:\apex_instl\apex (F:\software\apex19\apex)
cd J:\apex_instl\apex
sqlplus / as sysdba or sqlplus sys/syspsw@xe as sysdba
@apexins.sql SYSAUX SYSAUX TEMP /i/
Apex run time environment settings :
@apxrtins.sql SYSAUX SYSAUX TEMP /i/
change password for ADMIN user eg psw=Apex#2020
@apxchpwd.sql
copy Apex images to apex/images folder
@apex_epg_config.sql J:\apex_instl\ (F:\software\apex19\) Do not include apex folder in this path.
grep ORA- *.log
grep PLS- *.log
Unlock APEX_PUBLIC_USER account and specify password.
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY MYPSW;
Neded for http://localhost:8181/apex/apex_admin :
select account_status from dba_users where username = 'ANONYMOUS';
ACCOUNT_STATUS
--------------------------------
EXPIRED & LOCKED
alter user ANONYMOUS identified by anonymous;
alter user ANONYMOUS account unlock;
Configure Apex RESTful Services as follows:
@apex_rest_config.sql
Set HTTP port if using HTTP server as follows:
EXEC DBMS_XDB.SETHTTPPORT(8181);
Enabling Network Services for Oracle Database 12c and Later
Begin
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => '*',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_200100',
principal_type => xs_acl.ptype_db));
End;
/
http://localhost:8181/apex/apex_admin
set linesize 200
COLUMN USERNAME HEADING USERNAME FORMAT A40
COLUMN USER_ID HEADING USER_ID FORMAT A20
COLUMN DEFAULT_COLLATION HEADING DEFAULT_COLLATION FORMAT A20
SELECT * FROM ALL_USERS WHERE USERNAME LIKE 'APEX%';
USERNAME USER_ID CREATED COM O INH DEFAULT_COLLATION IMP ALL
---------------------------------------- ---------- --------- --- - --- -------------------- --- ---
APEX_200100 ########## 07-SEP-20 YES Y NO USING_NLS_COMP NO NO
APEX_INSTANCE_ADMIN_USER ########## 07-SEP-20 YES Y NO USING_NLS_COMP NO NO
APEX_PUBLIC_USER ########## 07-SEP-20 YES Y NO USING_NLS_COMP NO NO
When Oracle Application Express installs, it creates three new database accounts:
If you configured RESTful Web services, then these additional accounts will be created:
The examples used in this document use the cURL command-line tool to demonstrate how to access the Oracle Database REST API. To connect securely to the REST server, you must install a version of cURL that supports SSL. CURL is a command-line tool and library for transferring data with URLs.
https://www.thewindowsclub.com/how-to-install-curl-on-windows-10
curl --help shows Win 10 Curl : 2020.09.19 curl-7.72.0_4-win64-mingw.zip
C:\WINDOWS\system32>curl --version
curl 7.55.1 (Windows) libcurl/7.55.1 WinSSL
Release-Date: 2017-11-14, security patched: 2019-11-05
"J:\symenu\ProgramFiles\SPSSuite\SyMenuSuite\Cmder_sps\vendor\git-for-windows\mingw64\bin\curl.exe" --version --version
curl 7.71.1 (x86_64-w64-mingw32) libcurl/7.71.1 OpenSSL/1.1.1g (Schannel) zlib/1.2.11 brotli/1.0.7 libidn2/2.3.0 libssh2/1.9.0 nghttp2/1.41.0
Release-Date: 2020-07-01
or :
Git for Windows will install CURL along with it. Add it to your Windows path, and you will be able to execute it from anywhere. Press start button, and type "system var".
or :
To install cURL on your system:
In your browser, navigate to the cURL home page at https://curl.haxx.se/windows/ -> curl for 64 bit
https://curl.haxx.se/windows/dl-7.72.0_4/curl-7.72.0_4-win64-mingw.zip, built and statically linked with :
When running cURL from a Windows command shell only, you must provide an SSL certificate authority (CA) file or bundle to authenticate against the Verisign CS certificate.
Navigate to the cURL CA Extract page at http://curl.haxx.se/docs/caextract.html and download the cacert.pem SSL CA certificate file in the folder where you installed cURL.
Open a command window, navigate to directory where you installed cURL, and set the cURL environment variable, CURL_CA_BUNDLE, to the location of the SSL CA certificate file. For example, on a Windows system you would enter:
C:\curl> set CURL_CA_BUNDLE=cacert.pem
You are now ready to send REST requests to the Database REST API instance using cURL. See Authentication, and Use cURL.
J:\symenu\z_aplpsy\curl\bin
To be able to create workspace in PDB you need configure "Oracle REST Data services" for each PDB you want to use.
Based on "Oracle REST data Services Installation and Configuration Guide (E25066-10)" chapter 2.1 "Configuring Multiple Databases" you should: issue commands from your apex 4.2.x directory:
java -jar ords.war setup --database
Note: For
java -jar ords.war map-url --type base-patch --workspace-id
Make sure you restart "Oracle REST Data Services".
Access Apex Administration Services - please use newly configured link:
http://
Enter credentials you used previously during "Configuring Multiple Databases" for PDB apex access. Make note that
This worked for me, hopefully it works for you too.
APEX data is stored in pluggable database, while default connection in SQL Plus is to root container cdb$root.
There is APEX_200100 listed (and you use it). Then:
ALTER SESSION SET CURRENT_SCHEMA = APEX_200100 ;
alter session set container = XEPDB1;
BEGIN
APEX_INSTANCE_ADMIN.UNRESTRICT_SCHEMA(P_SCHEMA => 'HR_PDB1');
COMMIT;
END;
/
Now check whether you can assign the HR_PDB1 schema to your workspace.
BEGIN
APEX_INSTANCE_ADMIN.ADD_SCHEMA('hr','HR'); //hr=MY_WORKSPACE, HR=shema
END;
/
In J:\apex_instl or F:\software\axepdb1pex19 or c\:\temp\apex :
ls shows files and 4 dirs : builder/ images/ core/ utilities/
On Unix/Linux: cd /home/usr1/apex19/apex
sqlplus.exe - avoid eg old sql+ from 2008. 11.1.0.7.0 !!! :
cd C:\oraclexe\app\oracle\product\18.1\server\bin\sqlplus.exe /nolog
conn sys/MYPSW as sysdba or conn sys/MYPSW@XE as SYSDBA
SQL*Plus: Release 11.2.0.2.0 Production on Pet Kol 21 11:48:00 2020
Copyright (c) 1982, 2014, Oracle. All rights reserved.
--outputs no rows selected :
SELECT username FROM dba_users where username LIKE 'FLOWS\_______' ESCAPE '\'
--outputs APEX_040000 :
SELECT username FROM dba_users where username LIKE 'APEX\_______' ESCAPE '\'
--outputs FLOWS_FILES :
SELECT username FROM dba_users where username LIKE 'FLOWS%'
--outputs no rows selected :
--If the results contain entries in the form FLOWS_XXXXXX or APEX_XXXXXX where XXXXXX represents six numbers, those entries are candidates for removal
SELECT username FROM dba_users
WHERE (
username LIKE 'FLOWS\_______' ESCAPE '\'
OR username LIKE 'APEX\_______' ESCAPE '\'
)
-- **outputs APEX_040000** :
AND username NOT IN ( SELECT schema FROM dba_registry WHERE comp_id = 'APEX' )
/
-- outputs eg APEX_200100
DROP USER APEX_040000 CASCADE;
DROP USER APEX_200100 CASCADE;
Run all Apex 20.1 installation scripts from J:\apex_instl\apex (F:\software\apex19\apex)
-- apex dir is from J:\apex_instl\1_apex_20.1_en.zip !!!
cd J:\apex_instl\apex
C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe /nolog
conn sys/MYPSW as sysdba or conn sys/MYPSW@XE as SYSDBA
-- 6 minutes or less :
@apexins.sql SYSAUX SYSAUX TEMP /i/
--connect to DB again because apexins.sql disconnected you from DB :
C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe /nolog
conn sys/MYPSW as sysdba or conn sys/MYPSW@XE as SYSDBA
-- 8080 :
SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
--run apxrtins.sql for Apex run time environment settings :
@apxrtins.sql SYSAUX SYSAUX TEMP /i/
--Why above command Generates Error (apex_20.1_en.zip, Win 10 64 bit) ? :
FAIL - Precondition for Phase 1 failed: APEX_200100 already exists
. 2 errors occurred
declare
*
ERROR at line 1:
ORA-20001: Prerequisite checks failed; unable to proceed with APEX installation
ORA-06512: at line 288
Disconnected from Oracle Database 11g XE Release 11.2.0.2.0 - 64bit Production
cd C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe /nolog
conn sys/MYPSW as sysdba or conn sys/MYPSW@XE as SYSDBA
@apxchpwd.sql
ADMIN usr created slavkoss22@gmail.com psw=Apex#201
--Created instance administrator ADMIN
-- in J:\apex_instl\apex folder (same as previous steps !!) :
C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe /nolog
conn sys/MYPSW as sysdba or conn sys/MYPSW@XE as SYSDBA
--Note: As I copied apex_20.1_en.zip to J:\apex_instl (or F:\software\apex19 or C:\TEMP) folder, so I am specifying the same directory here for apex_epg_config.sql script. Do not include apex folder in this path !!
@apex_epg_config.sql J:\apex_instl\
-- 218 MB ! 229.458.985 B :
--outputs : . Loading images directory: J:\apex_instl\/apex/images
-- timing for: Load Images Elapsed: 00:04:53.42
--Unlock APEX_PUBLIC_USER account and specify the password
ALTER USER APEX_PUBLIC_USER ACCOUNT UNLOCK;
ALTER USER APEX_PUBLIC_USER IDENTIFIED BY MYPSW;
--? ALTER USER ANONYMOUS ACCOUNT UNLOCK;
--8080 :
SELECT DBMS_XDB.GETHTTPPORT FROM DUAL;
Configure Apex RESTful Services as follows:
-- All MYPSW :
@apex_rest_config.sql
Set HTTP port if using HTTP server as follows:
EXEC DBMS_XDB.SETHTTPPORT(8181);
Configure network ACL for Oracle Apex 20.1 as follows:
/* First connect as the SYS user with SYSDBA role */
sqlplus sys/syspsw@orcl as sysdba
/* Then execute the below script */
Begin
DBMS_NETWORK_ACL_ADMIN.APPEND_HOST_ACE(
host => '*',
ace => xs$ace_type(privilege_list => xs$name_list('connect'),
principal_name => 'APEX_200100',
principal_type => xs_acl.ptype_db));
End;
/
in J:\apex_instl\apex folder (same as previous steps !!) :
C:\oraclexe\app\oracle\product\11.2.0\server\bin\sqlplus.exe /nolog
conn sys/MYPSW as sysdba or conn sys/MYPSW@XE as SYSDBA
Declare
acl_path Varchar2(4000);
Begin
-- Look for the ACL currently assigned to '*' and give APEX_200100
-- the "connect" privilege if APEX_200100 does not have the privilege yet.
Select
acl
Into acl_path
From
dba_network_acls
Where
host = '*'
And lower_port Is Null
And upper_port Is Null;
If dbms_network_acl_admin.check_privilege(acl_path, 'APEX_200100', 'connect') Is Null Then
dbms_network_acl_admin.add_privilege(acl_path, 'APEX_200100', true, 'connect');
End If;
Exception
-- When no ACL has been assigned to '*'.
When no_data_found Then
dbms_network_acl_admin.create_acl('power_users.xml', 'ACL that lets power users to connect to everywhere', 'APEX_200100',
true, 'connect');
dbms_network_acl_admin.assign_acl('power_users.xml', '*');
End;
/
--PL/SQL procedure successfully completed.
Commit;
--Now your installation and configuration are complete for Oracle Apex 20.1. You can open the Oracle Apex in a browser using the following URL:
http://localhost:8181/apex/apex_admin
ADMIN usr created slavkoss22@gmail.com psw=Apex#201
Before you get started, please take a moment to create a workspace. A workspace is a shared work area where multiple developers can build applications.
Once created, sign in to your workspace to begin building applications. Return to Administration Services to create additional workspaces or to manage this Application Express instance.
POSSYS
reuse exsisting shema MERCEDES
shema ADMIN/MYPSW
-- Workspace POSSYS provisioned with administrator ADMIN. (also INTERNAL WS)
App develop. : http://localhost:8181/apex/ or http://localhost:8181/apex/f?p=4550:1
A d m i n : http://localhost:8181/apex/apex_admin or http://localhost:8181/apex/f?p=4050:3
or http://127.0.0.1:8080/apex/apex_admin
WS cre. : http://localhost:8181/apex/f?p=4050:10
-- adds : :13967656906380:::::
Cloud :
POSSYS app : https://apex.oracle.com/pls/apex/possys/r/sales-web-app4/login
POSSYS app develop. : https://apex.oracle.com/pls/apex/f?p=4550:1
Top.....Instalac 18c XE.....Instalac APEX 20.1.....Conv. F6i to APEX (Devsuite10g on WinXP)
to convert Oracle Forms 6i (9 or ...) to APEX app modules
Convert fmb 6i to fmb 10
Convert Oracle Forms to XML.
Run Forms to XML Conversion tool, Forms2XML, to convert Forms modules in your app. This creates XML output files.
C:\OraDS10Home1\BIN\frmf2xml.bat : frmf2xml.bat [options] file1 [file2...]
In WinXP (Ora Virt. Box) D:\OraDS10Home1\BIN
C:\OraDS10Home1\BIN\frmf2xml.bat L:\asg\possys6\tipdok.fmb
Oracle Forms 10.1.2 Forms to XML Tool
Copyright(c) 2001, 2005, Oracle. All rights reserved.
Processing module C:\OraDS10Home1\forms\test.fmb
XML Module saved as L:\asg\possys6\tipdok_fmb.xml
or C:\OraDS10Home1\BIN\frmf2xml.bat L:\asg\hr\poplist_dept2.fmb
XML Module saved as L:\asg\hr\poplist_dept2_fmb.xml
Create an APEX Workspace wsconvf6
Associate workspace with Oracle Forms application schema.
Create migration project mercedes or hr and load app metadata XML
login to wsconvf6/admin/admin
Click App Builder icon.
Click Oracle Forms Migrations on the right side of the page
On App Migrations page, Migr. Tasks region -> App Migrations , click Create Project. Enter project details:
Click Next. Confirm page appears.
To add more files, click Upload Another File.
Analyze Oracle Forms app
From App Migration Workshop, verify and adjust Forms app metadata. Identify business logic required in new APEX app. Refine scope of your conversion.
File Name = 'tipdok_fmb.xml'
Component | Count | Equivalent Component | Implementation Details | Included | File Name | Applicable | |
---|---|---|---|---|---|---|---|
1 | Alerts | 6 | - | alert message can be stored as Text Message in Shared Components of APEX app. Text Messages can be used to build translatable text strings with substitution variables that can be called from PL/SQL packages, procedures, and functions. | - | tipdok_fmb.xml | yes |
Alerts 6 - An alert message can be stored as a Text Message in the Shared Components of an Oracle Application Express application. Text Messages can be used to build translatable text strings with substitution variables that can be called from PL/SQL packages, procedures, and functions. - tipdok_fmb.xml Yes
Not working if form contains image :
Processing module C:\OraDS10Home1\forms\test.fmb
ERROR - an exception has been encountered: _jni_gra_export_image failed
L:\3_sw_video\4_db\2_oracle\Complete_Oracle_SQL_Course_12c\000_12cX64_APEX_app_migration_guide.pdf
L:\2_knjige\oracle\apex\8_instal_oracle_10XE_APEX32_devsuite101_MOJ.txt
L:\2_knjige\oracle\apex\0_apex_dokum\AEMIG\overview-migration-process.htm
L:\1_instalac\2_instalac_ora\z_ostalo\9_ASG_F6i_f11\1_f6i
L:\1_instalac\2_instalac_ora\z_ostalo\2_oracleXE\11XE_win
L:\1_instalac\5_inst\1_instalac_old\0instal\1_moj_WinPostInst\z_mojeF6R6_ASGphp32bit\2_ORA_f10_DeveloperSuite10g
C:\ProgramData\Microsoft\Windows\Start Menu\Programs\Oracle Database 11g Express Edition
C:\oraclexe\app\oracle\product\11.2.0\server
https://www.foxinfotech.in/2017/03/convert-oracle-form-to-apex-using-frmf2xml-utility.html
APEX 20.1 : was 18.1
APEX forum : https://community.oracle.com/community/database/developer-tools/
http://www.oracle.com/technetwork/developer-tools/apex/application-express/podcasts-090206.html
https://www.youtube.com/watch?v=5kPxqEXM5UM
https://www.youtube.com/watch?v=gg6Gy1VtqmA
You must install Oracle Developer Suite (best on WinXP !!) to convert Oracle Forms applications and Oracle Reports to XML format.
Convert:
C:\OraDS10Home1\BIN\frmf2xml.bat
@ECHO OFF
REM
REM DESCRIPTION
REM This file is used to call the Forms2XML conversion tool.
REM It takes .fmb, .mmb, and .olb files and converts them into XML.
REM
REM NOTES
REM It wraps the class oracle.forms.util.xmltools.Forms2XML and passes
REM any parameters given onto the tool.
REM You can only use the standard nine parameters, but these can include
REM wildcards in the filenames.
REM
REM Setup path to include necessary Forms dlls.
set PATH=C:\OraDS10Home1\bin;%PATH%
REM Run the tool with the required jar files added to the classpath
C:\OraDS10Home1\jdk\bin\java -classpath C:\OraDS10Home1\forms\java\frmxmltools.jar;C:\OraDS10Home1\forms\java\frmjdapi.jar;C:\OraDS10Home1\lib\xmlparserv2.jar;C:\OraDS10Home1\lib\xschema.jar oracle.forms.util.xmltools.Forms2XML %*
https://www.tutorialspoint.com/plsql/plsql_dbms_output.htm
DBMS_OUTPUT.ENABLE(buffer_size IN INTEGER DEFAULT 20000); NULL=unlimited
SET SERVEROUTPUT OFF
SET SERVEROUTPUT ON
DECLARE
lines dbms_output.chararr;
num_lines number;
BEGIN
DBMS_OUTPUT.DISABLE;
DBMS_OUTPUT.ENABLE(NULL);
num_lines := 0;
dbms_output.put_line (user || ' Tables in the database:'); num_lines := num_lines + 1;
FOR t IN (SELECT table_name FROM user_tables)
LOOP dbms_output.put_line(t.table_name); num_lines := num_lines + 1; END LOOP;
dbms_output.put_line('SELECT table_name FROM user_tables :'); num_lines := num_lines + 1;
dbms_output.get_lines(lines, num_lines);
FOR i IN 1..num_lines LOOP
null;
--dbms_output.put_line(lines(i));
END LOOP;
--DBMS_OUTPUT.DISABLE;
END;
/
SET SERVEROUTPUT OFF
Top.....Instalac 18c XE.....Instalac APEX 20.1.....Conv. 6i to APEX (Devsuite10g on WinXP)