Quantcast
Channel: Teradata Forums - Database
Viewing all 14773 articles
Browse latest View live

Transaction ABORTed due to Teradata table deadlock in Informatica - response (3) by krishaneesh

$
0
0

Kanna, I am not sure if the same is the table that you are loading usinge multiple parallel sessions. If that is the case what Khurram suggested will help.
But usually we see this situation in case you are loading multiple tables and you are not getting an access to the DBC tables. what you can do is there is a session parameter in informatica(session retry on deadlock) which will wait for a specified time and retry for getting the lock on the dbc tables.Also in the internal parameters in dbscontrol we have RetryAccLogDeadlock which can be set to TRUE. Also DBC tables clean up will improve the query performance on these tables and will get faster accessibility.
HTH


Data update cost for table with lots of columns or only a few columns - response (1) by krishaneesh

$
0
0

Definitely the processing and the IO consumed in this case will be more. Also it depends on the where clause conditions that you are using in the update query. Lets suppose you are  using a PI in the where clause, then the rows corresponding to that PI column(i.e., the AMP) will be scanned for other conditions applied and a single amp update is done. If you are not using the PI of the table in the where clause, all the rows will be scanned. When you see that all rows are scanned, rows are stored internally in Teradata as blocks and  all the columns of the table will be included in each of the block. Hence scanning the whole block would consume more CPU if you have 100 columns in the table vs 10 columns in the table. This is where the advantage of columnar comes where the storage of the table is in column format instead of a row format. In another way to say, 100 columns of a row might be multiple blocks and 10 columns of a row can be on much lesser number of blocks. Hence scanning less number of blocks consumes less resources.
HTH

How is the Node Decided - response (2) by krishaneesh

$
0
0

I Second Blaine on the PI.
When a table is created on Teradata platform, all the amps in the system will have the header information of the table which is not accessible to users except internal to Teradata(you can say BYNET). When a query is fired, the BYNET looking at the header will be able to identify the data on the amps and will retrieve it from the disks. if you fire the query below for an emty table still it will show that some space is consumed on all the amps and this is the space consumed by the header of the table.
sel * from dbc.tablesize where tablename='<tablename>' and databasename=''databasename>';
This will give the tables header stored on each amp and will also give the number of amps on the system. These AMPS are located on all the nodes which are currently active in the system(there are systems where Hot stand By nodes will be present).
 
HTH

CHR(26) replacement in teradata - response (3) by memostone

Getting a unique value for VARCHAR field. - response (7) by memostone

$
0
0

Hi Dieter,
 
I tried your solution posted above, and columnA is defined as varchar(50).
The following is the query, but there are few duplicates after converting(below is an example). Can you please take a look to see if any workaround for this?

SELECT  DISTINCT columnA as a, 
HASHROW( columnA ) as b, 
(HASHBUCKET(HASHROW (columnA)  (BYTE(4))) / ((HASHBUCKET()+1)/65536) * 65536. +
   HASHBUCKET(SUBSTR(HASHROW (columnA),3,2) (BYTE(4))) / ((HASHBUCKET()+1)/65536)) as c
FROM TableA

  output c is the same when columnA in ('0034317069', '0063313119882_206148')
 

How to restore perticular TABLE from backup location in TERADATA. - response (2) by DeepakDhabade

$
0
0

Hi,
We are working actually on ABU which is a component of Teradata Tools and Utility. So we need the script to Restore a particular table through ABU. Please provide the script of restoring through TARA Gui in which different credentials are provided already.
 
Thanks and Regards,
Deepak Dhabade.

Trying to use Teradata ODBC drivers on linux redhat with UnixODBC driver manager - response (6) by dkasak

$
0
0

I am facing similar issues with Teradata connectivity. Using unixODBC ( which is the only option if you need to connect to multiple database servers in one application ), there is no error reporting.
This is a serious flaw in the driver stack on Linux.
Is there an official stance on this ( other than the 'unixODBC is not supported' line )?

How to restore perticular TABLE from backup location in TERADATA. - response (3) by DeepakDhabade

$
0
0

Hi All,
Can we try this approach for single table restoration?
1. Backup on Prod
LOGON DBCID/UID,PWD;
ARCHIVE DATA TABLES (DB_Name.Table_Name) ALL,
RELEASE LOCK,
FILEDEF=(tddumps, drive_Location/dump.%UEN%.out);
LOGOFF;
OR
FILEDEF can be setup as a default run-time parameter by using following command:
FILEDEF=(tddumps, drive_Location/dump.%UEN%.out).
And then the script is executed as follows.
LOGON DBCID/UID,PWD;
ARCHIVE DATA TABLES (DB_Name.Table_Name) ALL,
RELEASE LOCK,
FILE=(tddumps);
LOGOFF;

2. Copy the backup file (dump.%UEN%.out) from Source (Prod) to destination (DEV)
3. Restore the table on DEV using following script, table with a new name
LOGON DBCID/UID,PWD;
RESTORE DATA TABLES (DB_Name.Table_Name_New) ALL,
RELEASE LOCK,
FILEDEF=(tddumps,drive_location/dump.%UEN%.out);
LOGOFF;
 
Thanks in advance.
Regards,
Deepak D


The Parcel Stream is Invalid - forum topic by shindeswapnali

$
0
0

Hello experts,

I am trying to update some records in teradata table and when updates finish I am inserting some records using Ab Initio. I am using mload utility. My graph is failing with below error:

========= Error from fmwk_dwh_load_table.Inserts_multiload.Update_Table _I_nsert__macro_.tload.000 on ab8p.wload.barclays.co.uk%000 =========
ABINITIO(DB00001): Failed connecting to the database <dwsana>.
ABINITIO(DB00001):
ABINITIO(DB15038): Teradata ODBC Error
ABINITIO(DB15038): SQLCODE: -8019
ABINITIO(DB15038): SQLSTATE: HY000
ABINITIO(DB15038): MESSAGE: [Teradata][ODBC Teradata Driver][Teradata Database] The parcel stream is invalid.
ABINITIO(DB15038): Teradata ODBC Error
ABINITIO(DB15038): SQLCODE: 0
ABINITIO(DB15038): SQLSTATE: 28000
ABINITIO(DB15038): MESSAGE: [Teradata][ODBC Teradata Driver] Not enough information to log on
ABINITIO(DB00067): Current DB Environment:
ABINITIO(DB00067): ODBCINI=/wload/ab8p/home/ab8pgpdw/.odbc.ini COPERR=/opt/teradata/client/13.10/lib COPLIB=/opt/teradata/client/13.10/lib TWB_ROOT=/opt/teradata/client/13.10/tbuild NLSPATH=/opt/teradata/client/13.10/tbuild/msg/%N:/ wload/ab8p/tws/maestro/catalog/%L/%N.cat:/opt/t eradata/client/13.10/odbc_32/msg/%N LANG=en_GB TD_ICU_DATA=/opt/tdicu/lib

ABINITIO(*): Database Package Version 3-0-4-6-e11-1

ABINITIO (3.0.4.6): Mon Mar 10 22:50:38 2014
ABINITIO: Rolling back ...

This is not happening every time. Sometimes it runs and sometimes it fails. There is no fix pattern for the failure. Can anyone of you let me know possible issue with this?

Thanks,
Swapnali S.

Forums: 

How to reduce duplicate Access Rights entries from Teradata database - response (1) by Kishore_1

$
0
0

Access Rights can be granted directly or through Roles. The preferred way of giving access rights is though roles, as it is a better way of managing access rights(it saves space and improves query performance). Duplicate entries may occur if the user is having the same access rights acquired through a role and also having direct access on the Database object.You may use DBC.Allrolerights & DBC.Allrights to identify all such cases where redundant entries have been made.Revoke the direct access from the user/database as the access right is already mapped through roles.
This will reduce the size of DBC.Allrights and help you achieve what you want.

The Parcel Stream is Invalid - response (1) by Raja_KT

$
0
0

Hi,
Do you update manually using Teradata and once done, you use ab initio for inserting?
One reason can be the dbc file content is changed like  db name, username,password ..
Did you test:
m_db test yourdbc_name.dbc immediately after the failure and see the timestamp change of dbc file too.

If not so,can you post some more mload log details
Cheers,
 

Date as Integer - response (24) by NewAmigo

$
0
0

I am trying to change both Business and segment as these are type 2 fields in the table.
So this update statement needs to be added after the above code i have provided?

compression calculations - response (1) by Kishore_1

$
0
0

Please refer below link for more information on compression and identifying and evaluating candidate tables for Compression:
http://developer.teradata.com/extensibility/articles/block-level-compression-evaluation-with-the-blc-utility

How to restore perticular TABLE from backup location in TERADATA. - response (4) by krishaneesh

$
0
0

you should be having the ABUGUI which works similar to TARAGUI. You can restore selected objects or all the objects.
Instead of FILEDEF you can also give File=archive. Also you can try the COPY command instead of RESTORE. The sessions, CATALOG, userid,command line character set can be specified before the logon and you need to use script RESTORE if going specifically thru command line

compression calculations - response (2) by krishaneesh

$
0
0

Kishore, I believe Shashi is looking for MVC of the columns in a table, but not BLC of the table.
@Shashi, Please let me know if otherwise.
The best columns that would be candidates for MVC are those which are having a high frequency of the same value.  MVC is primarily used in a good chunk for space saving  and there are additional savings like reduction in I/O.There are many things to be considered while implementing MVC of which the following will help:
1. How many of the values in a column are repeating.
2. How frequently that value exists in the column.
3. How frequently that column is updated. the more the column value is update, it is not ideal for MVC.
4. if we have a column which is char(100) and the length maximum value in that column is not more than 20, can we consider changing the column to char(20) or even Varchar(20)~ This will also help in space redution of the table.
5. The number of values compressed in a column cannot be more than 255(try to use the values for compression in multiples).
6. Also the tableheader could not be crossing a certain limit depending on the version you are in (TD12 supports 128KB of tableheader).
There is no  official tool from Teradata to identify the columns that qualify for MVC. An extensive analysis on the tables and the data is the way out. There are other tools in the market which can be looked for


Determining group by columns from DBQLObjTbl - forum topic by rparman

$
0
0

I am working on desiging a summary table and need to determine the grouping columns.  I was looking at DBQLObjTbl TypeofUse, but it doesn't show a group by use.  Is there another way to determine the group by columns without having to parse through the sql?

Forums: 

Help needed with more specific prefix matching (closest match) - forum topic by amerbaig

$
0
0

Hi,

 

 

Table1 contains following entries

 

Code, Name

===========================

1,USA 

1403,Alberta/Canada

1809,Dominican Republic

180979555,Dominican Republic-Santa-Dom

 

Table2 contains

 

180979555123456

1

140

1809

1616

 

Is it possible to get following output in SQL?

 

180979555123456, Dominican Republic-Santa-Dom

1, USA

140, Alberta/Canada

1809, Dominican Republic

1616, USA

 

Is closest matching in possible in TD SQL?

 

Thanks a lot.

 

 

Forums: 

How is a Teradata SQL query parsed and executed? - forum topic by tdfan

$
0
0

Hi guys,
I'm a student at Teradata. I found some diffeence when running SQL in TD and Oracle.
Can anyone help to explain the parsing and executing principle of TD SQL?
It'll be great if there is a comparision.
 
Thanks  alot!

Tags: 
Forums: 

Help needed with more specific prefix matching (closest match) - response (1) by Raja_KT

$
0
0

There should be a fixed formulated logic to arrive at your required output. If not so, then a lot of formulated logics (permutation and combination can arise).
How do you arrive at 1616, USA? Many questions can arise like is it possible  to have  161, USA- 116,USA-16161,USA and so on and so forth.
If the logic is there, then you can use

case when,substring, like etc

etc.
Cheers,

How is a Teradata SQL query parsed and executed? - response (1) by Raja_KT

Viewing all 14773 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>