Page 1 of 1

DSGetProjectInfo(DSJ.HOSTNAME) returns wrong/old servername

Posted: Thu Feb 15, 2007 3:09 am
by peterbaun
Hi -

I have a routine in which I among other things extracts the servername - for extracting the servername I use
DSGetProjectInfo(DSJ.HOSTNAME)

The problem is that we changed the name of the server - but the the DSGetProjectInfo(DSJ.HOSTNAME) still returns the old server name.

How do I get this to work correctly ? Is the servername branded at the installation time so the only way to get this to work correctly would be to reinstall or is there a - hopefully - better explanation.

Thanks

Regards
Peter

Posted: Thu Feb 15, 2007 3:22 am
by ArndW
The server name is in fact stored at the time the project is created, and that entry cannot be manually changed to reflect a new name.

Posted: Thu Feb 15, 2007 3:29 am
by peterbaun
How annoying - I feared so !

Thanks

Posted: Thu Feb 15, 2007 3:32 am
by ArndW
Peter - but that means you can save the project to a .dsx file, delete it, re-create it and reload your .dsx file and you'll get the correct server name. I'm not at a DataStage machine right now, but if you to to the TCL prompt and "LIST UV.ACCOUNT" you'll see the hostname in there as part of the record. Don't try to change it, that will stop the project from working. If I remembered incorrectly then the hostname is stored as part of the installation and really cannot be changed. But I'm fairly confident that it is stored at a project level.

Posted: Thu Feb 15, 2007 4:41 am
by ray.wurlod
I don't think hostname is stored at the project level; only at the server level (unless you count the project's record in UV.ACCOUNT and UV_SCHEMA as being at the project level).

You can always retrieve the hostname using the operating system hostname command, probably via a call to DSExecute subroutine.

Posted: Thu Feb 15, 2007 4:46 am
by ArndW
I just got to a DS account, and it does look like the hostname returned from the DSGetProjectInfo() routine is retrieved from the entry in the UV.ACCOUNT hashed file; so deleting/re-creating the project should work.

Peter - can you create a new account and test a job with this call to see which name is returned - the old or the new?

Posted: Thu Feb 15, 2007 5:06 am
by peterbaun
Hi Arnd,

Thanks for your investigations.

This was not really what I had planned spending a lot of time on (not blaming you of course) - and one problem often leads to another it seems like. Going forward deleting the first project gave me an error when trying to delete it. However I can't really see where it is not deleted.

If I do a "select * from UV.ACCOUNTS" it is not there.

It can be mentioned that the VOC file was left in the project directory when I tried to delete it.

I don't expect this to be a support case for you !

Worst case scenario (time-wise) is that I need to re-install DataStage and re-import the projects (on three servers.... )

Regards
Peter

Posted: Thu Feb 15, 2007 5:40 am
by peterbaun
The last part about re-creating the project seemed to be a matter of I had not cleaned up the filesystem entirely where the old project resided.

About using the operating system command hostname - the idea is perfectly good, however I don't like that there is wrong information in the UV database so I will take the time to re-create the projects.

Thanks for the input.

Regards
Peter