Re: Need help for remote connection
Posted in 1999
Topics: Connectivity: ESQL/C, 4GL & Embedded SQL, Server Administration, Security, Permissions & Auditing, Networking & sqlhosts Configuration, Platform-Specific Issues, Versions, Editions & End-of-Life
If youhave problems setting up hosts.equiv you may create
just an .rhosts file in the user home directory and list there
the trusted host. Don't forget to set thepermissions on this .rhosts
file to 600.
Best Regards,
Octav
Sanjeev Sagar wrote:
>
> You are absolutely right. I did changed my sqlhosts entry on production box
> like
>
> sopp1 onipcshm sopsnp01 dummy1
> sopp1_tcp ontlitcp sopsnp01 sopp1_tcp
> dbap1 onipcshm sopsnp01 dummy12
> dbap1_tcp ontlitcp sopsnp01 dbap1_tcp
> sopd2_tcp ontlitcp sopsnd01 sopd2_tcp>
> One more thing, the port# for sopd2_tcp (in /etc/services) should be same, the
> one which I defined on sopsnd01 hosts, It did not worked for me when the port#
> (/etc/services) were different. Anyway now I have one more problem in the same
> stream of remote connection.
>
> I am able to connect to production box through dbacces connect statement and I
> can see my production tables but when I do
>
> prompt > select count(*) from <devdb>@sopd2_tcp:<table_on_dev> It gave me
> error
>
> 956: Client host or user (informix@sopsnp01) is not trusted by the server.>
> In oreder to do more check I went on production box and try to connect to
> development
>
> INFORMIXSERVER=sopd2_tcp dbaccess - -> > connect to '<devdb>' user 'informix';
> ENTER PASSWORD
> > connected ---worked fine but
>
> > select count(*) from <prddb>@sopp1_tcp:<table_on_prd>;>
> gave me same error
>
> 956: Client host or user (informix@sopsnd01) is not trusted by the server.>
> If I checked the 956 error, It tells me that I need to put the entries with
> the user name in /etc/hosts.equiv and rhosts file. That is something is not
> easy for me b'coz I have to go for system security department to approve this.
> Anyway
>
> I need to know If I am correct then what kind of chenges I need to have in
> /etc/hosts.equiv file on both the hosts. We do not maintained rhosts files. Do
> I have to create the rhosts file also OR there is some way to avoid
> /etc/hosts.equiv & rhosts files.
>
> I appreciate your efforts.
>
> Thanks
>
> Sanjeev K. Sagar
>
> Octav Chiriac wrote:
>
> > erro -931 states that server couldn't localte a service in /etc/services.
> > And I think it is right since you have specified dummy2 as the service
> > name for sopd2 server on production system. First of all I'd
> > advise you to use the same server name on production system and
> > development system, i.e., you have to define the server sopd2_tcp
> > on production server (not sopd2, wich is a ipcshm connection on
> > development server). Then you have to check you've added sopd2_tcp
> > to /etc/services on production system.
> >
> > Best Regards,
> > Octav
> >
> > On Mon, Nov 15, 1999 at 05:24:38PM -0600, Sanjeev Sagar wrote:
> > >
> > > I am having two hosts running IDS 7.31.UC2 on Solaris 2.5.1.
> > >
> > > hosts 1. sopsnp01[production]- sqlhosts contents
> > >
> > > sopp1 onipcshm sopsnp01 dummy1
> > > sopp1_tcp ontlitcp sopsnp01 sopp1_tcp
> > > dbap1 onipcshm sopsnp01 dummy12
> > > dbap1_tcp ontlitcp sopsnp01 dbap1_tcp> > > sopd2 ontlitcp sopsnd01 dummy2 --Added for remote
> > connection testing
>
> >
> > > hosts 2. sopsnd01[Development] - sqlhosts contents [note- this machine
> > > has 3 instances, 1 instance has the same informixserver name as
> > > production i.e. sopp1, in order to do rstore of last month data on
> > > development box. But I did take care of this thing in sqlhosts file for
> > > remote connection like following
> > >
> > > sopd2 onipcshm sopsnd01 dummy2
> > > sopd2_tcp ontlitcp sopsnd01 sopd2_tcp
> > > dbad1 onipcshm sopsnd01 dummy21
> > > dbad1_tcp ontlitcp sopsnd01 dbad1_tcp
> > > sopp1 onipcshm sopsnd01 dummy1
> > > #sopp1_tcp ontlitcp sopsnd01 sopp1_tcp> > > sopp1_tcp ontlitcp sopsnp01 sopp1_tcp --This I added
> > > for remote connection
> > >
> > > Cuurrent Environment : INFORMIXSERVER=sopd2 on sopsnd01 [Development
> > > machine].
> > >
> > > >From here I have to connect to sopp1 on sopsnp01[Production Box] and
> > > insert some records from sopd2:<table_on_dev> to sopp1:<table_on_prd>
> > >
> > > I did following
> > >
> > > prompt > INFORMIXSERVER=sopp1_tcp dbaccess - -
> > > > connect to 'sp1bill' user 'informix';
> > > Here dbaccess prompt for password
> > > > connected
> > > which is right, I can see my production tables here. My
> > > main aim of connection is to insert records form Dev
> > >
> > > > delete from <table_on_prd> ; --Executed successfully
> > >
> > > > insert into <table_on_prd> select * from
> > > <dbname>@sopd2:<owner>.<table_on_dev>;
> > >
> > > It gives me following error
> > >
> > > 908: Attempt to connect to database server (sopd2,
> > > conerr=-931, oserr=0) failed.
> > > Error in line 1
> > > Near character position 45> > >
> > > Even if I say
> > > > select count(*) from> > > <dbname>@sopd2:<owner>.<table_on_dev>;
> > > It gave same error
> > >
> > > Am I missing something or It is not possible through dbaccess to have
> > > this kind of operation. I do not have ESQLC or I4gl
> > > but does it possible throught ESQLC. I checked manual, It talk about
> > > "connect to <remote> as with concurrent transaction"
> > > Does this tell that It is possible in ESQLC not in DBACCESS. I can not
> > > afford luxury of ESQLC b'coz I do not have it
> > >
> > > I will highly appreciate if someone can help.
> > >
> > > Thanks
> > >
> > >
> > >
> > >
> >
> > --
> > Octav Chiriac Phone: (373) 2 22 99 67
> > NetInfo S.R.L. Fax: (373) 2 21 36 59
> > Chisinau (373) 2 22 84 88
> > Moldova, Republic of mailto:com@netinfo-moldova.com
--
Octav Chiriac Phone: (373) 2 22 99 67
NetInfo S.R.L. Fax: (373) 2 21 36 59
Chisinau (373) 2 22 84 88
Moldova, Republic of mailto:com@netinfo-moldova.com
Thanks Octav, This idea worked.
Sanjeev K. Sagar
Octav Chiriac wrote:
> If youhave problems setting up hosts.equiv you may create
> just an .rhosts file in the user home directory and list there
> the trusted host. Don't forget to set thepermissions on this .rhosts
> file to 600.
>
> Best Regards,
> Octav
>
> Sanjeev Sagar wrote:
> >
> > You are absolutely right. I did changed my sqlhosts entry on production box
> > like
> >
> > sopp1 onipcshm sopsnp01 dummy1
> > sopp1_tcp ontlitcp sopsnp01 sopp1_tcp
> > dbap1 onipcshm sopsnp01 dummy12
> > dbap1_tcp ontlitcp sopsnp01 dbap1_tcp
> > sopd2_tcp ontlitcp sopsnd01 sopd2_tcp> >
> > One more thing, the port# for sopd2_tcp (in /etc/services) should be same, the
> > one which I defined on sopsnd01 hosts, It did not worked for me when the port#
> > (/etc/services) were different. Anyway now I have one more problem in the same
> > stream of remote connection.
> >
> > I am able to connect to production box through dbacces connect statement and I
> > can see my production tables but when I do
> >
> > prompt > select count(*) from <devdb>@sopd2_tcp:<table_on_dev> It gave me
> > error
> >
> > 956: Client host or user (informix@sopsnp01) is not trusted by the server.> >
> > In oreder to do more check I went on production box and try to connect to
> > development
> >
> > INFORMIXSERVER=sopd2_tcp dbaccess - -> > > connect to '<devdb>' user 'informix';
> > ENTER PASSWORD
> > > connected ---worked fine but
> >
> > > select count(*) from <prddb>@sopp1_tcp:<table_on_prd>;> >
> > gave me same error
> >
> > 956: Client host or user (informix@sopsnd01) is not trusted by the server.> >
> > If I checked the 956 error, It tells me that I need to put the entries with
> > the user name in /etc/hosts.equiv and rhosts file. That is something is not
> > easy for me b'coz I have to go for system security department to approve this.
> > Anyway
> >
> > I need to know If I am correct then what kind of chenges I need to have in
> > /etc/hosts.equiv file on both the hosts. We do not maintained rhosts files. Do
> > I have to create the rhosts file also OR there is some way to avoid
> > /etc/hosts.equiv & rhosts files.
> >
> > I appreciate your efforts.
> >
> > Thanks
> >
> > Sanjeev K. Sagar
> >
> > Octav Chiriac wrote:
> >
> > > erro -931 states that server couldn't localte a service in /etc/services.
> > > And I think it is right since you have specified dummy2 as the service
> > > name for sopd2 server on production system. First of all I'd
> > > advise you to use the same server name on production system and
> > > development system, i.e., you have to define the server sopd2_tcp
> > > on production server (not sopd2, wich is a ipcshm connection on
> > > development server). Then you have to check you've added sopd2_tcp
> > > to /etc/services on production system.
> > >
> > > Best Regards,
> > > Octav
> > >
> > > On Mon, Nov 15, 1999 at 05:24:38PM -0600, Sanjeev Sagar wrote:
> > > >
> > > > I am having two hosts running IDS 7.31.UC2 on Solaris 2.5.1.
> > > >
> > > > hosts 1. sopsnp01[production]- sqlhosts contents
> > > >
> > > > sopp1 onipcshm sopsnp01 dummy1
> > > > sopp1_tcp ontlitcp sopsnp01 sopp1_tcp
> > > > dbap1 onipcshm sopsnp01 dummy12
> > > > dbap1_tcp ontlitcp sopsnp01 dbap1_tcp> > > > sopd2 ontlitcp sopsnd01 dummy2 --Added for remote
> > > connection testing
> >
> > >
> > > > hosts 2. sopsnd01[Development] - sqlhosts contents [note- this machine
> > > > has 3 instances, 1 instance has the same informixserver name as
> > > > production i.e. sopp1, in order to do rstore of last month data on
> > > > development box. But I did take care of this thing in sqlhosts file for
> > > > remote connection like following
> > > >
> > > > sopd2 onipcshm sopsnd01 dummy2
> > > > sopd2_tcp ontlitcp sopsnd01 sopd2_tcp
> > > > dbad1 onipcshm sopsnd01 dummy21
> > > > dbad1_tcp ontlitcp sopsnd01 dbad1_tcp
> > > > sopp1 onipcshm sopsnd01 dummy1
> > > > #sopp1_tcp ontlitcp sopsnd01 sopp1_tcp> > > > sopp1_tcp ontlitcp sopsnp01 sopp1_tcp --This I added
> > > > for remote connection
> > > >
> > > > Cuurrent Environment : INFORMIXSERVER=sopd2 on sopsnd01 [Development
> > > > machine].
> > > >
> > > > >From here I have to connect to sopp1 on sopsnp01[Production Box] and
> > > > insert some records from sopd2:<table_on_dev> to sopp1:<table_on_prd>
> > > >
> > > > I did following
> > > >
> > > > prompt > INFORMIXSERVER=sopp1_tcp dbaccess - -
> > > > > connect to 'sp1bill' user 'informix';
> > > > Here dbaccess prompt for password
> > > > > connected
> > > > which is right, I can see my production tables here. My
> > > > main aim of connection is to insert records form Dev
> > > >
> > > > > delete from <table_on_prd> ; --Executed successfully
> > > >
> > > > > insert into <table_on_prd> select * from
> > > > <dbname>@sopd2:<owner>.<table_on_dev>;
> > > >
> > > > It gives me following error
> > > >
> > > > 908: Attempt to connect to database server (sopd2,
> > > > conerr=-931, oserr=0) failed.
> > > > Error in line 1
> > > > Near character position 45> > > >
> > > > Even if I say
> > > > > select count(*) from> > > > <dbname>@sopd2:<owner>.<table_on_dev>;
> > > > It gave same error
> > > >
> > > > Am I missing something or It is not possible through dbaccess to have
> > > > this kind of operation. I do not have ESQLC or I4gl
> > > > but does it possible throught ESQLC. I checked manual, It talk about
> > > > "connect to <remote> as with concurrent transaction"
> > > > Does this tell that It is possible in ESQLC not in DBACCESS. I can not
> > > > afford luxury of ESQLC b'coz I do not have it
> > > >
> > > > I will highly appreciate if someone can help.
> > > >
> > > > Thanks
> > > >
> > > >
> > > >
> > > >
> > >
> > > --
> > > Octav Chiriac Phone: (373) 2 22 99 67
> > > NetInfo S.R.L. Fax: (373) 2 21 36 59
> > > Chisinau (373) 2 22 84 88
> > > Moldova, Republic of mailto:com@netinfo-moldova.com
>
> --
> Octav Chiriac Phone: (373) 2 22 99 67
> NetInfo S.R.L. Fax: (373) 2 21 36 59
> Chisinau (373) 2 22 84 88
> Moldova, Republic of mailto:com@netinfo-moldova.com