How to insert into UV.ACCOUNT

Post questions here relative to DataStage Enterprise/PX Edition for such areas as Parallel job design, Parallel datasets, BuildOps, Wrappers, etc.

Moderators: chulett, rschirm, roy

kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

How to insert into UV.ACCOUNT

Post by kumar_s »

Hi DSXians,
I mistakenly deleted an accout in UV.ACCOUNT. :cry: May i know, the possibility to insert it back.
Note: The Project directory still exist in unix.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

That was due to wrongly used Wild Chard character. But One of the project is completely removed. But still it gives me error that 'Schema already present, If I recreate with the same name. I have deleted the account. No project directory exist in Unix.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Kumar - search the forum for the use of the VERIFY.SQL command with the FIX option.
-craig

"You can never have too many knives" -- Logan Nine Fingers
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

No, not VERIFY.SQL (this fixes UV_SCHEMA). Yes, you can use a regular INSERT, or even a copy. Maybe ED is even better; open an existing project's record, replace the pathname and file as the name you accidentally deleted. For example, if you deleted Project2 (pathname is /usr/Ascential/DataStage/Projects/Project2) and Project1 still exists in UV.ACCOUNT.

Code: Select all

ED UV.ACCOUNT Project2
LOAD Project1
1
14
G11
R /usr/Ascential/DataStage/Projects/Project2
FILE
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
chulett
Charter Member
Charter Member
Posts: 43085
Joined: Tue Nov 12, 2002 4:34 pm
Location: Denver, CO

Post by chulett »

Close but no cigar. :cry:
-craig

"You can never have too many knives" -- Logan Nine Fingers
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

ray.wurlod wrote:No, not VERIFY.SQL (this fixes UV_SCHEMA). Yes, you can use a regular INSERT, or even a copy. Maybe ED is even better; open an existing project's record, replace the pathname and file as the name you accidentally deleted. For example, if you deleted Project2 (pathname is /usr/Ascential/DataStage/Projects/Project2) and Project1 still exists in UV.ACCOUNT.

Code: Select all

ED UV.ACCOUNT Project2
LOAD Project1
1
14
G11
R /usr/Ascential/DataStage/Projects/Project2
FILE
Superb :D
Is it like, we loaded the template of Project1 into UV.ACCOUNT for values of Project2 record.
May i know the similar Insert command, I tried but it happily gave me lot of errors.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

kumar_s wrote:That was due to wrongly used Wild Chard character. But One of the project is completely removed. But still it gives me error that 'Schema already present, If I recreate with the same name. I have deleted the account. No project directory exist in Unix.
And any idea about this issue??

Code: Select all

SELECT * FROM UV.ACCOUNT WHERE @ID = {project}
gives me 0 records.
Still it doesnt allow me to create a new project.
So may I know what i need to do with UV.SCHEMA
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

Kumar, editing the UV.ACCOUNT should be sufficient. What happens if you try a "LOGTO Project2"? It sounds like your changing the values in the editor didn't quite work correctly.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

ArndW wrote:Kumar, editing the UV.ACCOUNT should be sufficient. What happens if you try a "LOGTO Project2"? It sounds like your changing the values in the editor didn't quite work correctly.
{project} is not a valid account name.

Is for the one which was deleted from unix, UV.ACCOUNT but cannot be recreated with the same name.
Now if I retry from Datastge Administrator Clinet, it keeps mum.., not even a warning message.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ArndW
Participant
Posts: 16318
Joined: Tue Nov 16, 2004 9:08 am
Location: Germany
Contact:

Post by ArndW »

This tells me that your ED UV.ACCOUNT Project2 was not done correctly; confirmed by your not finding that entry when doing your SELECT * FROM UV.ACCOUNT... statement.

What do you mean
Is for the one which was deleted from unix
- this is a different problem. I understood that you mistakenly deleted an entry from the UV.ACCOUNT file but that the project directory remained intact at UNIX level. The UV_SCHEMA entries will also be in order as long as all you did was remove a record from teh UV.ACCOUNT file.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Sorry for confusing in the same thread. I ll start a new thread.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

say if this is the project folder /usr/Ascential/DataStage/Projects/Project2
All of a sudden I got lot of folder under /usr/Ascential/DataStage/Projects.
With the name of Project2_nnnn.
Nearly around 3000. It all contains Type 30. OVER.30,DATA.30 present in it.
By any change its due to the command

Code: Select all

VERIFY.SQL {project} FIX
I executed?
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

One should never, ever, ever run VERIFY.SQL in FIX mode without first running it without FIX to see what you are about to "fix". The syntax to repair the Catalog from the project is not what you used. This may be very difficult to recover.

The additional entries in the project directory are probably a result of rebuilding from the Catalog rather than the reverse, and the damage may not be recoverable. Do you have a backup of Project2?

If so, the cleanest method of recovery is probably to remove Project2 using the Administrator, clean up anything that needs to be cleaned up because it couldn't be deleted, then create a new Project2 before restoring its contents from backup.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
kumar_s
Charter Member
Charter Member
Posts: 5245
Joined: Thu Jun 16, 2005 11:00 pm

Post by kumar_s »

Sorry, Actually I used the command as you mentioned in other post. (With the the key word SCHEMA).
May I know the Insert command used for UV.ACCOUNTS.
Impossible doesn't mean 'it is not possible' actually means... 'NOBODY HAS DONE IT SO FAR'
ray.wurlod
Participant
Posts: 54607
Joined: Wed Oct 23, 2002 10:52 pm
Location: Sydney, Australia
Contact:

Post by ray.wurlod »

The problem with UV.ACCOUNT is that you have to build the licensing string to go into the NAME column. That's why I recommended ED.

Code: Select all

INSERT INTO UV.ACCOUNT(@ID, NAME, PATH) SELECT 'Project2', NAME, '/pathname/Project2' FROM UV.ACCOUNT WHERE @ID = 'Project1';
But if you've screwed the project with an inappropriate use of VERIFY.SQL none of this will help.
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Post Reply