Monday, 6 February 2017

V$ASM_DISK :
MOUNT_STATUS : What are the pre-instance status of the disk relative to group mounts.
Missing :
There is a entry in the Automatic storage management metadata but physical disk not present.
                                                                                            (Or )Automatic Storage Management metadata indicates that the disk is known to be part of the Automatic Storage Management disk group, but no disk in the storage system was found with the indicated name.
CLOSED : Disk is present in the storage system but is not being accessed by Automatic Storage Management
OPENED - Disk is present in the storage system and is being accessed by Automatic Storage Management. This is the normal state for disks in a database instance which are part of a Disk Group being actively used by the instance.
CACHED - Disk is present in the storage system, and is part of a disk group being accessed by the Automatic Storage Management instance. This is the normal state for disks in an Automatic Storage Management instance which are part of a mounted disk group.
===============================================================================
HEADER_STATUS: Per-instance status of the disk as seen by discovery
• UNKNOWN - Automatic Storage Management disk header has not been read
• CANDIDATE - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement
• INCOMPATIBLE - Version number in the disk header is not compatible with the Automatic Storage Management software version.
• PROVISIONED - Disk is not part of a disk group and may be added to a disk group with the ALTER DISKGROUP statement. The PROVISIONED header status is different from the CANDIDATE header status in that PROVISIONED implies that an additional platform-specific action has been taken by an administrator to make the disk available for Automatic Storage Management.
• MEMBER - Disk is a member of an existing disk group. No attempt should be made to add the disk to a different disk group. The ALTER DISKGROUP statement will reject such an addition unless overridden with the FORCE option
• FORMER - Disk was once part of a disk group but has been dropped cleanly from the group. It may be added to a new disk group with the ALTER DISKGROUP statement.
• CONFLICT - Automatic Storage Management disk was not mounted due to a conflict
===========================================================================
https://docs.oracle.com/cd/E24693_01/rac.11203/e16794/crsref.htm
CRSCTL is an interface between you and Oracle Clusterware, parsing and calling Oracle Clusterware APIs for Oracle Clusterware objects ,with which you can perform check, start, and stop operations on the cluster
You can use CRSCTL commands to perform several operations on Oracle Clusterware, such as:
• Starting and stopping Oracle Clusterware resources
• Enabling and disabling Oracle Clusterware daemons
• Checking the health of the cluster
• Managing resources that represent third-party applications
• Integrating Intelligent Platform Management Interface (IPMI) with Oracle Clusterware to provide failure isolation support and to ensure cluster integrity
• Debugging Oracle Clusterware components
Clusterized (Cluster Aware) Commands
Clusterized commands are completely operating system independent; they rely on the OHASD (Oracle High Availability Services daemon). If this daemon is running, then you can perform remote operations, such as the starting, stopping, and checking the status of remote nodes.
You can run clusterized commands on one node to perform operations on another node in the cluster. These are referred to as remote operations. This simplifies administration because, for example, you no longer have to log in to each node to check the status of the Oracle Clusterware on all of your nodes
Clusterized commands include the following:
• crsctl check cluster
• crsctl start cluster
• crsctl stop cluster
crsctl –help to get help
crsctl start –help to get help of specific command.
How to check which group id user belongs to in linux.
[root@blt07768013 ~]# groups ananda3
ananda3 : unix-ananda3-g
crsctl check css to check the status of Cluster Synchronization Services
The crsctl check css command returns output similar to the following:
CRS-4529: Cluster Synchronization Services is online
crsctl check evm command to check the status of the Event Manager
The crsctl check evm command returns output similar to the following:
CRS-4533: Event Manager is online
crsctl get hostname  to get hostname command to retrieve the host name of the local server.
Oracle Clusterware returns the host name of the local server:
$ crsctl get hostname
node2


You can use the following commands only in an Oracle RAC environment:
• crsctl add crs administrator
• crsctl add css votedisk
• crsctl add serverpool
• crsctl check cluster
• crsctl check crs
• crsctl check resource
• crsctl check ctss
• crsctl config crs
• crsctl delete crs administrator
• crsctl delete css votedisk
• crsctl delete node
• crsctl delete serverpool
• crsctl disable crs
• crsctl discover dhcp
• crsctl enable crs
• crsctl get clientid dhcp
• crsctl get css
• crsctl get css ipmiaddr
• crsctl get nodename
• crsctl getperm serverpool
• crsctl lsmodules
• crsctl modify serverpool
• crsctl pin css
• crsctl query crs administrator
• crsctl query crs activeversion
• crsctl query crs releaseversion
• crsctl query crs softwareversion
• crsctl query css ipmiconfig
• crsctl query css ipmidevice
• crsctl query css votedisk
• crsctl query dns
• crsctl release dhcp
• crsctl relocate resource
• crsctl relocate server
• crsctl replace discoverystring
• crsctl replace votedisk
• crsctl request dhcp
• crsctl set css
• crsctl set css ipmiaddr
• crsctl set css ipmiadmin
• crsctl setperm serverpool
• crsctl start cluster
• crsctl start crs
• crsctl start ip
• crsctl start testdns
• crsctl status ip
• crsctl status server
• crsctl status serverpool
• crsctl status testdns
• crsctl stop cluster
• crsctl stop crs
• crsctl stop ip
• crsctl stop testdns
• crsctl unpin css
• crsctl unset css
• crsctl unset css ipmiconfig


crsctl add crs administrator
Syntax
crsctl add crs administrator -u user_name [-f] if you want to provide any user Oracle Clusterware administrative privileges.
Table E-15 crsctl add crs administrator Command Parameters
Parameter Description
-u user_name The name of the user to whom you want to give Oracle Clusterware administrative privileges.
-f Use this option to override the user name validity check.
crsctl add crs administrator -u scott
crsctl add css votedisk path_to_voting_disk [path_to_voting_disk ...] [-purge]
Parameter Description
path_to_voting_disk A fully qualified path to the voting disk you want to add. To add multiple voting disks, separate each path with a space.
-purge Removes all existing voting disks at once. You can replace the existing set of voting files in one operation
Usage Notes
• You should have at least three voting disks, unless you have a storage device, such as a disk array, that provides external redundancy. Oracle recommends that you do not use more than 5 voting disks. The maximum number of voting disks that is supported is 15.
Example
• To add a voting disk to the cluster:
$ crsctl add css votedisk /stor/grid/ -purge
crsctl check cluster [-all | [-n server_name [...]]
You can check the status of the Oracle Clusterware stack on all nodes in the cluster with the -all option or you can specify one or more space-delimited nodes. If you do not specify either option, Oracle Clusterware checks the status of the Oracle Clusterware stack on the local server.
$ crsctl check cluster -all to check the status of the Oracle Clusterware stack on all nodes
*****************************************************************
node1:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online
*****************************************************************
node2:
CRS-4537: Cluster Ready Services is online
CRS-4529: Cluster Synchronization Services is online
CRS-4533: Event Manager is online

Sunday, 5 February 2017

Control file restore :


■Note Anytime you restore a control file from a backup, you are required to perform media recovery on your entire database and then open it with the open resetlogs command.
This is true even if you don’t restore any datafiles (because the control file’s SCN is no longer synchronized with the SCNs in the datafiles
and online redo log files).



10-1. Restoring Control File Using Flash Recovery Area.


Problem:

You have wisely enabled a flash recovery area, and you use it as a repository for your control file backups. Unfortunately, you’ve lost all your control files, and now you need to use RMAN to restore them.

Solution:

When you use the flash recovery area, you can use one of two very different methods to restore
the control file depending on whether you enabled the autobackup of the control file.

This recipe describes both of these scenarios.


Using the Autobackup of the Control File

When you enable the autobackup of your control file and are using a flash recovery area, then restoring your control file is fairly simple.

First connect to your target database, then issue a startup nomount command, and lastly issue the restore controlfile from autobackup

command:

RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;

RMAN restores the control files to the location defined by your control_files initialization parameter.

You should see a message indicating that your control files have been successfully
copied back from an RMAN backup piece.

Here is a partial snippet of the output:

Starting restore at 02-FEB-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
database name (or database unique name) used for search: ORCL
channel ORA_DISK_1: autobackup found in the recovery area
Finished restore at 02-FEB-07
You can now alter your database into mount mode and perform any additional restore
and recovery commands required for your database.


Not Using the Autobackup of the Control File

If you don’t use the autobackup of the control file feature, then restoring the control file becomes more difficult.

If autobackup is disabled, you have to explicitly tell RMAN from
which directory and backup piece to restore the control file. This example specifies a directory and a lengthy filename:

RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from
'C:\FRA\DB1\backupset\2006_09_23\01_mf_ncnnf_TAG20060923T02kc1vgsh.bck';

Here is a partial listing of the RMAN output when restoring your control file:
Starting restore at 02-FEB-07
allocated channel: ORA_DISK_1
channel ORA_DISK_1: sid=156 devtype=DISK
channel ORA_DISK_1: restoring control file
channel ORA_DISK_1: sid=156 devtype=DISK


How It Works

We highly recommend enabling autobackup of the control file.

By default, the autobackup of your control file is not enabled .

This ensures that the backup piece is placed in a default location that RMAN can use to automatically restore your target database control file.

Autobackup Enabled

RMAN uses the value of your operating system ORACLE_SID variable to look in the
default location for control file backups in the flash recovery area. RMAN deduces the default location of the backup file by combining the values of the db_recovery_file_dest initializa-
tion parameter and your operating system ORACLE_SID variable setting.

By default RMAN will look in a directory with the following format:

\<FRA>\<target database SID>\autobackup\YYYY_MM_DD\<backup piece file>


Autobackup Not Enabled

When you don’t have the autobackup of your control file enabled,
then by default RMAN will place the backup of your control file in a directory path named like this:

\<FRA>\<target database SID>\backupset\YYYY_MM_DD\<backup piece file>

■Note RMAN will by default back up your control file anytime you back up datafile 1, regardless of
whether you have the autobackup of your control file feature enabled.


If you have the RMAN output log from a backup, then you should be able to see which
backup piece contains the backup of your control file.

 For example, here is the partial output
of RMAN messages during a backup of datafile 1:


including current control file in backupset
including current SPFILE in backupset
channel ORA_DISK_1: starting piece 1 at 02-FEB-07
channel ORA_DISK_1: finished piece 1 at 02-FEB-07
piece handle=
C:\FRA\DB1\backupset\2006_09_23\01_mf_ncnnf_TAG20060923T02kc1vgsh.BCK
In this example, the correct backup piece name is as follows:
01_mf_ncnnf_TAG20060923T02kc1vgsh.BCK


■Note : When you restore a control file from a backup, you are required to perform media recovery on your entire database and open your database with the open resetlogs command, even if you didn’t restore any datafiles.

You can determine whether your control file is a backup by querying the CONTROLFILE_TYPE col umn of the V$DATABASE view.


10-2. Restoring Control File Using Recovery Catalog

Problem

You need to restore your control file, and you use a recovery catalog when creating backups.

Solution

Restoring the control file is fairly simple when you use a recovery catalog. All you need to do is ensure that you connect to both your target database and the recovery catalog.

RMAN> connect target /
RMAN> connect catalog rcat/rcat@recov
RMAN> startup nomount;
RMAN> restore controlfile;


How It Works

Using a recovery catalog makes it straightforward to restore the control file.

When you issue the restore controlfile command, RMAN will retrieve from the recovery catalog the location and name of the file that contains the control file backup and restores the control file appro-
priately. Because the recovery catalog knows the location of the RMAN backup piece,

it doesn’t matter whether the backup piece is in a flash recovery area or in a configured channel location.

When you’re connected to the recovery catalog, you can view backup information about your control files even while your target database is in nomount mode.

 To list backups of your
control files, use the list command as shown here:

RMAN> connect target /
RMAN> connect catalog rcat/rcat@recov
RMAN> startup nomount;
RMAN> list backup of controlfile;

If you have registered two databases in the recovery catalog with the same name, then
you might receive an error such as this when you attempt to list backups or restore the control
file:
RMAN-06004: ORACLE error from recovery catalog database:
RMAN-20005: target database name is ambiguous


In this situation, you will need to first set your database identifier (DBID) before you can restore your control file.

how to determine your DBID.

The database name that is stored in the recovery catalog is not guaranteed to be unique.

You can verify that you have multiple databases with the same name in your recovery catalog by querying the recovery catalog RC_DATABASE view as shown here:

SQL> connect rcat/rcat@rcat
SQL> select db_key, dbid, name from rc_database;

DB_KEY    DBID       NAME
------ ---------- ----
1          1124743449    ORCL
4241    1140772490    ORCL


10-3. Determining the Database Identifier
Problem



Your backup strategy doesn’t take advantage of either a flash recovery area or a recovery catalog.

You are trying to restore a control file as follows, and you receive an error message stating that you must explicitly set the database identifier (DBID):

RMAN> connect target /
RMAN> startup nomount;
RMAN> restore controlfile from autobackup;


RMAN specifically instructs you to set the DBID first:

RMAN-06495: must explicitly specify DBID with SET DBID command


You don’t know the DBID for your database, and you aren’t sure how to find the DBID.
Without a control file for your database, you can’t mount the database and query the DBID
value from the V$DATABASE view.



Solution

You can determine the DBID of your database in one of the following ways:

• You can derive the DBID from an autobackup file.

• You can retrieve the DBID from RMAN output.

• You can write the DBID to the alert.log file.

• You can derive DBID from a file dump.


Deriving the DBID from an Autobackup File

If you chose to configure the autobackup control file format, then you are required to include the format variable %F when formatting the name used for the RMAN backup piece.

 The format of the %F variable is a unique combination of the database identifier, the date, and a sequence, and it follows this format: c-IIIIIIIIII-YYYYMMDD-QQ. The first ten Is comprise your target data-
base’s DBID.

For example, if the control file backup piece name is c-2601506593-20060918-01,
then the DBID substring is 2601506593.


Description of %F Format Variable
String 
g

c Signifies a control file backup.
IIIIIIIIII DBID.
YYYYMMDD Date backup was created. Used by maxdays parameter of the restore controlfile
command.
QQ A hex sequence number that is incremented each time a control file autobackup is
created for a given day. Used by the maxseq parameter of the restore controlfile
command.


The default location for a control file autobackup on Unix systems is ORACLE_HOME/dbs,
and on Windows platforms it’s usually ORACLE_HOME\database.

Writing the DBID to the Alert.log File
Another way of recording the DBID is to make sure that it is written to the alert.log file on a
regular basis using the DBMS_SYSTEM package. For example, you could have this SQL code
execute as part of your backup job:

COL dbid NEW_VALUE hold_dbid
SELECT dbid FROM v$database;
exec dbms_system.ksdwrt(2,'DBID: '||TO_CHAR(&hold_dbid));


After running the previous code, you should see a text message in your target database
alert.log file that looks like this:

DBID: 2601506593






























Friday, 20 January 2017

HTML Images is a link to a page on this website.

W3C is a link to a website on the World Wide Web.

Wednesday, 16 November 2016

login to root
cd /sbin
ls pam_tally*
pam_tally2 --user=inapaks --reset
faillog -r <username>
chage -l <username> 
passwd <username>

# passwd -S user1
user1 LK 2014-08-17 0 99999 7 -1 (Password locked.)# passwd -S user1
user1 PS 2014-08-17 0 99999 7 -1 (Password set, SHA512 crypt.)

Sunday, 30 October 2016

Process Scheduler Cache


TEST is a link to a page on this website.

W3C is a link to a website on the World Wide Web.

Process scheduler has it’s own cache apart from the application server cache. It keeps its own copies of Component Interfaces,
Application Engine PeopleCode and Application engine sections and SQL.

In order to clear the Process Scheduler cache , the process scheduler needs to be shut down.


Component Interface
Application Engine People Code
Application Engine sections
SQL

To delete process scheduler cache, you need to manually delete all the files and folders
in this directory $PS_HOME/appserv/prcs/{YOUR-ENV-NAME}/cache on the process scheduler machine(s).




Application Engine
If you are having an issue with an application engine still running old code after a project migration then ask for a Process Scheduler cache clear.

The other 2 types of server cache DO NOT need to be cleared.

If your application engine calls a component interface and you recently migrated a change to the component interface, generally a Process Scheduler cache clear is needed. The other 2 types of server cache DO NOT need to be cleared.

COBOL
COBOL does not use CACHE. If you are having a COBOL issue cache has nothing to do with it. Do not waste your time trying.

SQR
SQR does not use CACHE. If you are having a SQR issue cache has nothing to do with it. Do not waste your time trying.



Aspiring for a position where my knowledge, skills and experience as Data Base Administrator and
application administrator can be effectively used for the development of my organization and for personal advancement.


how to enable ruler in Word -- > Just there will be a small box at right hand side of roller , you click it on thats all



Sunday, 17 July 2016

Sql server


select * from sys.databases

to check database present in the database.

select * from sys.databases

to check user name present in the databases.
select * from sys.server_principals;


how to check tables of particutar database;

select * from INFORMATION_SCHEMA.TABLES;


How to take backup of database in sql server ?


Permissions Required to Take Database Backup in SQL Server

In order to take backups a user must be a member of DBCREATOR Server Role and DB_OWNER Database Role else you will receive the below mentioned error while performing backups.

Error Message

Msg 262, Level 14, State 1, Line 1
BACKUP DATABASE permission denied in database 'DatabaseName'.
Msg 3013, Level 16, State 1, Line 1
BACKUP DATABASE is terminating abnormally.

Sample TSQL Script to Create Login with DBCREATOR Server Role and DB_OWNER Database Role

CREATE LOGIN BackupRestoreAdmin WITH PASSWORD='$tr0ngP@$$w0rd'
GO
CREATE USER BackupRestoreAdmin FOR LOGIN BackupRestoreAdmin
GO
EXEC sp_addsrvrolemember 'BackupRestoreAdmin', 'dbcreator'
GO
EXEC sp_addrolemember 'db_owner','BackupRestoreAdmin'
GO


Database Administrator or a user who is a member of DBCREATOR Server Role and DB_OWNER Database Role can take a full backup of database using either:-

• Using SQL Server Management Studio
• Using TSQL scripts

Let us take a look at both the above mentioned options to perform a full backup of a database in SQL Server.



Take Full Backup of a Database Using SQL Server Management Studio

1. Open SQL Server Management Studio and connect to the appropriate instance of Microsoft SQL Server Database Engine in Object Explorer.

2. Expand Databases node and then right click the database which you want to take a full backup and point to Tasks, and then click Back Up… option as shown in the below snippet to open up Back Up Database dialog box.