8 Temmuz 2010 Perşembe

CP of Datafile for Online Backup Returns "A system call received a parameter that is not valid."

Applies to:
Oracle Server - Enterprise Edition - Version: 10.2.0.3
AIX5L Based Systems (64-bit)

Symptoms
Coping a datafile after a 'begin backup' with the database is open returns an error:
A system call received a parameter that is not valid.


Cause
This problem is caused with the use of JFS2 file systems, CIO not enabled, and the parameter FILESYSTEMIO_OPTIONS set to SETALL.

Note 272520.1 - Direct I/O or Concurrent I/O on AIX 5L:
External utilities or tools cannot read datafiles on JFS2 file systems if you use the values SETALL or DIRECTIO for the FILESYSTEMIO_OPTIONS parameter. For more information, refer to the AIX
documentation which covers the open() restriction in cio mode.


Solution
1. Enable CIO on JFS2 file system

OR

2. Change FILESYSTEMIO_OPTIONS=asynch


Since its a dynamic initialization parameter you can use the ALTER SESSION,
ALTER SYSTEM commands to do this.

Parameter type
String

Syntax
FILESYSTEMIO_OPTIONS = {none | setall | directIO | asynch}

Default value
There is no default value.

Parameter class
Dynamic: ALTER SESSION, ALTER SYSTEM


References
Note 257338.1 - Direct I/O (DIO) and Concurrent I/O (CIO) on AIX 5L
Note 272520.1 - Direct I/O or Concurrent I/O on AIX 5L
----------------------------------------------------
http://ebsblog.blog.163.com/blog/static/127949789200981533133531/
http://forums.sdn.sap.com/message.jspa?messageID=3129195

26 Haziran 2010 Cumartesi

Solaris Oracle kurulumu Hazırlıkları

network ip sabitleme;
/etc/hostname
/etc/hosts
/etc/nodename
----------------------
Creating Required Operating System Groups and Users

/usr/sbin/groupadd oinstall
/usr/sbin/groupadd dba
/usr/sbin/groupadd oper
id nobody
id -a oracle
useradd -g oinstall -G dba,oper -m -d /export/home/oracle -s /bin/bash oracle
# id -p
uid=0(root) gid=0(root) projid=1(user.root)
# prctl -n project.max-sem-ids -i project user.root
#prctl -n project.max-shm-memory -i project 1
#prctl -n project.max-shm-memory -v 6gb -r -i project 1
#projadd -p 101 -c 'ORA DBA' -U oracle -G dba -K 'project.max-shm-memory=(privileged,6G,deny)' ORA
/etc/user_attr
oracle::::project=ORA
id -p
uid=100(oracle) gid=100(oinstall) projid=101(ORA)
set shmsys:shminfo_shmmax=4294967295
set shmsys:shminfo_shmmni=100
set semsys:seminfo_semmni=100
set semsys:seminfo_semmsl=256
--swap alanı ekleme
swap -l
zfs create -V 1G -b 4k rpool/swap2
zfs volsize=1G rpool/swap2
swap -a /dev/zvol/dsk/rpool/swap2
http://docs.sun.com/app/docs/doc/817-5093/gizfl?a=view

TDP for Oracle for Solaris RMAN backup

root>pkgadd -d TIVsmCapi.pkg
root>./TDPoraclex86.bin
set LD_LIBRARY_PATH=$ORACLE_HOME/lib
shutdown db
$ ln -s /usr/lib/amd64/libobk.so $ORACLE_HOME/lib/libobk.so
$ ln -s /opt/tivoli/tsm/client/oracle/bin64/libobk.so $ORACLE_HOME/lib/libobk.so
veya
ln -s /opt/tivoli/tsm/client/oracle/bin/libobk.so $ORACLE_HOME/lib/libobk.so
start db
/usr/bin/dsm.opt
SERVERNAME TBM
traceflag config
tracefile /export/home/oracle/log/tsm_trace.out /opt/tivoli/tsm/client/oracle/bin64
/usr/bin/dsm.sys
SErvername TBM
COMMMethod TCPip
TCPPort 1500
TCPServeraddress ipaddress
NODENAME TBM
PASSWORDACCESS prompt
COMPRESSION yes
root ile
Export DSMO_NODE=TBM
Export DSMI_CONFIG=/usr/bin/dsm.opt
Export DSMI_LOG=/opt/tivoli/tsm/client/oracle/bin
DSMI_DIR
/opt/tivoli/tsm/client/oracle/bin/tdp.opt
DSMI_ORC_CONFIG /usr/bin/dsm.opt
DSMI_LOG /opt/tivoli/tsm/client/oracle/bin64
TDPO_FS orc8_db
TDPO_NODE TBMI
TDPO_OWNER root
TDPO_PSWDPATH /opt/tivoli/tsm/client/oracle/bin64
resolv.conf
nsswitch.conf
/opt/tivoli/tsm/client/oracle/bin/tdpoconf password veya showenv
backup;
shutdown immediate;
startup mount;
--------------------------
hata verirse log dosyasına yazma izni verilmesi yeterli!
--------------------------
run
{
allocate channel t1 type 'sbt_tape' parms
'ENV=(TDPO_OPTFILE=/opt/tivoli/tsm/client/oracle/bin/tdpo.opt)';
backup
format 'df_%t_%s_%p'
(database);
}

run
{
allocate channel 'c1' device type sbt_tape
PARMS='SBT_LIBRARY=/opt/tivoli/tsm/client/oracle/bin/libobk.so';
}

24 Haziran 2010 Perşembe

TDP for Oracle for Windows RMAN backup

1. Register a node on the TSM server.
register node nodename password domain=domainname
parola-123
2. Stop all Oracle services.
OK
3. Install TDP for Oracle for Windows.
E diskine kuruldu
4. Configure the client options file (dsm.opt).
commmethod tcpip
tcpport 1500
TCPServeraddress ip
Nodename TBMI
passwordaccess generate
5. Generate the encrypted password using aobpswd.exe.
E:\Program Files\Tivoli\TSM\AgentOBA\tdpoconf password - 123
E:\Program Files\Tivoli\TSM\AgentOBA\tdpoconf show
6. Test a TDP for Oracle for Windows RMAN backup.
set ORACLE_HOME
rman nocatalog
connect target user/pass@
shutdown immediate
startup mount
ora12514
lissner
(SID_DESC =
(SID_NAME = orcl)
(ORACLE_HOME = E:\oracle\product\10.2.0\db_1)
(GLOBAL_DBNAME = orcl)
)

run {
allocate channel t1 type 'sbt_tape' parms
'ENV=(DSMO_DEBUG=49)';
backup (database);}
rman>list backup;
tsm>q occupancy
tsm>select * from backups where node_name='nodename'
rman>allocate channel for delete type 'sbt_tape';
rman>list backup;
rman>change backuppiece '03lh1hgg_1_1' delete; -tsm LL_NAME:03lh1hgg_1_1
rman>change backuppiece '06lh1meb_1_1' delete;
ANS4994S DP Oracle Win32 ANU0599 TDP for Oracle: (848): => () ANS1126E (RC27) The
file space cannot be deleted because this node does not have
permission to delete archived or backed up data.
tsm>update node backdel=y

7. Install the TSM backup-archive client (optional).

job listesi

EXEC dbms_job.broken(jobno, FALSE);
select job,broken from user_jobs;
select text from user_source
where type = 'PROCEDURE'
and name = procedure_name;
SELECT text FROM all_source WHERE name like '%CTRL%';

SQL> CREATE OR REPLACE PROCEDURE CTRL IS
2 begin
3 dbms_utility.exec_ddl_statement('alter database backup controlfile to trace as ''/oracle/yedek/ctrlbackup.trc'' reuse');
4 end CTRL;
5 /

Procedure created.

SQL> execute CTRL;
SQL> SET ARRAYSIZE 1
SQL> SET MAXDATA 60000
SHOW ERRORS PROCEDURE
DROP PROCEDURE

23 Haziran 2010 Çarşamba

sqlplus ile bağlanma methodları

sqlplus system/pass@tnsnames_sid

sqlplus system/pass@//host:port/SID

sqlplus system/pass@'(description=(address=(protocol=tcp)(host=host_name)(port=port_))
(connect_data=(server=dedicated)(service_name=SID)))'

28 Mayıs 2010 Cuma

SAP -sm37 tablo bilgileri

SELECT
*
FROM
TBTCP --as of timestamp to_timestamp('29/05/2010 07:00', 'DD/MM/Yyyy hh24:mi')
where jobname like 'Z100%GERC%'

SELECT
*
FROM
V_OP --as of timestamp to_timestamp('29/05/2010 07:00', 'DD/MM/Yyyy hh24:mi')
where jobname like 'Z100%GERC%'

FROM "TBTCO" T0001, "TBTCP" T0002
WHERE T0001."JOBNAME" = T0002."JOBNAME"
AND T0001."JOBCOUNT" = T0002."JOBCOUNT";


create table ZTBTCO
as select * from TBTCO