Posted by: Pavel Ermakov | November 8, 2012

Excluding tables for RESTORE/COPY operation

Hello!

I think it will be usefull to know, how to exclude particular tables from RESTORE/COPY operation.  Here is simple arc script of COPY operation:

COPY DATA TABLES

(DB_NAME)

(EXCLUDE TABLES

(DB_NAME.TBL1

,DB_NAME.TBL2

,DB_NAME.TBL3)),

RELEASE LOCK,

FILE=ARC;

Regards,

Pavel.

Posted by: Pavel Ermakov | September 5, 2012

Replication from Oracle to Teradata using GoldenGate

Hello all!

So, if you are interesting in replication from Oracle to Teradata using GoldenGate – check this document:

http://www.oracle.com/ocom/groups/public/@otn/documents/webcontent/345255.pdf

Very usefull. Also, please consider “TURBO APPLY” for Teradata:

MAXTRANSOPS 500

BATCHSQL BATCHTRANSOPS 500, BYTESPERQUEUE 1000000,OPSPERBATCH 500

Regards,

Pavel.

Posted by: Pavel Ermakov | August 22, 2012

PDE not accessible: Cannot open PDE device

Hello all!

In my laptop env I have TD 13.10 version. After some reboots, Teradata didn’t start properly. So, when I issued

s10-1310:~ # pdestate -a
PDE state: DOWN/HARDSTOP
s10-1310:~ # /etc/init.d/tpa start
Teradata Database Initiator service is starting...
Teradata Database Initiator service started successfully.
s10-1310:~ # pdestate -a
PDE state: DOWN/HARDSTOP

Interesting…

So, I began reading OS logs first. Check out this:
/var/log/messages:

Aug 19 15:21:49 s10-1310 recond[5749]: INFO: TdatTools: 29001 #Current Working Directory set: /var/opt/teradata/tddump
Aug 19 15:21:49 s10-1310 recond[5749]: INFO: TdatTools: 29001 #TPA START: "recond -S", NODE UPTIME: 0 Days, 0 Hours, 4 Minutes, 3 Seconds
Aug 19 15:21:49 s10-1310 recond[5749]: INFO: TdatTools: 29001 #BOOT DETECT: seconds(243) is less than g->t1_boot_time_interval: 300
Aug 19 15:21:49 s10-1310 recond[5749]: INFO: TdatTools: 29001 #PDESLEEP( g->t3_boot_time_small_delay: 60 )
Aug 19 15:22:49 s10-1310 recond[5749]: DEGRADED: TdatTools: 29003 #PdeMain NOT started, PANIC-LOOP-DETECTED. Please delete file "/var/opt/teradata/tdtemp/PanicLoopDetected", after resolving the panic issue.

I deleted this file and now, everything works fine! So, be careful with reboots. Now, you are know how resolve this issue.

Regards,
Pavel.

Posted by: Pavel Ermakov | June 21, 2012

Archive procedures in Teradata using ARCMAIN

Hello all!

Do you know about “feature” regarding archiving procedures like this:

...
ARCHIVE DICTIONARY TABLES
(DB_NAME),
RELEASE LOCK,

FILE=ARCHIVE;
...

For example, if you have procedures in particular DB and want to restore them to the new DB at another site after this backup (DICTIONARY) you face off with some issues related to SHOW DEFINITION.

After you’ve been restored and built procedures when you try Show Definition you see “Loading DDL Text”.

Workaround for this issue – backup procedures like tables:

ARCHIVE DATA TABLES (not DICTIONARY)

Teradata Version is 13.10.

Regards,
Pavel.

Posted by: Pavel Ermakov | June 13, 2012

Resolving ARC0202:, was not expected

Hello!

It’s me again :)

So, I had a lot of tasks to backup/restore DBs in Teradata. For some of this tasks Im using arcmain. It’s very simple utility.
I’ve prepared script to restore my DB:

LOGON ip/tdpid,passw;

COPY DICTIONARY TABLES
(DB_NAME),
RELEASE LOCK,

FILE=ARCHIVE;

LOGOFF;

And I’ve got this error:

*** Failure ARC0202:, was not expected.

I’ve started thinking why I’ve got this error, because recently I already have restored another DB.

So, after investigation, I found that issue was related to “number” password, i.e. when you have for example “pass123″ or “12345″ passwords.

You have to mask this password like this:

LOGON ip/tdpid,”pass12345″;

After that everything works fine :)

Regards,
Pavel.

Hello.

Recently I’ve started learning Teradata DB. So, first I wanted to install Teradata DB :) I’ve downloaded Teradata Express 13 version for Windows 32 bit. I’ve installed BYNET driver, Database and Express tools (Teradata Service Control and etc) and other tools: BTEQ, Fastload,Multiload and other.

So, when I tried to logon to DB using BTEQ I’ve got following error:

C:\PaulEr>bteq

Teradata BTEQ 13.00.00.03 for WIN32.
Copyright 1984-2009, Teradata Corporation. ALL RIGHTS RESERVED.
Enter your logon or BTEQ command:
.logon dbc

.logon dbc
Password:
*** CLI error: MTDP: EM_NOHOST(224): name not in HOSTS file or names database.

*** Return code from CLI is: 224
*** Error: Logon failed!

I’ve started reading documentation and Internet. And I found solution! :)

Add this entry to your hosts file:

IP-address dbccop1

dbc – name of DB.

As you can see, you have to add “cop1″ to your DB name – like loopback adapter.

Hope this helps!

Regards,
Pavel.

Posted by: Pavel Ermakov | December 30, 2011

How to cleanup agent from GC 11g or EM 12c

Recently, I had have to clean up agents from EM 12c and Em 11g, after deinstall procedure where agents resides, toy have to cleanup agents from Agents page in EM. How you can do this? It’s simple:

1. Connect to OMS database at SYSMAN user.
2. Locate name for agent and port:

select target_name from mgmt_targets where target_type='oracle_emd';

3. Simple remove agent:

exec mgmt_admin.cleanup_agent('servername:3872');

In some cases I saw this:

*
ERROR at line 1:
ORA-20206: Target does not exist:
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 630
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 417
ORA-06512: at "SYSMAN.MGMT_ADMIN", line 1188
ORA-06512: at line 1

But re-run mgmt_admin.cleanup_agent help me, miracle :)

Regards,
Pavel.

Posted by: Pavel Ermakov | November 8, 2011

ORA-01580: error creating control backup file

Hi
I have faced off with some issue: accidently I’ve configured snapshot controlfile name to wrong directory, after that I can’t clear this option in RMAN.

RMAN> show all;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of show command at 11/08/2011 01:35:50
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 11/08/2011 01:35:50
ORA-01580: error creating control backup file /u01/snapcf_ggdb1.f
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 13: Permission denied
Additional information: 1

RMAN> CONFIGURE SNAPSHOT CONTROLFILE NAME CLEAR;

RMAN-00571: ===========================================================
RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
RMAN-00571: ===========================================================
RMAN-03002: failure of configure command at 11/08/2011 01:36:05
RMAN-03014: implicit resync of recovery catalog failed
RMAN-03009: failure of full resync command on default channel at 11/08/2011 01:36:05
ORA-01580: error creating control backup file /u01/snapcf_ggdb1.f
ORA-27040: file create error, unable to create file
Linux-x86_64 Error: 13: Permission denied
Additional information: 1

Solution: log in to the database as sysdba:

oracle@host: sqlplus "/ as sysdba"

SQL*Plus: Release 11.2.0.3.0 Production on Tue Nov 8 01:33:32 2011

Copyright (c) 1982, 2011, Oracle. All rights reserved.

Connected to:
Oracle Database 11g Enterprise Edition Release 11.2.0.3.0 - 64bit Production
With the Partitioning, Real Application Clusters, Automatic Storage Management, Oracle Label Security,
Data Mining and Real Application Testing options

sys@db1> EXECUTE SYS.DBMS_BACKUP_RESTORE.CFILESETSNAPSHOTNAME('/u01/app/oracle/product/11.2/db/dbs/snapcf_db1.f');

PL/SQL procedure successfully completed.

Regards,
Pavel.

Posted by: Pavel Ermakov | October 21, 2011

Downloading Oracle Software directly to the server

Hi everyone!

Suddenly, I want to install Enterprise Manager 12c and download files using wget. What I did:

1. Export cookies from Firefox using Export Addon for FF.
2. Bring this cookies.txt file to the server.
3. Copy link from edelivery.oracle.com (rightclick on the ‘download’ button, copy link location)
4. Edit this link:
You get:

https://edelivery.oracle.com/EPD/Download/process_download/V28375-01.zip?file_id=44039524&aru=14143702&userid=2932601&egroup_aru_number=14165192&country_id=643&patch_file=V28375-01.zip

You need:

https://edelivery.oracle.com/EPD/Download/process_download/V28375-01.zip?file_id=44039524\&aru=14143702\&userid=2932601\&egroup_aru_number=14165192\&country_id=643\&patch_file=V28375-01.zip

5. wget -O em12_linux64_disk1of2.zip –load-cookies=cookies.txt https://edelivery.oracle.com/EPD/Download/process_download/V28375-01.zip?file_id=44039524\&aru=14143702\&userid=2932601\&egroup_aru_number=14165192\&country_id=643\&patch_file=V28375-01.zip

Done.

Have a nice day!

Regards,
Pavel.

Posted by: Pavel Ermakov | August 19, 2011

SQL*Net break/reset to client

Hi
Recently, I faced off with this wait eevent. I read about in Tanel Poder’s blog to clarify what this event means.
http://blog.tanelpoder.com/2008/04/10/sqlnet-breakreset-to-client/
Unfortunately, the reason of this event I didn’t find. In documentation:

SQL*Net break/reset to client
The server is sending a break or reset message to the client. The session running on the server is waiting for a reply from the client.These waits are caused by an application attempting to:

Select from a closed cursor
Select on a cursor after the last row has already been fetched and no data has been returned
Select on a non-existent table
Insert a duplicate row into a uniquely indexed table
Issuing a query with invalid syntax
If the value, v$session_wait.p2, for this parameter equals 0, it means a reset was sent to the client. A non-zero value means that the break was sent to the client.

Ok, I want to find SPID process on the server for these waintaing sessions, but no luck! In v$session, p2 for these sessions are 0. Select statement:

select p.spid from v$process p, v$session s where p.addr=s.paddr and s.sid in (163,245);

returns no rows.

Next I tried this:

select spid,program,username from v$process p where not exists (select * from v$session s where p.addr=s.paddr);

SPID PROGRAM USERNAME
—– —————————————- ———-
PSEUDO
30845 oracle@com (D000) oracle
30849 oracle@com (S000) oracle
20477 oracle@com (PZ97) oracle
1812 oracle@com (PZ99) oracle
917 oracle@com (PZ98) oracle
24594 oracle@com (S003) oracle
4975 oracle@com (S002) oracle
27199 oracle@com oracle
27961 oracle@com oracle

Aha, may be 27199 and 27961 are these one? Yes, they are! Kill -9 help me to resolve this issue.

Regards,
Pavel.

Older Posts »

Categories

Follow

Get every new post delivered to your Inbox.

Join 66 other followers