sqlplus / as sysdba
show parameter db_recovery; sys@EM13REP> show parameter db_recovery; NAME TYPE VALUE ==================================== =========== ============================== db_recovery_file_dest string /u07/flashback db_recovery_file_dest_size big integer 17G to change to different directory sys@EM13REP> alter system set db_recovery_file_dest='/u07/flashback'; to change recovery file size sys@EM13REP> alter system set db_recovery_file_dest_size='17g'; database is open sys@EM13REP> alter database flashback on; ls /u07/flashback list restore points SQL> SELECT NAME, SCN, TIME, DATABASE_INCARNATION#, GUARANTEE_FLASHBACK_DATABASE,STORAGE_SIZE FROM V$RESTORE_POINT; SQL> CREATE RESTORE POINT before_upgrade; sys@EM13REP> select flashback_on from v$database; Reference: http://docs.oracle.com/database/122/BRADV/using-flasback-database-restore-points.htm#BRADV71000
0 Comments
You have found that the time zone is wrong on a particular agent. This agent is already communicating with the OMS. Additionally, you determine that the host is of the wrong timezone. This blog documents the steps required to correct this situation.
It appears that host "mengland-lnx" is on the wrong timezone The host should be set to the Pacific Timezone. Check the Repository Database: sql> select target_name, timezone_region from sysman.mgmt_targets where target_name='mengland-lnx' order by 1,2; TARGET_NAME ==================================================================================================== TIMEZONE_REGION ================================================================ mengland-lnx US/Mountain ____________________________________________________________________________________________________ Yes wrong timezone Connect to the host "mengland-lnx" # date Sat Nov 19 16:28:05 MST 2016 # cd /etc # ls -al localtime lrwxrwxrwx 1 root root 31 Nov 18 20:05 localtime -> /usr/share/zoneinfo/US/Mountain # rm localtime All US timezones are located under the /usr/share/zoneinfo/US directory. # ls /usr/share/zoneinfo/US # cd /etc # ln -s /usr/share/zoneinfo/US/Pacific localtime # date Sat Nov 19 15:31:37 PST 2016 Host is fixed now let's fix the EM Agent .[oracle]$ ./emctl stop agent Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. Stopping agent ... stopped. [oracle]$ ./emctl resetTZ agent Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. Updating /oem/app/oracle/product/agent13c/agent_inst/sysman/config/emd.properties... Successfully updated /oem/app/oracle/product/agent13c/agent_inst/sysman/config/emd.properties. Login as the em repository user and run the script: exec mgmt_target.set_agent_tzrgn('mengland-lnx:3872','US/Pacific') and commit the changes This can be done for example by logging into sqlplus and doing SQL> exec mgmt_target.set_agent_tzrgn('mengland-lnx:3872','US/Pacific') SQL> commit sysman@EM13REP> exec mgmt_target.set_agent_tzrgn('mengland-lnx:3872','US/Pacific') PL/SQL procedure successfully completed. sysman@EM13REP> commit; Commit complete. Check the EM Repository again sysman@EM13REP> select target_name, timezone_region from sysman.mgmt_targets 2 3 where target_name='mengland-lnx' 4 order by 1,2; TARGET_NAME ==================================================================================================== TIMEZONE_REGION ================================================================ mengland-lnx US/Pacific ____________________________________________________________________________________________________ Start the agent now [oracle]$ ./emctl start agent Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. Starting agent ................ started. [oracle]$ ./emctl config agent getTZ Oracle Enterprise Manager Cloud Control 13c Release 2 Copyright (c) 1996, 2016 Oracle Corporation. All rights reserved. US/Pacific Middle Tier HostPREPARE THE HOST /u01 50GB /u10 50GB / 400GB as root yum repolist yum update yum search preinstall yum install oracle-database-server-12cR2-preinstall visudo ## Allow root to run any commands anywhere oracle ALL=(ALL) ALL ## Same thing without password %dba ALL=(ALL) NOPASSWD: ALL vi /etc/hosts ## make sure your fqhn is in here for MT and DB 192.168.1.113 aemidbs04.localdomain aemidbs04 192.168.1.114 aemimts01.localdomain aemimts01 vi /etc/sysconfig/network ## make sure your HOSTNAME= value is populated Hey Add more RPM's # OL6 and OL7 yum install make -y yum install binutils -y yum install gcc -y yum install libaio -y yum install glibc-common -y yum install libstdc++ -y yum install libXtst -y yum install sysstat -y yum install glibc -y yum install glibc-devel -y yum install glibc-devel.i686 -y as root mkdir -p /u01/app/oracle/product/emgc13c mkdir -p /u01/app/oracle/product/agent13c mkdir -p /u10/shiphome/em13 mkdir -p /u10/scratch chown -R oracle:dba /u01 chown -R oracle:dba /u10 as vi /etc/oraInst.loc inventory_loc=/u01/app/oracle/product/oraInventory inst_group=oinstall chmod 755 /etc/oraInst.loc INSTALL THE SOFTWARE as oracle cd /u10/shiphome/em13 download the software http://www.oracle.com/technetwork/oem/grid-control/downloads/oem-linux64-2823270.html as root vi /etc/oracle-release change 6.8 to 6.5 remember to change back after installation as root sysctl -w net.ipv4.ip_local_port_range="11000 65000" check sysctl net.ipv4.ip_local_port_range use vncviewer to connect and run the installer /u10/shiphome/em13/em13100_linux64.bin -J-Djava.io.tmpdir=/u10/scratch/ -invPtrLoc /etc/oraInst.loc Install Software Only /u01/app/oracle/product/emgc13c/sysman/install/ConfigureGC.sh Prepare the DB Host as root
yum repolist yum update yum search preinstall yum install oracle-database-server-12cR2-preinstall visudo ## Allow root to run any commands anywhere oracle ALL=(ALL) ALL ## Same thing without a password %dba ALL=(ALL) NOPASSWD: ALL vi /etc/hosts ## Make sure FQHN and Alias are in here, for both MT and DB 192.168.1.113 aemidbs04.localdomain aemidbs04 192.168.1.114 aemimts01.localdomain aemimts01 # OL6 and OL7, most packages will already be there yum install binutils -y yum install compat-libcap1 -y yum install compat-libstdc++-33 -y yum install compat-libstdc++-33.i686 -y yum install gcc -y yum install gcc-c++ -y yum install glibc -y yum install glibc.i686 -y yum install glibc-devel -y yum install glibc-devel.i686 -y yum install ksh -y yum install libgcc -y yum install libgcc.i686 -y yum install libstdc++ -y yum install libstdc++.i686 -y yum install libstdc++-devel -y yum install libstdc++-devel.i686 -y yum install libaio -y yum install libaio.i686 -y yum install libaio-devel -y yum install libaio-devel.i686 -y yum install libXext -y yum install libXext.i686 -y yum install libXtst -y yum install libXtst.i686 -y yum install libX11 -y yum install libX11.i686 -y yum install libXau -y yum install libXau.i686 -y yum install libxcb -y yum install libxcb.i686 -y yum install libXi -y yum install libXi.i686 -y yum install make -y yum install sysstat -y yum install unixODBC -y yum install unixODBC-devel -y mkdir -p /u01/app/oracle/product/12cDB mkdir -p /u05/oradata mkdir -p /u07/archive mkdir -p /u10/shiphome chown -R oracle:dba /u01 chown -R oracle:dba /u05 chown -R oracle:dba /u07 chown -R oracle:dba /u10 # Set Password for Oracle passwd oracle # Update 90-nproc.conf ... ref. MOS Note vi /etc/security/limits.d/90-nproc.conf # Change this * soft nproc 1024 # To this * - nproc 16384 # Change selinux vi /etc/selinux/config SELINUX=permissive # Run Setenforce setenforce Permissive # Turn off Firewall service iptables stop chkconfig iptables off as root xhost + <hostname.localdomain> vi /etc/oraInst.loc inventory_loc=/u01/app/oracle/product/oraInventory inst_group=oinstall as oracle download the oracle database software http://www.oracle.com/technetwork/database/enterprise-edition/downloads/index.html to this location /u10/shiphome as oracle download the oracle database template for 13c http://www.oracle.com/technetwork/oem/enterprise-manager/downloads/db-templates-2767916.html to this location /u10/shiphome as oracle cd /u10/shiphome cksum * unzip linuxamd64_12102_database_1of2.zip unzip linuxamd64_12102_database_2of2.zip as oracle DISPLAY=<hostname.localdomain>:0.0; export DISPLAY ./runInstaller |
AuthorThere are some that call me Tim. Categories
All
Archives |