- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- remsh problem
Categories
Company
Local Language
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Forums
Discussions
Discussions
Discussions
Forums
Discussions
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
- BladeSystem Infrastructure and Application Solutions
- Appliance Servers
- Alpha Servers
- BackOffice Products
- Internet Products
- HPE 9000 and HPE e3000 Servers
- Networking
- Netservers
- Secure OS Software for Linux
- Server Management (Insight Manager 7)
- Windows Server 2003
- Operating System - Tru64 Unix
- ProLiant Deployment and Provisioning
- Linux-Based Community / Regional
- Microsoft System Center Integration
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Discussion Boards
Community
Resources
Forums
Blogs
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 03:39 AM
04-01-2004 03:39 AM
remsh problem
remsh is having problem to connect to the ORACLE database when we use remsh in "c" program.
remsh works fine if we use shall script to connect to the database. Command line also works fine.
ORACLE and HP passing bucks onto each other.
Can anyone has any tips or hint?
C program is using oracle "C" libraries.
We have applied latest remsh patch. Is it remsh problem?
We are testing ORACLE 9i upgrade.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 03:57 AM
04-01-2004 03:57 AM
Re: remsh problem
I can't imagine why you would be using remsh for this when Pro/C is made to do exactly this with much greater power and flexibility.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 04:13 AM
04-01-2004 04:13 AM
Re: remsh problem
The reason I cannot define the problem properly is I am not a "C" programmer. Anyway we are using the PRO/C program to connect to the database which is failing. Oracle sent us a sample program for the test purpose it does not work. This PRO/C program usese the "remsh" to connect to the remote host. Here is the sample program oracle sent to connect to the database remotely which does not work.
---------------------------------------
#include
#include
#include
/* Declare variables. No declare section is
needed if MODE=ORACLE. */
#include
#define UNAME_LEN 20
#define PWD_LEN 40
VARCHAR username[UNAME_LEN]; /* VARCHAR is an Oracle-supplied struct */
varchar password[PWD_LEN]; /* varchar can be in lower case also. */
/* Declare error handling function. */
void sql_error(msg)
char *msg;
{
char err_msg[128];
size_t buf_len, msg_len;
EXEC SQL WHENEVER SQLERROR CONTINUE;
printf("\n%s\n", msg);
buf_len = sizeof (err_msg);
sqlglm(err_msg, &buf_len, &msg_len);
printf("%.*s\n", msg_len, err_msg);
EXEC SQL ROLLBACK RELEASE;
exit(EXIT_FAILURE);
}
void main(int argc, char *argv[])
{
char db_user[32] , db_passwd[32] , ic_server[32] ;
char temp_char[32];
int v_emp;
char *user = argv[2] ;
char *passwd = argv[3] ;
char *server = argv[1];
FILE *fp;
strcpy(db_user , user );
strcpy(db_passwd , passwd );
strcpy(ic_server , "DEVL" );
if ((fp=fopen("/home/batch/devbin/test.ora", "w"))==NULL)
{
printf("Exiting program. Log file open failure\n");
exit(-1);
}
fb_setenv(ic_server, fp);
/* Connect to ORACLE--
* Copy the username into the VARCHAR.
*/
strncpy((char *) username.arr, "PRODDBO", UNAME_LEN);
/* Set the length component of the VARCHAR. */
username.len =
(unsigned short) strlen((char *) username.arr);
/* Copy the password. */
strncpy((char *) password.arr, "devldbo" , PWD_LEN);
password.len =
(unsigned short) strlen((char *) password.arr);
/* Register sql_error() as the error handler. */
EXEC SQL WHENEVER SQLERROR DO fb_sql_error("ORACLE error--\n", fp);
/* Connect to ORACLE. Program will call sql_error()
* if an error occurs when connecting to the default database.
*/
fprintf(fp, "Connected to Oracle using -%s-%s-%s-\n", db_user, db_passwd, ic_server);
fprintf(fp, "Before Connect ...\n");
fprintf(fp, "EXEC SQL CONNECT %s IDENTIFIED BY %s USING %s\n", username.arr, password.arr, ic_server) ;
fflush(fp);
EXEC SQL CONNECT :username IDENTIFIED BY :password USING :ic_server;
fprintf(fp, "Connected to Oracle using %s %s %s\n", db_user, db_passwd, ic_server);
/* Disconnect from ORACLE. */
EXEC SQL COMMIT WORK RELEASE;
fclose(fp);
exit(EXIT_FAILURE);
}
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 04:37 AM
04-01-2004 04:37 AM
Re: remsh problem
In any event, this is not a "remsh" problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 05:06 AM
04-01-2004 05:06 AM
Re: remsh problem
Anil
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 05:30 AM
04-01-2004 05:30 AM
Re: remsh problem
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-01-2004 06:05 PM
04-01-2004 06:05 PM
Re: remsh problem
Please post the error message while you run this program then we can suggest solutions . Also pls check if you have installed Oralce 9i pathc number 3065127 .Pls see the atached file for the details of the patch . Check your trace file of the oracle if it had reported ORA-7445 error message . These all things are related HP- compiler problem for any compiler invoked oracle activities .
Thanx
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
04-02-2004 04:53 AM
04-02-2004 04:53 AM
Re: remsh problem
This what HP found after running "tusc" utility on the sample PRO/C program.
----------------------------------------
As shown by the information below, when the program is executed through remsh, the program is receiving a fb_sql_err.
22765] write(1, "i n f b _ s e t e n v \n".., 141) = 141
[22765] write(4, " f b _ s q l _ e r r o r : ".., 79) = 79
[22765] exit(1) .......................................... WIFEXITED(1)
[22764] waitpid(-1, WIFEXITED(1), WUNTRACED) ............. = 22765
[22764] sigvec(SIGCLD, 0x77ff0b90, 0x77ff0ba0) ........... = 0
[22764] sigprocmask(SIG_SETMASK, 0x77ff0b98, 0x77ff0bb8) . = 0
[22764] sigprocmask(SIG_SETMASK, 0x77ff0bb8, 0x77ff0b98) . = 0
[22764] exit(1) .......................................... WIFEXITED(1)
[22763] select(8, 0x781e45ac, NULL, NULL, NULL) .......... = 1
[22763] Received signal 18, SIGCLD, in read(), [caught], no siginfo
Per our conversation, this is about the time that the program /users/batch/work/nsk1 is trying to connect to local host through remsh. According to meta-link(Oracle) the tnslistner needs to be configured to support local loop back. As shown by the
data below, it appears that you need to have local host configured in the TNS listener.
SNST UKIM02.UK.ORACLE.COM
UKIM02 138.3.33.102
UKMVS1 138.3.33.102
LOOPBACK 127.0.0.1
lOCALHOST 127.0.0.1
We don't seem to be using a host file at all.
In DNRSLCxx we have:
UK.ORACLE.COM.
ORACLE.COM
.
You should contact Oracle to help setup the TNS Listener.