Monday, August 31, 2020

All about oracle-database-preinstall-19c (Oracle Linux 8, 7)

Installing oracle-database-preinstall-19c RPM

This document outlines the process for downloading and installing the oracle-database-preinstall-19c RPM package, and explains its effects on your Oracle Linux system.

1. How to Download

The oracle-database-preinstall-19c RPM is available directly from Oracle's YUM repositories. Choose the correct link based on your Oracle Linux version:

  • For Oracle Linux 8 (OEL8): https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm

  • For Oracle Linux 7 (OEL7 - Latest): https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-2.el7.x86_64.rpm

  • For Oracle Linux 7 (OEL7 - Older Version): https://yum.oracle.com/repo/OracleLinux/OL7/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el7.x86_64.rpm

To download the RPM: You can use wget or curl directly from your Linux server. For example, for OEL8:

Bash
wget https://yum.oracle.com/repo/OracleLinux/OL8/baseos/latest/x86_64/getPackage/oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm

Note: It's generally recommended to use yum install oracle-database-preinstall-19c (or dnf install on OL8) as it will automatically download the correct version and handle dependencies.

2. How to Install

Once downloaded, you can install the RPM package using the yum (or dnf on OL8) command as root.

Command:

Bash
sudo yum install oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm
# Replace the RPM filename with the one you downloaded for your specific OS version.

Using yum directly (recommended for dependency resolution):

Bash
sudo yum install oracle-database-preinstall-19c
# Or on OL8:
sudo dnf install oracle-database-preinstall-19c

To verify installation:

Bash
rpm -qa | grep oracle-database-preinstall-19c

(Note: The command rpm -qa oracle-database-preinstall-19c-1.0-1.el8.x86_64.rpm you provided would only work if the full filename matches exactly and is not the standard way to query all installed packages containing a string.)

3. What it Will Do

The oracle-database-preinstall-19c RPM automates many of the prerequisite configurations required for Oracle Database 19c installation:

  • Create an oracle user: A dedicated operating system user named oracle is created for database administration.
  • Create groups: Essential OS groups such as oinstall, dba, backupdba, dgdba, kmdba, and racdba are created.
  • Update kernel parameters: System kernel parameters (e.g., shmmax, shmall, semaphores, file-max, ip_local_port_range) are adjusted to recommended values for Oracle Database.
  • Install dependencies: Installs various dependent packages required by Oracle Database.

4. What Happens if Existing User/Group Exists?

The preinstall RPM is designed to handle existing configurations gracefully:

  • Existing oracle user: If an oracle user already exists, the RPM will ignore its creation. It will not modify the existing user's home directory, UID, or primary group unless specifically necessary for group membership.
  • Existing groups: If any of the required groups (e.g., oinstall, dba) already exist, the RPM will add the oracle user to these groups if they are not already members. It will not recreate or modify the GIDs of existing groups. New required groups that don't exist will be created.
  • Kernel parameters: The RPM will replace existing kernel parameters (typically found in /etc/sysctl.conf or a file under /etc/sysctl.d/) with the recommended values for Oracle Database 19c. It's crucial to review these changes if you have custom kernel parameter settings.

Thursday, August 27, 2020

Send email with multiple attachment using powershell

# This script will take an input value from the user and send an email with attachments
# if the attachment filenames match names derived from the input value.

# Load SMO extension (This line might be vestigial if not interacting with SQL Server Management Objects,
# but it's kept as per the original request. It's typically used for SQL Server administration tasks.)
[void][Reflection.Assembly]::LoadWithPartialName('Microsoft.VisualBasic')

# --- Get User Input ---
# Define the title for the input box
$title = 'Email My Scripts'
# Define the message prompt for the user
$msg = 'Enter your INPUT :'
# Display an input box to the user and store their response
$INPUTVALUEvers = [Microsoft.VisualBasic.Interaction]::InputBox($msg, $title)
# Replace any backslashes in the input value with underscores for use in filenames
$INPUTVALUE = $INPUTVALUEvers -replace '\\','_'

# --- Define Email Variables ---
# Sender email address
$fromaddress = "xyz@gmail.com"
# Recipient email address
$toaddress = "xyz@gmail.com"
# Email subject line, incorporating the user's original input value
$Subject = "My report $INPUTVALUEvers"
# Email body content
$body = "My reports"
# SMTP server address for sending emails
$smtpserver = "my.com.au"

# Display the processed input value (with backslashes replaced) to the console
write-host $INPUTVALUE

# --- Prepare Attachments ---
# Define the path where the attachment files are located
$attachmentPath = "\\My_path\My\"

# Construct the filenames for the attachments based on the processed input value
$attachment1 = "MyReport_$INPUTVALUE.html"
$attachment2 = "Mylogon_$INPUTVALUE.txt"

# Get the full path to the attachment files.
# Get-ChildItem is used to find the files in the specified path that match the include patterns.
# The result is cast to an array to ensure it's treated as a collection, even if only one file is found.
[array]$attachments = Get-ChildItem -Path $attachmentPath -Include $attachment1, $attachment2

# --- Send Email ---
# Create a hashtable of parameters for the Send-MailMessage cmdlet.
# This makes the command more readable and manageable.
$Msg = @{
    To = $toaddress
    From = $fromaddress
    Body = $body
    Subject = $Subject
    SmtpServer = $smtpserver
    BodyAsHtml = $True # Indicates that the email body contains HTML content
    Attachments = $attachments.FullName # Pass the full paths of the found attachments
}

# Send the email using the defined parameters.
# The '@Msg' syntax is called splatting, which passes the hashtable keys as parameters to the cmdlet.
Send-MailMessage @Msg

Monday, August 24, 2020

Cloud backup - oracle - Dell - DDVE

Dell Data Protection Solutions for Database Workloads

This document provides a brief overview of key Dell Data Protection components relevant to database workloads and data management.

Components Overview

  • Dell Data Domain Virtual Edition (DDVE):

    • Primarily designed for Database (DB) workloads. It provides software-defined data protection with deduplication.

  • Dell Cloud Snapshot Manager (CSM):

    • Focuses on Application (App) workloads. CSM helps manage snapshots for applications, particularly in cloud environments.

  • Data Domain Management Center (DDMC):

    • Used to manage multiple DDVE instances from a centralized console, simplifying administration of a Data Domain estate.

  • PowerProtect Management Center (PPDM):

    • A comprehensive solution offering capabilities for data protection, backup scheduling, deduplication, operational agility, self-service, and IT governance. PPDM provides a unified platform for managing enterprise data protection.

Key Considerations for Database Backups

  • app-optimized-compression: This feature is associated with oracle1 (likely referring to a specific Oracle integration or policy) to optimize compression for database backups.

  • "File per set" configuration: For optimal performance, "File per set" should not be specified during database backup configurations, as it can introduce performance bottlenecks.