Thursday, March 26, 2015

history command with time

How do I display shell command history with date and time under UNIX or Linux operating systems? http://www.cyberciti.biz/faq/unix-linux-bash-history-display-date-time/ http://www.tecmint.com/history-command-examples/ If the HISTTIMEFORMAT is set, the time stamp information associated with each history entry is written to the history file, marked with the history comment character. Defining the environment variable as follows: $ HISTTIMEFORMAT="%d/%m/%y %T " OR $ echo 'export HISTTIMEFORMAT="%d/%m/%y %T "' >> ~/.bash_profile Where, %d - Day %m - Month %y - Year %T - Time To see history type $ history Sample outputs: .... .. 986 11/03/10 04:31:36 memcached-tool 10.10.28.22:11211 stats 987 11/03/10 04:31:36 w 988 11/03/10 04:31:37 iostat 989 11/03/10 04:31:37 top 990 11/03/10 04:31:37 at 991 11/03/10 04:31:38 atop 992 11/03/10 04:31:40 collectl 993 11/03/10 04:31:41 grep CPU /proc/cpuinfo 994 11/03/10 04:31:45 vmstat 3 100 995 11/03/10 04:31:55 sar -W -f /var/log/sa/sa12 .... .. References: For more info type the following commands: man bash help history man 3 strftime

Monday, March 16, 2015

How do I specify external redundancy in an Oracle ASM create diskgroup command? What does external redundancy do?.

Question: How do I specify external redundancy in an Oracle ASM create diskgroup command? What does external redundancy do?. Answer: There are three types of Oracle ASM disk groups: Normal redundancy High redundancy External redundancy With normal and high redundancy, the disk group template specifies the ASM redundancy attributes for all files in the disk group. Configuration of ASM high redundancy provides a greater degree of protection. With external redundancy, ASM does not provide any redundancy for the disk group. In external redundancy, the underlying disks in the disk group must provide redundancy (for example, using a RAID storage array.) The redundancy level or type is specified at the time of creating the disk groups. It is possible to specify The "external redundancy" clause when creating n ASM diskgroup: CREATE DISKGROUP DATA EXTERNAL REDUNDANCY DISK '/dev/rdsk/*'; In the above examples, the EXTERNAL REDUNDANCY clause was used. This means that ASM will provide no extra redundancy support and, therefore, cannot help in the case of disk failure. This is usually an option only when using RAID 1 (mirroring). However, redundancy can be set up within ASM using failure groups. Failure groups allow a DBA to specify two pools of disks that can hold copies of each other's data. ASM allows NORMAL redundancy, in which a diskgroup is composed of two failgroups, or HIGH redundancy, in which a diskgroup is composed of three failgroups. When files are written to the ASM diskgroup under NORMAL redundancy, the files will be written to both failgroups in a round-robin fashion. Files are read from the primary failgroup. For example: CREATE DISKGROUP DATA NORMAL REDUNDANCY FAILGROUP failgrp1 DISK '/dev/sdb1', '/dev/sdb2' FAILGROUP failgrp2 DISK '/dev/sdc1', '/dev/sdc2'; In this example, a file will first go to failgrp1 and be copied to failgrp2. The next file will be written to failgrp2 and copied to failgrp1.

An Overview of Oracle Hyperion Planning

http://www.codecsystems.co.uk/An_Overview_of_Oracle_Hyperion_Planning/Default.793.html Oracle has succeeded in creating a centralised, Excel and Web-driven planning, budgeting and forecasting framework (in the form of Oracle Hyperion Planning) to help connect operational assumptions to financial outcomes. Planning and budgeting is a resource and time intensive process in most organisations dominated by a multitude of spreadsheets that are exchanged between cost centre managers, line of business finance managers and corporate finance personnel. Oracle Hyperion Planning streamlines the planning process by aligning plans along common dimensions. Hyperion Planning sits in an application server between the Essbase database and the client tools that work with it; integrating financial and operational planning processes; leading to improved business predictability. It does so by leveraging Essbase's multidimensional data model as well as standard relational database management platforms. The Essbase portion of the application gives Hyperion Planning the calculation power to handle predictive planning, allocations and complicated revenue recognition planning. The relational source allows planning to collect textual information critical to a coordinated understanding of the budget. KEY FEATURES OF HYPERION PLANNING: Alignment of the Organisation - by combining financial and operational planning in one system. Hyperion Planning utilises Oracle Hyperion Essbase as its central data store, maximising the user experience where information is available instantly and in real-time supporting both bottom-up and top-down planning processes. Multi-dimensional / Multi-user Planning - with a powerful business rules engine. Robust data integration with ERP, CRM and data warehousing systems enabling bi-directional information exchange. Easy to Use Web Interface - appealing to a wider user community. Flexible workflow and plan management capabilities - using thin client technology (allowing ‘anytime, anywhere’ planning) and flexible data entry, users can analyse their plans in a safe and secure environment with frequent real-time updates using any standard web browser. Comprehensive Microsoft Office Integration - Hyperion Planning has an add-in with Microsoft Office (Smartview) which allows users to forecast or budget in Microsoft Excel, an environment comfortable to most finance users, where data is automatically refreshed in real time. Seamless Creation of Reports - companies can directly integrate data from Hyperion Planning into Microsoft PowerPoint and Microsoft Word allowing the creation of highly customised reports with accurate information. Full set of Administrative Tools for Application Management – allows users to track and communicate the progress of each planning unit and budget; create, analyse or validate plans; and change plans in real-time, all from a central data platform. Enterprise Security Interoperability - Oracle Hyperion Planning interoperates with existing security mechanisms such as NTLM, MSAD and LDAP ensuring maintenance and security consistency. ADDITIONAL ADD INS: Hyperion Planning is often utilised with Hyperion Financial Reports and Web Analysis to enhance the analytic value inherent in its underlying use of Essbase. Oracle Hyperion Planning has two additional add-in modules; Workforce Planning and CapEx Planning. Companies today are faced with a rapidly dynamic business environment where costs fluctuate and demand changes. A key requirement to stay ahead of the competition is to understand this volatility and forecast financial and operational performance accurately. With Oracle Hyperion Planning, a company can forecast project performances (in terms of financial outcomes) based on historic information, and if needed, the creation of alternative scenarios. A company can centrally manage and collaborate on every step of the planning process by communicating plans, calculations or targets to all decision-makers via the Internet, intranet and a standard web browser; all of which can be leveraged with Microsoft Office to view all your necessary financial data. This Business Intelligence (BI) and Business Performance Management (BPM) Tool provides an in-depth look at business operations and its related impact on financials; predicting and forecasting the success of future prospects and in turn enabling better decision making and business success. According to Dwight D. Eisenhower ‘Plans are nothing; planning is everything’ and with Oracle’s Hyperion Planning application; all your planning, budgeting and forecasting needs are executed effectively and efficiently. For further information on Oracle's Hyperion Planning, please call 01 603 4300 or submit an enquiry through our Online Enquiry Form or through our Request a Call Back Form. This article was written by Brian Somers : Consulting Manager (Codec-dss) specialising in Infor PM, Hyperion, Essbase, Planning, Hyperion Planning, Microsoft Analysis Services, Infor MPC, Infor PM, Comshare, ASO, BSO, Business Objects, ODI, OBIEE, SAP BPC, Outlooksoft,OLAP, Business Intelligence, CPM\BPM, Essbase,Project Management, Financial Consolidation, Data WareHousing\Data Mart technologies.

Oracle 11g Grid Infrastructure Installation

https://www.youtube.com/watch?v=JDWi8CepPJI

Voting Disk and OCR

https://community.oracle.com/thread/2554552 ID 452924.1 Voting Disk The voting disk is a shared partition that Oracle Clusterware uses to verify cluster node membership and status. Oracle Clusterware uses the voting disk to determine which instances are members of a cluster by way of a health check and arbitrates cluster ownership among the instances in case of network failures. The primary function of the voting disk is to manage node membership and prevent what is known as Split Brain Syndrome in which two or more instances attempt to control the RAC database. This can occur in cases where there is a break in communication between nodes through the interconnect. The voting disk must reside on a shared disk(s) that is accessible by all of the nodes in the cluster. For high availability, Oracle recommends that you have multiple voting disks. Oracle Clusterware can be configured to maintain multiple voting disks (multiplexing) but you must have an odd number of voting disks, such as three, five, and so on. Oracle Clusterware supports a maximum of 32 voting disks. If you define a single voting disk, then you should use external mirroring to provide redundancy. A node must be able to access more than half of the voting disks at any time. For example, if you have five voting disks configured, then a node must be able to access at least three of the voting disks at any time. If a node cannot access the minimum required number of voting disks it is evicted, or removed, from the cluster. After the cause of the failure has been corrected and access to the voting disks has been restored, you can instruct Oracle Clusterware to recover the failed node and restore it to the cluster. Oracle Cluster Registry (OCR) Maintains cluster configuration information as well as configuration information about any cluster database within the cluster. OCR is the repository of configuration information for the cluster that manages information about like the cluster node list and instance-to-node mapping information. This configuration information is used by many of the processes that make up the CRS as well as other cluster-aware applications which use this repository to share information amoung them. Some of the main components included in the OCR are: Node membership information Database instance, node, and other mapping information ASM (if configured) Application resource profiles such as VIP addresses, services, etc. Service characteristics Information about processes that Oracle Clusterware controls Information about any third-party applications controlled by CRS (10g R2 and later) The OCR stores configuration information in a series of key-value pairs within a directory tree structure. To view the contents of the OCR in a human-readable format, run the ocrdump command. This will dump the contents of the OCR into an ASCII text file in the current directory named OCRDUMPFILE. The OCR must reside on a shared disk(s) that is accessible by all of the nodes in the cluster. Oracle Clusterware 10g Release 2 allows you to multiplex the OCR and Oracle recommends that you use this feature to ensure cluster high availability. Oracle Clusterware allows for a maximum of two OCR locations; one is the primary and the second is an OCR mirror. If you define a single OCR, then you should use external mirroring to provide redundancy. You can replace a failed OCR online, and you can update the OCR through supported APIs such as Enterprise Manager, the Server Control Utility (SRVCTL), or the Database Configuration Assistant (DBCA). This article provides a detailed look at how to administer the two critical Oracle Clusterware components — the voting disk and the Oracle Cluster Registry (OCR)

Planning the storage for Oracle RAC

https://sort.symantec.com/public/documents/sf/5.1/solaris/html/sfrac_install/ch02s03s02s02.htm http://www.idevelopment.info/data/Oracle/DBA_tips/Oracle10gRAC/CLUSTER_65.shtml?bcsi_scan_1b82f0d05303f1f8=0&bcsi_scan_filename=CLUSTER_65.shtml http://thegeekdiary.com/solaris-zfs-command-line-reference-cheat-sheet/ Solaris ZFS command line reference (Cheat sheet) Pool Related Commands # zpool create datapool c0t0d0 Create a basic pool named datapool # zpool create -f datapool c0t0d0 Force the creation of a pool # zpool create -m /data datapool c0t0d0 Create a pool with a different mount point than the default. # zpool create datapool raidz c3t0d0 c3t1d0 c3t2d0 Create RAID-Z vdev pool # zpool add datapool raidz c4t0d0 c4t1d0 c4t2d0 Add RAID-Z vdev to pool datapool # zpool create datapool raidz1 c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 c0t5d0 Create RAID-Z1 pool # zpool create datapool raidz2 c0t0d0 c0t1d0 c0t2d0 c0t3d0 c0t4d0 c0t5d0 Create RAID-Z2 pool # zpool create datapool mirror c0t0d0 c0t5d0 Mirror c0t0d0 to c0t5d0 # zpool create datapool mirror c0t0d0 c0t5d0 mirror c0t2d0 c0t4d0 disk c0t0d0 is mirrored with c0t5d0 and disk c0t2d0 is mirrored withc0t4d0 # zpool add datapool mirror c3t0d0 c3t1d0 Add new mirrored vdev to datapool # zpool add datapool spare c1t3d0 Add spare device c1t3d0 to the datapool ## zpool create -n geekpool c1t3d0 Do a dry run on pool creation Show Pool Information # zpool status -x Show pool status # zpool status -v datapool Show individual pool status in verbose mode # zpool list Show all the pools # zpool list -o name,size Show particular properties of all the pools (here, name and size) # zpool list -Ho name Show all pools without headers and columns File-system/Volume related commands # zfs create datapool/fs1 Create file-system fs1 under datapool # zfs create -V 1gb datapool/vol01 Create 1 GB volume (Block device) in datapool # zfs destroy -r datapool destroy datapool and all datasets under it. # zfs destroy -fr datapool/data destroy file-system or volume (data) and all related snapshots Set ZFS file system properties # zfs set quota=1G datapool/fs1 Set quota of 1 GB on filesystem fs1 # zfs set reservation=1G datapool/fs1 Set Reservation of 1 GB on filesystem fs1 # zfs set mountpoint=legacy datapool/fs1 Disable ZFS auto mounting and enable mounting through /etc/vfstab. # zfs set sharenfs=on datapool/fs1 Share fs1 as NFS # zfs set compression=on datapool/fs1 Enable compression on fs1 File-system/Volume related commands # zfs create datapool/fs1 Create file-system fs1 under datapool # zfs create -V 1gb datapool/vol01 Create 1 GB volume (Block device) in datapool # zfs destroy -r datapool destroy datapool and all datasets under it. # zfs destroy -fr datapool/data destroy file-system or volume (data) and all related snapshots Show file system info # zfs list List all ZFS file system # zfs get all datapool” List all properties of a ZFS file system Mount/Umount Related Commands # zfs set mountpoint=/data datapool/fs1 Set the mount-point of file system fs1 to /data # zfs mount datapool/fs1 Mount fs1 file system # zfs umount datapool/fs1 Umount ZFS file system fs1 # zfs mount -a Mount all ZFS file systems # zfs umount -a Umount all ZFS file systems ZFS I/O performance # zpool iostat 2 Display ZFS I/O Statistics every 2 seconds # zpool iostat -v 2 Display detailed ZFS I/O statistics every 2 seconds ZFS maintenance commands # zpool scrub datapool Run scrub on all file systems under data pool # zpool offline -t datapool c0t0d0 Temporarily offline a disk (until next reboot) # zpool online Online a disk to clear error count # zpool clear Clear error count without a need to the disk Import/Export Commands # zpool import List pools available for import # zpool import -a Imports all pools found in the search directories # zpool import -d To search for pools with block devices not located in /dev/dsk # zpool import -d /zfs datapool Search for a pool with block devices created in /zfs # zpool import oldpool newpool Import a pool originally named oldpool under new name newpool # zpool import 3987837483 Import pool using pool ID # zpool export datapool Deport a ZFS pool named mypool # zpool export -f datapool Force the unmount and deport of a ZFS pool Snapshot Commands Combine the send and receive operation # zfs snapshot datapool/fs1@12jan2014 Create a snapshot named 12jan2014 of the fs1 filesystem # zfs list -t snapshot List snapshots # zfs rollback -r datapool/fs1@10jan2014 Roll back to 10jan2014 (recursively destroy intermediate snapshots) # zfs rollback -rf datapool/fs1@10jan2014 Roll back must and force unmount and remount # zfs destroy datapool/fs1@10jan2014 Destroy snapshot created earlier # zfs send datapool/fs1@oct2013 > /geekpool/fs1/oct2013.bak Take a backup of ZFS snapshot locally # zfs receive anotherpool/fs1 < /geekpool/fs1/oct2013.bak Restore from the snapshot backup backup taken # zfs send datapool/fs1@oct2013 | zfs receive anotherpool/fs1 # zfs send datapool/fs1@oct2013 | ssh node02 “zfs receive testpool/testfs” Send the snapshot to a remote system node02 Clone Commands # zfs clone datapool/fs1@10jan2014 /clones/fs1 Clone an existing snapshot # zfs destroy datapool/fs1@10jan2014 Destroy clone Filed Under: ZFS

Sunday, March 15, 2015

ORACLE SECURE BACKUP

http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/10g/r2/prod/ha/ob/ob_otn.htm http://www.oracle.com/webfolder/technetwork/tutorials/obe/db/11g/r1/prod/ha/osb10_2install/osb1.htm http://web.stanford.edu/dept/itss/docs/oracle/10gR2/backup.102/b14234/obadm_arc.htm What Is Oracle Secure Backup? Oracle Secure Backup supplies reliable data protection through file system backup to tape. The Oracle Secure Backup SBT interface enables you to use Recovery Manager (RMAN) to back up Oracle databases. All major tape drives and tape libraries in SAN, Gigabit Ethernet, and SCSI environments are supported. Oracle Secure Backup Features Oracle Secure Backup enables you to do the following: Centrally manage tape backup and restore operations of distributed, mixed-platform environments (see Oracle Secure Backup Installation Guide for supported machine architectures). You can access local and remote file systems and devices from any location in a network without using NFS or CIFS. Back up to and restore data from Oracle Cluster File System (OCFS) on Linux and Windows. Use wildcards and exclusion lists to specify what you want to back up. Perform multilevel incremental backups. Duplex database backups so that the same data stream goes to multiple devices. You can specify different media families or devices for each copy of the data. Create backups that span multiple volumes. Optimize tape resources with automatic drive sharing. Restore data rapidly. Oracle Secure Backup uses direct-to-block positioning and direct access restore to avoid unnecessarily reading tape blocks to locate files. Oracle Secure Backup maintains a record of the tape position of all backup data in its catalog for rapid retrieval. Maintain security and limit the users who are authorized to perform data management operations. By default, SSL is used for authentication and communication between hosts in the administrative domain. Oracle Secure Backup and Recovery Manager Recovery Manager (RMAN) is an Oracle Database-specific backup and recovery utility. RMAN is a built-in part of Oracle Database and backs up, restores, and recovers database files regardless of the type of disk storage used for these files. RMAN knows and applies the complex rules that must be followed to recover Oracle databases. If your database backup strategy needs storage resources other than local disk, then you must use RMAN in conjunction with a general-purpose network backup tool such as Oracle Secure Backup. Oracle Secure Backup can back up all types of files on the file system. Although Oracle Secure Backup has no specialized knowledge of database backup and recovery algorithms, it can serve as a media management layer for RMAN through the SBT interface. In this capacity, Oracle Secure Backup provides the same services for RMAN as other supported third-party SBT libraries. Oracle Secure Backup is better integrated with Oracle Enterprise Manager, however, than other media managers.