Visit Counter

Monday, January 11, 2021

Change the listening port of the Oracle database



I changed Oracle database listener default port 1521 to 1529.


1. Log in to the Linux operating system as the oracle user.


2. Check the current listening status.
lsnrctl status PROD

3. Stop the listening service.
lsnrctl stop PROD

4. Change the port number in the files tnsnames.ora and listener.ora.
cd /opt/oracle/product/11.2.0/db_1/network/admin/The listening file listener.ora is used as an example to describe how to change the listening port, for example, 1529 to a new listening port.

vi listener.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(GLOBAL_DBNAME = PROD)
(SID_NAME = PROD)
)
)

LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = IPC)(KEY = REGISTER))
(ADDRESS = (PROTOCOL = TCP)(HOST = test12.com)(PORT = 1529))
)
)

SECURE_REGISTER_LISTENER=(IPC)

Note: (Make Sure you are using SPFILE....if you pfile then edit pfile save it restart the database)

5. Modify the initialization parameter local_listener.
sqlplus / as sysdba
show parameter local_listener
alter system set local_listener="(address=(protocol=tcp)(host=test12.com)(port=1529))";
exit

6. Start the listening service.
lsnrctl start PROD

7. After the change is complete, log in and test the new listening port.
a. Check whether the listening port is changed.
netstat -na | grep "1521"
b. Check the listening status.
lsnrctl status PROD

EXPDB with sys without knowing password

 




You can export full database using EXPDB utility with out sys user password



$ expdp "'/as sysdba'" full=y directory=EXP_DIR dumpfile=DB11g.dmp logfile=DB11g.log

...
...
...

. . exported "FXERP"."XFND_CONC"                         30.03 KB      34 rows
. . exported "FXERP"."XFND_CUR"                          32.35 KB     249 rows
. . exported "FXERP"."XFND_FLEXKEY"                      23.41 KB      41 rows
. . exported "FXERP"."XFND_FLEXSET"                      22.53 KB      11 rows
. . exported "FXERP"."XFND_LOC"                          23.21 KB       3 rows
. . exported "FXERP"."XFND_LOOKUPSET"                    28.03 KB      82 rows
. . exported "FXERP"."XFND_MENU"                         20.85 KB      43 rows
. . exported "FXERP"."XFND_OU"                           18.05 KB       2 rows
. . exported "FXERP"."XFND_PARTY_BK"                     26.60 KB      44 rows
. . exported "FXERP"."XFND_PROCESS_H"                    16.80 KB      17 rows
. . exported "FXERP"."XFND_PROCESS_L"                    33.45 KB     197 rows
. . exported "FXERP"."XFND_PROCESS_NXT"                  28.74 KB     471 rows
...
...
...

. . exported "FXERP"."XFA_GL_DIST"                           0 KB       0 rows
. . exported "FXERP"."XFA_RETIRE"                            0 KB       0 rows
. . exported "FXERP"."XFND_ATTN"                             0 KB       0 rows
. . exported "FXERP"."XFND_USR_PREFERENCES"                  0 KB       0 rows
. . exported "FXERP"."XMTL_CATEGORY"                         0 KB       0 rows
. . exported "FXERP"."XMTL_CUST_VEND_ITEM"                   0 KB       0 rows
. . exported "FXERP"."XMTL_DEMAND"                           0 KB       0 rows
. . exported "FXERP"."XMTL_ITEM_CATEGORY"                    0 KB       0 rows
. . exported "FXERP"."XMTL_LPN_NUM"                          0 KB       0 rows
. . exported "FXERP"."XMTL_RELATED_ITEM"                     0 KB       0 rows
. . exported "FXERP"."XMTL_SL_NUM"                           0 KB       0 rows
. . exported "FXERP"."XMTL_TRAN_ACCT_BK"                     0 KB       0 rows
. . exported "FXERP"."XMTL_TRX_REASON"                       0 KB       0 rows
. . exported "FXERP"."XXAKI_WH_VAN_H"                        0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_ANON_ATTRS_WRK"               0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_ANON_RULES_WRK"               0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_ACTION_WRK"                0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_DAREFS_WRK"                0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_LOCATORPATHS_WRK"          0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_MACRO_DEP_WRK"             0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_MACRO_PAR_WRK"             0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_PRED_OPRD_WRK"             0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_PRED_PAR_WRK"              0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_PRED_SET_WRK"              0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_PRED_WRK"                  0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_CT_VLD_MSG"                   0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_DATA_MODEL_WRK"               0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_DICT_ATTRS_WRK"               0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_DOCS_WRK"                     0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_DOC_REFS_WRK"                 0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_MAPPED_PATHS"                 0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_MAPPED_PATHS_WRK"             0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_MAPPING_DOCS_WRK"             0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_PRV_ATTRS_WRK"                0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_RT_PREF_PARAMS_WRK"           0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_STD_ATTRS_WRK"                0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_STORED_TAGS"                  0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_STORED_TAGS_WRK"              0 KB       0 rows
. . exported "ORDDATA"."ORDDCM_UID_DEFS_WRK"                 0 KB       0 rows
. . exported "OUTLN"."OL$"                                   0 KB       0 rows
. . exported "OUTLN"."OL$HINTS"                              0 KB       0 rows
. . exported "OUTLN"."OL$NODES"                              0 KB       0 rows
. . exported "OWBSYS"."OWBRTPS"                              0 KB       0 rows
. . exported "SCOTT"."BONUS"                                 0 KB       0 rows
. . exported "SYSTEM"."DEF$_AQCALL"                          0 KB       0 rows
. . exported "SYSTEM"."DEF$_AQERROR"                         0 KB       0 rows
. . exported "SYSTEM"."DEF$_CALLDEST"                        0 KB       0 rows
. . exported "SYSTEM"."DEF$_DEFAULTDEST"                     0 KB       0 rows
. . exported "SYSTEM"."DEF$_ERROR"                           0 KB       0 rows
. . exported "SYSTEM"."DEF$_LOB"                             0 KB       0 rows
. . exported "SYSTEM"."DEF$_ORIGIN"                          0 KB       0 rows
. . exported "SYSTEM"."DEF$_PROPAGATOR"                      0 KB       0 rows
. . exported "SYSTEM"."DEF$_PUSHED_TRANSACTIONS"             0 KB       0 rows
. . exported "SYSTEM"."MVIEW$_ADV_INDEX"                     0 KB       0 rows
. . exported "SYSTEM"."MVIEW$_ADV_PARTITION"                 0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_AUDIT_COLUMN"                 0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_COLUMN_GROUP"                 0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_CONFLICT"                     0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_DDL"                          0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_EXCEPTIONS"                   0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_EXTENSION"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_FLAVORS"                      0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_FLAVOR_OBJECTS"               0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_GENERATED"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_GROUPED_COLUMN"               0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_INSTANTIATION_DDL"            0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_KEY_COLUMNS"                  0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_OBJECT_PARMS"                 0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_PARAMETER_COLUMN"             0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_PRIORITY"                     0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_PRIORITY_GROUP"               0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REFRESH_TEMPLATES"            0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPCAT"                       0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPCATLOG"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPCOLUMN"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPGROUP_PRIVS"               0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPOBJECT"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPPROP"                      0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_REPSCHEMA"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_RESOLUTION"                   0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_RESOLUTION_STATISTICS"        0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_RESOL_STATS_CONTROL"          0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_RUNTIME_PARMS"                0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_SITES_NEW"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_SITE_OBJECTS"                 0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_SNAPGROUP"                    0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_OBJECTS"             0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_PARMS"               0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_REFGROUPS"           0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_SITES"               0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_TEMPLATE_TARGETS"             0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_USER_AUTHORIZATIONS"          0 KB       0 rows
. . exported "SYSTEM"."REPCAT$_USER_PARM_VALUES"             0 KB       0 rows
. . exported "SYSTEM"."SQLPLUS_PRODUCT_PROFILE"              0 KB       0 rows
. . exported "XHRMS"."ADJ_MON_DTL"                           0 KB       0 rows
. . exported "XHRMS"."ATTCH"                                 0 KB       0 rows
. . exported "XHRMS"."ATTN_MISSING"                          0 KB       0 rows
. . exported "XHRMS"."EMP_LEAVE"                             0 KB       0 rows
. . exported "XHRMS"."EMP_TERMS"                             0 KB       0 rows
. . exported "XHRMS"."E_TAX"                                 0 KB       0 rows
. . exported "XHRMS"."E_TAX_SUB"                             0 KB       0 rows
. . exported "XHRMS"."FAMILY_DETAIL"                         0 KB       0 rows
. . exported "XHRMS"."FIN_DETAIL"                            0 KB       0 rows
. . exported "XHRMS"."FIN_MAST"                              0 KB       0 rows
. . exported "XHRMS"."GL_CODE"                               0 KB       0 rows
. . exported "XHRMS"."HRMS_DOC"                              0 KB       0 rows
. . exported "XHRMS"."HRMS_MSG"                              0 KB       0 rows
. . exported "XHRMS"."HRMS_MSG_D"                            0 KB       0 rows
. . exported "XHRMS"."HRMS_TRS"                              0 KB       0 rows
. . exported "XHRMS"."HR_TMP"                                0 KB       0 rows
. . exported "XHRMS"."INVESTMENT"                            0 KB       0 rows
. . exported "XHRMS"."MAIL_SCH"                              0 KB       0 rows
. . exported "XHRMS"."MISC_PAY"                              0 KB       0 rows
. . exported "XHRMS"."PFM_D"                                 0 KB       0 rows
...
...
...
. . exported "XHRMS"."XXHR_DSTAT"                            0 KB       0 rows
. . exported "XHRMS"."XXHUM_TEMP"                            0 KB       0 rows
. . exported "XHRMS"."XX_HRDIST"                             0 KB       0 rows
. . exported "XHRMS"."XX_HRDSGN"                             0 KB       0 rows
. . exported "XHRMS"."XX_HRHIST"                             0 KB       0 rows
. . exported "XHRMS"."XX_HRPAY"                              0 KB       0 rows
Master table "SYS"."SYS_EXPORT_FULL_01" successfully loaded/unloaded
******************************************************************************
Dump file set for SYS.SYS_EXPORT_FULL_01 is:
  /u02/oradb/expdata/DB11g.dmp
Job "SYS"."SYS_EXPORT_FULL_01" successfully completed at Tues Jan 11 13:37:31 2020 elapsed 0 00:06:18