Question : SQL Query using SQL Plus in Oracle 10g

Hi,

I am running following query in sql plus:

set colsep ',' pagesize 0 trimspool on feedback off echo off
spool sample.csv
SELECT ip.first_name|| ',' ||ip.last_name|| ',' ||ipd.loginuid|| ',' ||sd.name|| ',' ||atk.serial_number|| ',' ||atk.token_type|| ',' ||to_char(atk.token_shutdown_date,'MM-DD-YYYY')
   FROM rsa_rep.ims_principal ip,  
                        rsa_rep.ims_principal_data ipd,  
                  rsa_rep.am_token atk,  
                  rsa_batchrep.am_token_oob ato,  
                  rsa_rep.ims_identity_source isrc,  
                        rsa_rep.ims_security_domain sd  
             WHERE ipd.id = atk.principal_id  
               AND ipd.identity_src_id=isrc.id  
               AND atk.id = ato.am_token_id  
                     AND ipd.owner_id = sd.id  
                     AND ipd.identity_src_key = ip.id(+);
spool off

The output i am getting is attached as sample.csv.

Now my question is as follows:

I want to pull out the group name of the user in this query. It is stored in probably in  IMS_PRINCIPAL_GROUP and this table is linked to IMS_GROUP or IMS_GROUP_DATA. (Please refer to attached Database Schema html page. I am having hard time to establish proper relationship between this tables. I tried some modification in above query which are as follows:

SELECT ip.first_name|| ',' ||ip.last_name|| ',' ||ipd.loginuid|| ',' ||sd.name|| ',' ||atk.serial_number|| ',' ||atk.token_type|| ',' ||gd.name|| ',' ||to_char(atk.token_shutdown_date,'MM-DD-YYYY')
             FROM rsa_rep.ims_principal ip,  
              rsa_rep.ims_principal_data ipd,  
                  rsa_rep.am_token atk,  
                  rsa_batchrep.am_token_oob ato,  
                  rsa_rep.ims_identity_source isrc,  
              rsa_rep.ims_security_domain sd,
                  rsa_rep.ims_group gd,
                  rsa_rep.ims_group_data gdd,
                  rsa_rep.ims_principal_group gds
            WHERE ipd.id = atk.principal_id  
              AND ipd.identity_src_id=isrc.id  
              AND atk.id = ato.am_token_id  
              AND ipd.owner_id = sd.id
              AND ipd.identity_src_key = gds.principal_id
            AND gds.group_id = gd.id
            AND ipd.identity_src_key = ip.id(+);

But the result is 0 rows. I am pretty sure i am doing something wrong in relationship part of query. Can you please help me...
Attachments:
 
Output of Original Query in CSV format
 
 
Database Schema Document
 

Answer : SQL Query using SQL Plus in Oracle 10g

version 9.14 of the IOS is absolutely obsolete (it was already in decline when I started working on cisco devices, 15 years ago). anyway, the current configuration can be displayed with

write terminal

and the startup config can be loaded with
config mem
write terminal

Try to use  hyperterminal with flowcontrol "hardware or "CTS/RTS"
Random Solutions  
 
programming4us programming4us