8/30/2017

Oracle database using PFILE SPFILE

Use of PFILE or SPFILE

When an Oracle instance is started, its characteristics are set by reading some initialization parameters. These parameters are specified either through PFILE or SPFILE.
When an Oracle instance is being started, it reads either PFILE or SPFILE to set its characteristics.

What is PFILE?

A PFILE is a static, client side text file. This file normally resides on the server. However in case,
you would like to start Oracle from a remote machine, you will need a local copy of the PFILE no that machine.

This file can be edited with a standard text editor like notepad or vi editor. This file will be
commonly referred as INIT.ORA file.

What is SPFILE?

SPFILE (Server parameter file) is a persistent server side binary file. SPFILE should only be
modified through “ALTER SYSTEM SET” command . Editing an SPFILE directly will corrupt the file
and the start up of the database or instance will not be possible.

As SPFILe is a server side binary file,  local copy of the PFILE is not required to start oracle from
a remote machine.


Advantages of SPFILE compared to PFILE
  • A SPFILE doesnot need a local copy of  the pfile to start  oracle from a remote machine. Thus eliminates configuration problems.
  • SPFILE  is a binary file and modications to that can only be done through ALTER SYSTEM
  • SET command.
  • As SPFILE is maintained by the server, human errors can be eliminated as the parameters are checked before modification in SPFILE
  • It is easy  to locate SPFILE as it is stored in a central location
  • Changes to the parameters in SPFILE will take immediate effect without restart of the instance i.e Dynamic change of parameters is possible
  • SPFILE can be backed up by RMAN
Difference between PFILE and SPFILE in Oracle :



PFILE
SPFILE
1 Static, client side text file Persistent server side binary file
2 Local copy of pfile required to start database from a remote machine local copy is not required
3 Can be edited through notepad or vi editor Editing directly will corrupt the file. It should be modified only through ALTER SYSTEM SET command
4 Is available in earlier versions of Oracle 9i Available from Oracle 9i and above
5 Prone to human errors while modification Eliminates human errors as parameters are checked before modification
6 Cannot be backed up by RMAN Can be backed up by RMAN
7 Parameters in pfile cannot be changed dynamically and system needs to be bounced for the new changes to take effect Dynamic change of some parameters is possible. Need not restart server for the changes to take effect


Query to check if  the database is running with PFILE or SPFILE
Execute the following command in SQL command line find out if database is started with a PFILE or SPFILE.


SQL > SELECT DECODE(value, NULL, ‘PFILE’, ‘SPFILE’) “Init File” FROM sys.v_$parameter WHERE name = ‘spfile’;

8/29/2017

Upgrading SAP Host Agent Without Extracting the SAPHOSTAGENT Archive

You can upgrade the SAP Host Agent by running saphostexec -upgrade -archive or hostexecstart -upgrade from the hostctrl directory of the existing SAP Host Agent installation with specifying the location of the downloaded SAPHOSTAGENT<SP-version>.SAR archive.

Prerequisites

You have downloaded the required target release version of the SAPHOSTAGENT<SP-version>.SAR archive as described in Downloading the SAPHOSTAGENT Archive.

Procedure

  1. Log on as a user with the required authorization:
    WindowsAs a member of the local Administrators group
    UNIXAs a user with root authorization or as a member of the sapsys group, for example <sapsid>adm
    IBM iAs a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.
  2. IBM i only: Enter the command CALL PGM(QP2TERM) to start a PASE interactive terminal session.
  3. Copy the downloaded SAPHOSTAGENT<SP-version>.SAR archive to a temporary directory, for example:
    Windowsc:\temp\hostagent
    UNIX ,
    IBM i
    /tmp/hostagent
  4. Perform the upgrade by running the following command:
    Windows
    %ProgramFiles%\SAP\hostctrl\saphostexec -upgrade -archive <path to downloaded SAPHOSTAGENT<SP-version>.SAR>
    Recommendation
    Use the additional parameter -verify to verify the content of the installation package against the SAP digital signature:
    UNIX
    • If you are logged on as a user with root authorization, the command is as follows:
      /usr/sap/hostctrl/saphostexec -upgrade -archive <path to downloaded SAPHOSTAGENT<SP-version>.SAR>
    • If you are logged on as a member of the sapsys group, for example <sapsid>adm, the command is as follows: /usr/sap/hostctrl/exe/hostexecstart -upgrade <path to downloaded SAPHOSTAGENT<SP-version>.SAR>
    Recommendation
    Use the additional parameter -verify to verify the content of the installation package against the SAP digital signature:
    IBM i
    /usr/sap/hostctrl/exe/saphostexec -upgrade -archive <path to downloaded SAPHOSTAGENT<SP-version>.SAR>
    Recommendation
    Use the additional parameter -verify to verify the content of the installation package against the SAP digital signature:
    The progress of the upgrade is displayed on the command line.
  5. After the upgrade has finished successfully, you can check the version of the upgraded host agent by executing the following command from the directory of the SAP Host Agent executables:
    Windows%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe -version
    UNIX
    • If you are logged on as a user with root authorization, the command is as follows: /usr/sap/hostctrl/exe/saphostexec -version
    • If you are logged on as a member of the sapsys group, for example <sapsid>adm, the command is as follows: /usr/sap/hostctrl/exe/hostexecstart -version
    IBM i/usr/sap/hostctrl/exe/saphostexec -version
  6. IBM i only: Leave the PASE interactive terminal session using function key F3

Next Steps

Post-requisites:
You can now delete the temporary directory with all its content.

Downloading the SAPHOSTAGENT Archive

 The SAPHOSTAGENT<SP-version>.SAR archive contains all of the required elements for centrally monitoring any host. It is available for all operating system platforms supported by SAP.

Context

It is automatically installed during the installation of SAP systems or instances with SAP kernel 7.20 or higher.

Procedure

  1. Go to the SAP Software Distribution Center at http://support.sap.com/swdcInformation published on SAP site.
  2. Log on with your SAP Support Portal ID.
  3. In the navigation bar, choose Start of the navigation path Support Packages and Patches Next navigation step Browse Download Catalog Next navigation step SAP Technology Components Next navigation step SAP HOST AGENT Next navigation step SAP HOST AGENT 7.21 Next navigation step <operating system> End of the navigation path.
  4. Select the appropriate SAPHOSTAGENT<SP-version>.SAR archive from the Download tab.
    Recommendation
    Always select the highest SP version of the SAPHOSTAGENT<SP-version>.SAR archive, even if you want to monitor a component of SAP NetWeaver with a lower release.
  5. Make sure that the SAPCAR tool is available on the host where you want to install SAP Host Agent.
    You need the SAPCAR tool in order to be able to decompress the SAPHOSTAGENT<SP-version>.SAR archive. For more information about SAPCAR and how to get it, see SAP Note 212876 

    Related Information

SAP Host Agent

SAP Host Agent is an agent that can accomplish several life-cycle management tasks, such as operating system monitoring, database monitoring, system instance control and provisioning.

Validity of this Documentation
This documentation is valid for SAP Host Agent 7.21 Patch Level (PL) 004 and higher. SAP Host Agent 7.20 has been deprecated. For more information, see SAP Note 2130510 Information published on SAP site.
For information about how to check the version of an existing SAP Host Agent installation, see SAP Host Agent Reference - Command Line Options of the saphostexec Executable.
See SAP Note 1907566 Information published on SAP site about how to update older versions of this documentation within your local SAP Library installations.
SAP Host Agent Usage
SAP Host Agent has installed automatically during the installation of new SAP system instances with SAP kernel 7.20 or higher. SAP Host Agent has upgraded automatically as part of the SAP system instance when you patch or upgrade the SAP kernel. However, you can also install and upgrade SAP Host Agent independently from an SAP system instance.
Recommendation
It is strongly recommended that you regularly upgrade SAP Host Agent to its latest version. See also SAP Note 2219592 .
Features
SAP Host Agent provides you with the following features:
  • SAP instance discovery and inventory
  • SAP instance control
  • Database monitoring and management
  • System or instance provisioning:
    • Hosting the infrastructure of SAP Landscape Virtualization Management (LVM), formerly known as SAP NetWeaver Adaptive Computing Controller (ACC)
    • Hosting software lifecycle (SL) tools interfaces
  • Operating system monitoring:
    • Using saposcol
    • Using Common Information Model (CIM) based infrastructures
  • IBM i-specific features:
    • Dynamically adopted authorization for SAP kernel 7.20 and higher
    • SAP ILE daemon (SAPILED)
    • SAP Database Performance Collector for IBM i

      Related Information

Upgrading SAP Host Agent from Extracted SAPHOSTAGENT Archive

You can upgrade the SAP Host Agent by running saphostexec -upgrade from the directory to which you extracted the downloaded SAPHOSTAGENT<SP-version>.SAR archive.

Prerequisites

You have downloaded the required target release version of the SAPHOSTAGENT<SP-version>.SAR archive as described in Downloading the SAPHOSTAGENT Archive.

Procedure

  1. Log on as a user with the required authorization:
    WindowsAs a member of the local Administrators group
    UNIXAs a user with root authorization
    IBM iAs a user profile with special authorities *SECADM and *ALLOBJ, for example as user profile QSECOFR.
  2. IBM i only: Enter the command CALL PGM(QP2TERM) to start a PASE interactive terminal session.
  3. Copy the downloaded SAPHOSTAGENT<SP-version>.SAR archive to a temporary directory, for example:
    Windowsc:\temp\hostagent
    UNIX,
    IBM i
    /tmp/hostagent
  4. Extract the SAPHOSTAGENT<SP-version>.SAR archive using SAPCAR.
    Take SAP Note 212876 Information published on SAP site into account when doing so. Use the following command for extraction, and execute them in the directory of the archive:
    Windows<path to SAPCAR>\sapcar.exe -xvf <path to temporary directory>\SAPHOSTAGENT<SP-version>.SAR -manifest SIGNATURE.SMF
    UNIX,
    IBM i
    /<path to SAPCAR>/sapcar -xvf <path to temporary directory>/SAPHOSTAGENT<SP-version>.SAR -manifest SIGNATURE.SMF
    Among others, the archive contains the saphostexec program.
  5. Perform the upgrade by running the following command:
    Windows
    <path to temporary directory>\saphostexec.exe -upgrade
    Recommendation
    You can use the additional parameter -verify to verify the content of the installation package against the SAP digital signature
    UNIX,
    IBM i
    /<path to temporary directory>/saphostexec -upgrade
    Recommendation
    You can use the additional parameter -verify to verify the content of the installation package against the SAP digital signature
    The progress of the upgrade is displayed on the command line.
  6. After the upgrade has finished successfully, you can check the version of the upgraded host agent by executing the following command from the directory of the SAP Host Agent executables:
    Windows%ProgramFiles%\SAP\hostctrl\exe\saphostexec.exe -version
    UNIX
    • If you are logged on as a user with root authorization, the command is as follows: /usr/sap/hostctrl/exe/saphostexec -version
    • If you are logged on as a member of the sapsys group, for example <sapsid>adm, the command is as follows: /usr/sap/hostctrl/exe/hostexecstart -version
    IBM i/usr/sap/hostctrl/exe/saphostexec -version
  7. IBM i only: Leave the PASE interactive terminal session using function key F3

Next Steps

Post-requisites:
You can now delete the temporary directory with all its content.

Logical Volume Manager (LVM) Part I Basics

LVM stands for Logical Volume Management. It is a system of managing logical volumes or file systems, that is much more advanced and flexible than the traditional method of partitioning a disk into one or more segments and formatting that partition with a filesystem.

This article primarily related to HP-UX operating system. However other
operating systems may have their own peculiarities and nuances, but the basis
is certainly one.The disk that is part of the LVM has a specific structure and
contains service information.

LVM structure: one or more disks are combined into a Volume Group (VG)
within which you can create one or more Logical Volume (LV),  between
which to allocate the disk space of the volume group drives. On Logical Volume,
create file systems or swap areas and specify mount points.




Useful directories and files:
/DEV/DSK/CXTXDX and/DEV/RDSK/CXTXDX device files (block and raw)
of the hard drives in the system /dev/vgxxx/group -Device file for Volume 
group Vgxxx /dev/vgxxx/lvxxx  and /dev/vgxxx/rlvxxx -Logical volume
(block and raw) files from the Volume Group VGxxx, /etc/lvmtab is a binary
file that contains a list of the system's Volume Groups and a list of their hard
drives (physical volumes). Some of the information from the file can be viewed
by the strings command /etc/lvmconf -Directory with the backups of the Volume
Group configuration files. is updated with the volume Group or Logical volume
change commands or a single command - vgcfgbackup .
List of file systems and mount points used to automatically mount file systems
at the start of the OS, is a list of what is currently being installed. 

Information is used by the Mount/umount(2) and DF/BDF.

Logical Volume Manager (LVM) Part 2. Basics

Materials refer link 

SAP system logs

The main system log, SAP systems can be seen by running transaction SM21
(Tools-> Administration->  Monitoring-> System Log). Displays a message with
the current SAP-instance. Log entries are read from the file specified by the
parameter rslg/local/file. By default /usr/sap/<sid>/<Instance_name>/log/SLOG <instance_number>. Parameter rslg/max_diskspace/local sets the size of the
log file. By default, 500000.
After filling the old entries are deleted. The size of the single record 192 bytes. 
You can collect log records from all application servers on the central instance. 
To do this, you must set a number of parameters. 
Details on the SAP Help Portal .

Transaction ST22 -view ABAP-system dumps. You can via the menu
"move to-> Reorganize" set term of storage dumps. The retention value of 
dumps depends on the frequency of analysis of your systems. Usually, 7 days is
enough. Dumps are stored in table SNAP.

You can enable Security Audit Log system. From this you can see log successful
and failed logons, user blocking users, run reports, edit the transaction key. 
Temporarily included in the transaction SM19. Constantly parameter 
rsau/enable = 1. Option rsau/local/file sets the directory where to store the
logs. By default,/usr/sap/<sid>/<Instance_name>/log/audit_ <instance_number>.
Via parameter rsau/max_diskspace/local audit file size is set for the day.
View history through the transaction SM20. Delete old logs transaction SM18.

There is also an option to activate auditing changes in tables. Write the profile parameter rec/client = XXX (client number).You can specify multiple
comma-separated mandates. For the required tables in SE11 in technical settings
include "change history". View audit transaction SCU3. The audit log is stored in 
table DBTABLOG.

8/27/2017

How to open the client in SAP system?

Often in business scenarios, there will be requirements which cannot be transported and which have to be modified directly in respective tables and other repository objects. To perform these operations client to be opened.


Goto transaction SCC4. This lists clients’ overview as below:


How to open the client in SAP system


From the above screen, we can make out what are the existing clients in the 
SAP system, their names and the date they are last modified.

Double click on the client to be opened. It displays similar screen as below
with the complete client details like last changed date, last changed by, client
role and associated logical system of the client


How to open the client in SAP system

In the above screen, we can see the highlighted option that no changes allowed
and no changes to the repository and cross-client customizing objects. These 2
settings mean that client is NOT opened.

To open the client we should set the client settings as shown below for a client:

How to open the client in SAP system


In addition to the above 2 settings, in SE06, System change option should be
set to “modifiable” as shown below:

Go to transaction SE06:


How to open the client in SAP system

Click on System change option as in the below screen

How to open the client in SAP system


In the above screen, set the Global setting as “modifiable” to make sure client
is opened.

In case you would like to restrict changes to a client, please set this Global
setting as non-modifiable so that no changes can be done.

Please note that the above setting of system change can be done through
SE03 transaction as well.

What are the various client settings and their significance?

Changes and transports for Client specific objects :

1) Changes without automatic recording: Changes will be done without
recording in a change  request

2) Automatic recording of changes: Changes will be done and  request will
get generated & changes will be captured in that

3) No changes allowed: No changes will be allowed

4) Changes w/o automatic recording no transports allowed: This flag
means customizing changes will be permitted but changes are not automatically recorded in the change request.

Cross –Client object changes :

1) No changes to cross-client object changes
2) No changes to repository objects
3) No changes to cross-client and repository objects
4) Changes to cross-client and repository objects.

Popular Posts