Thanks: I think that Datatools must be doing something that is not obvious
to me. What I want to do is to have 2 threads in a single process
communicate with ADSM. I understand that many users can concurrently
connect to a server, but they are all different processes even if they are
all on the same CPU.
What I did follows:
The output from a test was:
Session 1 has handle <1>
ADSM ERROR : 2041 - ANS0238E (RC2041) The sequence of calls is invalid.
What caught my attention and made me think that thi is possible is that the
Init API includes a handle.
The test app I wrote follows:
#include "dsmrc.h" /* Adsm Result Code */
#include "dsmapitd.h" /* ADSM API type definitions */
#include "dsmapifp.h" /* ADSM API function prototypes. */
#include <stdio.h>
#include <stdlib.h>
#include <unistd.h>
uint32 m_lHandle[2];
dsmApiVersion m_DsmApiVer[2];
dsmApiVersion m_ApiLibVer;
char m_szErrorStr[250];
int m_lError;
main() {
memset(&m_ApiLibVer,0x00,sizeof( dsmApiVersion ));
/* dsmQueryApiVersion(&m_ApiLibVer);
*/
m_DsmApiVer[0].version = DSM_API_VERSION ;
m_DsmApiVer[0].release = DSM_API_RELEASE ;
m_DsmApiVer[0].level = DSM_API_LEVEL ;
m_DsmApiVer[1].version = DSM_API_VERSION ;
m_DsmApiVer[1].release = DSM_API_RELEASE ;
m_DsmApiVer[1].level = DSM_API_LEVEL ;
m_lError = dsmInit( &m_lHandle[0],
&m_DsmApiVer[0],
"IMAGES",
"ADMIN",
"ADMIN",
"RMS",
"/RMS1/app/adsm/Images.opt",
NULL );
if (m_lError) {
dsmRCMsg(m_lHandle[0], m_lError, m_szErrorStr);
printf( "ADSM ERROR : %d - %s\n", m_lError, m_szErrorStr );
sleep (60);
return 0;
}
printf ("Session 1 has handle <%d> \n",m_lHandle[0]);
m_lError = dsmInit( &m_lHandle[1],
&m_DsmApiVer[1],
"IMAGES",
"ADMIN",
"ADMIN",
"RMS",
"/RMS1/app/adsm/Images.opt",
NULL );
if (m_lError) {
dsmRCMsg(m_lHandle[1], m_lError, m_szErrorStr);
printf( "ADSM ERROR : %d - %s\n", m_lError, m_szErrorStr );
sleep (60);
return 0;
}
printf ("Session 2 has handle <%d> \n",m_lHandle[1]);
sleep(30);
}
At 10:14 AM 1/14/97 -0800, you wrote:
>Chris,
>I am sure you can do that. We use SQL-BACKTRACK from Datatools which is an
>API interface to adsm to backup sybase databases. This product kicks off
>multiple sessions for multiple db backups. In fact, one can also start up
>multiple line command and/or gui sessions on the same node.
>
>At 09:57 AM 1/14/97 -0500, you wrote:
>>I am using version 2.1 on AIX 4.1 and need to know if it is possible to have
>>more than one session to the ADSM server? (I am using the API) What I want
>>to do is to have multiple threads, each one with a session to ADSM. The
>>purpose for doing this is so that a parent thread can use more than one
>>session to do parallel retrieves as we have many tape drives. Without this,
>>the retrieves are serially performed and the multiple drives are of little
>>benefit.
>>
>>Any info would be greatly appreciated
>>
>>Regards, Chris
>>----------------------------------------------------------
>>Chris Hopkins cjhopkin AT on.bell DOT ca
>>Sr. System Designer
>>Highway 407 Electronic Toll Collection System
>>Bell Sygma Telecom Solutions
>>Toronto: (416) 215-2910
>>Ottawa: (613) 781-4544
>>----------------------------------------------------------
>>
>>
>
>Have a nice day or whatever's left of it.
>
>David Ong
>National Semiconductor Corp.
>
>
----------------------------------------------------------
Chris Hopkins cjhopkin AT on.bell DOT ca
Chris Hopkins cjhopkin AT on.bell DOT ca
Sr. System Designer
Highway 407 Electronic Toll Collection System
Bell Sygma Telecom Solutions
Toronto: (416) 215-2910
Ottawa: (613) 781-4544
----------------------------------------------------------
=========================================================================
|