Table definition unknown

Post questions here relative to DataStage Server Edition for such areas as Server job design, DS Basic, Routines, Job Sequences, etc.

Moderators: chulett, rschirm, roy

Post Reply
marco.mir
Participant
Posts: 16
Joined: Wed Jul 28, 2010 1:30 am
Location: Italy

Table definition unknown

Post by marco.mir »

Hello,

I have a problem with a table definition. I know only some columns of a table, I don't know if there are other columns besides the one I know. I can't get access to the database, because nobody knows the password, even if there is password on Administrator (but it is encrypted).

If I want to know if there are other columns on my table, how can I do? Is it possibile to make a select * from table? And what should I write in column names?

Thanks in advance-
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Re: Table definition unknown

Post by chulett »

marco.mir wrote:I can't get access to the database, because nobody knows the password, even if there is password on Administrator (but it is encrypted).
That's your hurdle... without access to the database, everything else is moot. So, is this a database you "own"? If so, as DBA should be able to assign a new password.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

Copy the table to a dataset or to a table you create in a database you have got access to.

Use Runtime Column Propagation (needs to be enabled for the project in Administrator and on the Output-page of the DB-Stage).

Specify 'select * from tablename' as custom-SQL and leave the Schema-definition (Column-list) empty.

After that you can import the table-definition from the newly created dataset/db-table.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

OK... so you have the password encrypted in the jobs but no-one locally knows what it is? Phil Hibbs has a utility that will (amongst other things) decrypt them, let me see if I can find it.

And no RCP in Server, I'm afraid.

Found it here: viewtopic.php?t=132851
Last edited by chulett on Wed Oct 05, 2011 7:24 am, edited 1 time in total.
-craig

"You can never have too many knives" -- Logan Nine Fingers
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Re: Table definition unknown

Post by BI-RMA »

chulett wrote:So, is this a database you "own"? If so, as DBA should be able to assign a new password.
I assumed what you are doing is legal. Otherwise the password should not be available as a project-variable, either. :wink:
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

I don't see what could be considered "illegal" about it, never mind the fact that the password is encrypted. Usually the password in question is specific to the ETL functional user, so it's not like there would be far-reaching unknown consequences to having it reset. Hopefully. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
BI-RMA
Premium Member
Premium Member
Posts: 463
Joined: Sun Nov 01, 2009 3:55 pm
Location: Hamburg

Post by BI-RMA »

chulett wrote:And no RCP in Server, I'm afraid.
Very true, unfortunately.
"It is not the lucky ones are grateful.
There are the grateful those are happy." Francis Bacon
arunkumarmm
Participant
Posts: 246
Joined: Mon Jun 30, 2008 3:22 am
Location: New York
Contact:

Post by arunkumarmm »

Craig,

Isn't that easy to retrieve a password encrypted in ENV variables? When I dont know the password and if it is available in ENV variables, I assign it to a file name in the seq file stage and try to view it. I will have the password in the returned error message.
Arun
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Sure, there are games like that you can play to expose passwords, using them in any fashion that requires them to be decrypted with passed. Forgot that little nugget. :wink:
-craig

"You can never have too many knives" -- Logan Nine Fingers
marco.mir
Participant
Posts: 16
Joined: Wed Jul 28, 2010 1:30 am
Location: Italy

Post by marco.mir »

BI-RMA wrote:Copy the table to a dataset or to a table you create in a database you have got access to.

Use Runtime Column Propagation (needs to be enabled for the project in Administrator and on the Output-page of the DB-Stage).

Specify 'select * from tablename' as custom-SQL and leave the Schema-definition (Column-list) empty.

After that you can import the table-definition from the newly created dataset/db-table.


Thank you! Your solution is good :wink: infact password is encrypted but I can use it as a parameter from Administrator, so even if I have to use server job, I can make a parallel job with that parameter to connect to the db and to use RCP (there isn't RCP in server jobs).
Post Reply