unable to run the bteq script on sun Unix os.

Tools
Enthusiast

unable to run the bteq script on sun Unix os.

Hi all,

I am trying to run the below mentioned script. It works fine in AIX unix box but in Sun Unix box, an error
occurs:

test.sh: bteq: execute permission denied

could you please tell me how i can resolve this problem?

FUNC_VALIDATE_ENTRIES()
{

bteq<<-END

.logon DemoTd/User1,******;

.export report file=VALIDATE_FILE.sol
select distinct DatabaseName from dbc.Tables where DatabaseName = 'USER1';
.if ACTIVITYCOUNT > 0 then .goto labelC
select 5;
.goto labelD
.label labelC
select 0;
.label labelD
.export reset
.quit errorcode
.LOGOFF
END
}

FUNC_VALIDATE_ENTRIES

thanks
2 REPLIES
Enthusiast

Re: unable to run the bteq script on sun Unix os.

That's normally given by unix if the user does not have execute permission on the executable... so check the permissions on the bteq executable and make sure the unix user id you are using has execute permissions for it.

ls -ltr $(which bteq)
Enthusiast

Re: unable to run the bteq script on sun Unix os.

I found the problem is with connectivity b/w Unix and teradata. Teradata Client is installed on Pc but Unix is not connected to Teradata.

could anyone help me in making this connection.what are the things necessary for this connection? I have already included teradata server host string in Unix Hosts file, But didnt find any teradata utility connectivity to Unix.

Thanks and regards,
Kunal