ORA-2083 DATABASE name has illegal character '-'

2002-12-03 Thread Rick_Cale
Hi,

Oracle 8.1.6.0.0 NT 4.0

I have the following logon trigger.  It works fine as long I insert into
local table. If I try to insert into a table across a database link the
record get inserted but upon exiting the app whether it is
sqlplus,forms,etc I get ora-2083.  I think it is probably a bug since I
have exact same environment and it works Ok. It fails
on 3 other identical environments.  Anyone heard of any possible bugs using
database link in logon trigger?  I search metalink and google but
no such reported error.


DROP PUBLIC DATABASE LINK utilities_a12345_dblink;
CREATE PUBLIC DATABASE LINK utilities_a12345_dblink CONNECT TO utilities
IDENTIFIED BY 123x456x USING 'a123456';

GRANT SELECT ON v_$session TO PUBLIC;
GRANT SELECT ON v_$instance TO PUBLIC;
DROP TRIGGER login_capture;
CREATE OR REPLACE TRIGGER login_capture AFTER LOGON ON DATABASE
DECLARE
  CURSOR temp_rec IS
SELECT user AS user_name,
   NVL(UPPER(SUBSTR(osuser,1,30)),'SERVER') AS os_user_name,
   RTRIM(NVL(SUBSTR(machine,instr(machine,'\') +1,12),'SERVER'),CHR(0))
AS machine_name,
   sid AS session_id,
   serial# AS serial_no,
   SYSDATE AS logon_time,
   SYS_CONTEXT('userenv','ip_address') AS ip_address,
   NVL(SUBSTR(program,1,64),'INTERNAL') AS program_name,
   i.instance_name AS instance_name,
   i.host_name AS host_name,
   i.version AS version
FROM v$session s,v$instance i
WHERE s.username = user
AND   s.logon_time = (SELECT MAX(x.logon_time)
  FROM v$session x
  WHERE x.username = user);
BEGIN
FOR rec IN temp_rec LOOP
INSERT INTO login_history@utilities_itport02_dblink
 (user_name,
  os_user_name,
  machine_name,
  session_id,
  serial_no,
  logon_time,
  ip_address,
  program_name,
  instance_name,
  host_name,
  version)
VALUES (rec.user_name,
  rec.os_user_name,
  rec.machine_name,
  rec.session_id,
  rec.serial_no,
  rec.logon_time,
  rec.ip_address,
  rec.program_name,
  rec.instance_name,
  rec.host_name,
  rec.version);
END LOOP;
EXCEPTION
 WHEN OTHERS THEN
   NULL;
END;
/
ALTER TRIGGER login_capture ENABLE;


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




RE: ORA-2083 DATABASE name has illegal character '-'

2002-12-03 Thread DENNIS WILLIAMS
Rick - Have you tested the link itself?

Dennis Williams
DBA, 40%OCP
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Tuesday, December 03, 2002 1:10 PM
To: Multiple recipients of list ORACLE-L


Hi,

Oracle 8.1.6.0.0 NT 4.0

I have the following logon trigger.  It works fine as long I insert into
local table. If I try to insert into a table across a database link the
record get inserted but upon exiting the app whether it is
sqlplus,forms,etc I get ora-2083.  I think it is probably a bug since I
have exact same environment and it works Ok. It fails
on 3 other identical environments.  Anyone heard of any possible bugs using
database link in logon trigger?  I search metalink and google but
no such reported error.


DROP PUBLIC DATABASE LINK utilities_a12345_dblink;
CREATE PUBLIC DATABASE LINK utilities_a12345_dblink CONNECT TO utilities
IDENTIFIED BY 123x456x USING 'a123456';

GRANT SELECT ON v_$session TO PUBLIC;
GRANT SELECT ON v_$instance TO PUBLIC;
DROP TRIGGER login_capture;
CREATE OR REPLACE TRIGGER login_capture AFTER LOGON ON DATABASE
DECLARE
  CURSOR temp_rec IS
SELECT user AS user_name,
   NVL(UPPER(SUBSTR(osuser,1,30)),'SERVER') AS os_user_name,
   RTRIM(NVL(SUBSTR(machine,instr(machine,'\') +1,12),'SERVER'),CHR(0))
AS machine_name,
   sid AS session_id,
   serial# AS serial_no,
   SYSDATE AS logon_time,
   SYS_CONTEXT('userenv','ip_address') AS ip_address,
   NVL(SUBSTR(program,1,64),'INTERNAL') AS program_name,
   i.instance_name AS instance_name,
   i.host_name AS host_name,
   i.version AS version
FROM v$session s,v$instance i
WHERE s.username = user
AND   s.logon_time = (SELECT MAX(x.logon_time)
  FROM v$session x
  WHERE x.username = user);
BEGIN
FOR rec IN temp_rec LOOP
INSERT INTO login_history@utilities_itport02_dblink
 (user_name,
  os_user_name,
  machine_name,
  session_id,
  serial_no,
  logon_time,
  ip_address,
  program_name,
  instance_name,
  host_name,
  version)
VALUES (rec.user_name,
  rec.os_user_name,
  rec.machine_name,
  rec.session_id,
  rec.serial_no,
  rec.logon_time,
  rec.ip_address,
  rec.program_name,
  rec.instance_name,
  rec.host_name,
  rec.version);
END LOOP;
EXCEPTION
 WHEN OTHERS THEN
   NULL;
END;
/
ALTER TRIGGER login_capture ENABLE;


-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).




RE: ORA-2083 DATABASE name has illegal character '-'

2002-12-03 Thread Rick_Cale

Yes I have taken the insert statement out of the logon trigger and it works
fine.  I think there may be a possible bug
with logon trigger using database links.




   
  
DENNIS WILLIAMS
  
DWILLIAMS@life   To: Multiple recipients of list ORACLE-L 
[EMAIL PROTECTED]
touch.comcc:  
  
Sent by:  Subject: RE: ORA-2083 DATABASE name has 
illegal character '-'  
[EMAIL PROTECTED]
  
m  
  
   
  
   
  
12/03/2002 
  
03:14 PM   
  
Please respond 
  
to ORACLE-L
  
   
  
   
  




Rick - Have you tested the link itself?

Dennis Williams
DBA, 40%OCP
Lifetouch, Inc.
[EMAIL PROTECTED]


-Original Message-
Sent: Tuesday, December 03, 2002 1:10 PM
To: Multiple recipients of list ORACLE-L


Hi,

Oracle 8.1.6.0.0 NT 4.0

I have the following logon trigger.  It works fine as long I insert into
local table. If I try to insert into a table across a database link the
record get inserted but upon exiting the app whether it is
sqlplus,forms,etc I get ora-2083.  I think it is probably a bug since I
have exact same environment and it works Ok. It fails
on 3 other identical environments.  Anyone heard of any possible bugs using
database link in logon trigger?  I search metalink and google but
no such reported error.


DROP PUBLIC DATABASE LINK utilities_a12345_dblink;
CREATE PUBLIC DATABASE LINK utilities_a12345_dblink CONNECT TO utilities
IDENTIFIED BY 123x456x USING 'a123456';

GRANT SELECT ON v_$session TO PUBLIC;
GRANT SELECT ON v_$instance TO PUBLIC;
DROP TRIGGER login_capture;
CREATE OR REPLACE TRIGGER login_capture AFTER LOGON ON DATABASE
DECLARE
  CURSOR temp_rec IS
SELECT user AS user_name,
   NVL(UPPER(SUBSTR(osuser,1,30)),'SERVER') AS os_user_name,
   RTRIM(NVL(SUBSTR(machine,instr(machine,'\') +1,12),'SERVER'),CHR(0))
AS machine_name,
   sid AS session_id,
   serial# AS serial_no,
   SYSDATE AS logon_time,
   SYS_CONTEXT('userenv','ip_address') AS ip_address,
   NVL(SUBSTR(program,1,64),'INTERNAL') AS program_name,
   i.instance_name AS instance_name,
   i.host_name AS host_name,
   i.version AS version
FROM v$session s,v$instance i
WHERE s.username = user
AND   s.logon_time = (SELECT MAX(x.logon_time)
  FROM v$session x
  WHERE x.username = user);
BEGIN
FOR rec IN temp_rec LOOP
INSERT INTO login_history@utilities_itport02_dblink
 (user_name,
  os_user_name,
  machine_name,
  session_id,
  serial_no,
  logon_time,
  ip_address,
  program_name,
  instance_name,
  host_name,
  version)
VALUES (rec.user_name,
  rec.os_user_name,
  rec.machine_name,
  rec.session_id,
  rec.serial_no,
  rec.logon_time,
  rec.ip_address,
  rec.program_name,
  rec.instance_name,
  rec.host_name,
  rec.version);
END LOOP;
EXCEPTION
 WHEN OTHERS THEN
   NULL;
END;
/
ALTER TRIGGER login_capture ENABLE;


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services

RE: ORA-2083 DATABASE name has illegal character '-'

2002-12-03 Thread DENNIS WILLIAMS
Rick - Can you do that insert in SQL*Plus (outside the trigger)? I'm sure
you have, just my logical completeness tendency.
Dennis Williams
DBA, 40%OCP
Lifetouch, Inc.
[EMAIL PROTECTED] 


-Original Message-
Sent: Tuesday, December 03, 2002 3:09 PM
To: Multiple recipients of list ORACLE-L



Yes I have taken the insert statement out of the logon trigger and it works
fine.  I think there may be a possible bug
with logon trigger using database links.




 

DENNIS WILLIAMS

DWILLIAMS@life   To: Multiple recipients of
list ORACLE-L [EMAIL PROTECTED]
touch.comcc:

Sent by:  Subject: RE: ORA-2083 DATABASE
name has illegal character '-'  
[EMAIL PROTECTED]

m

 

 

12/03/2002

03:14 PM

Please respond

to ORACLE-L

 

 





Rick - Have you tested the link itself?

Dennis Williams
DBA, 40%OCP
Lifetouch, Inc.
[EMAIL PROTECTED]


-Original Message-
Sent: Tuesday, December 03, 2002 1:10 PM
To: Multiple recipients of list ORACLE-L


Hi,

Oracle 8.1.6.0.0 NT 4.0

I have the following logon trigger.  It works fine as long I insert into
local table. If I try to insert into a table across a database link the
record get inserted but upon exiting the app whether it is
sqlplus,forms,etc I get ora-2083.  I think it is probably a bug since I
have exact same environment and it works Ok. It fails
on 3 other identical environments.  Anyone heard of any possible bugs using
database link in logon trigger?  I search metalink and google but
no such reported error.


DROP PUBLIC DATABASE LINK utilities_a12345_dblink;
CREATE PUBLIC DATABASE LINK utilities_a12345_dblink CONNECT TO utilities
IDENTIFIED BY 123x456x USING 'a123456';

GRANT SELECT ON v_$session TO PUBLIC;
GRANT SELECT ON v_$instance TO PUBLIC;
DROP TRIGGER login_capture;
CREATE OR REPLACE TRIGGER login_capture AFTER LOGON ON DATABASE
DECLARE
  CURSOR temp_rec IS
SELECT user AS user_name,
   NVL(UPPER(SUBSTR(osuser,1,30)),'SERVER') AS os_user_name,
   RTRIM(NVL(SUBSTR(machine,instr(machine,'\') +1,12),'SERVER'),CHR(0))
AS machine_name,
   sid AS session_id,
   serial# AS serial_no,
   SYSDATE AS logon_time,
   SYS_CONTEXT('userenv','ip_address') AS ip_address,
   NVL(SUBSTR(program,1,64),'INTERNAL') AS program_name,
   i.instance_name AS instance_name,
   i.host_name AS host_name,
   i.version AS version
FROM v$session s,v$instance i
WHERE s.username = user
AND   s.logon_time = (SELECT MAX(x.logon_time)
  FROM v$session x
  WHERE x.username = user);
BEGIN
FOR rec IN temp_rec LOOP
INSERT INTO login_history@utilities_itport02_dblink
 (user_name,
  os_user_name,
  machine_name,
  session_id,
  serial_no,
  logon_time,
  ip_address,
  program_name,
  instance_name,
  host_name,
  version)
VALUES (rec.user_name,
  rec.os_user_name,
  rec.machine_name,
  rec.session_id,
  rec.serial_no,
  rec.logon_time,
  rec.ip_address,
  rec.program_name,
  rec.instance_name,
  rec.host_name,
  rec.version);
END LOOP;
EXCEPTION
 WHEN OTHERS THEN
   NULL;
END;
/
ALTER TRIGGER login_capture ENABLE;


--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author:
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: DENNIS WILLIAMS
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL PROTECTED] (note EXACT spelling of 'ListGuru') and in
the message BODY, include a line containing: UNSUB ORACLE-L
(or the name of mailing list you want to be removed from).  You may
also send the HELP command for other information (like subscribing).





-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: 
  INET: [EMAIL PROTECTED]

Fat City Network Services-- 858-538-5051 http://www.fatcity.com
San Diego, California-- Mailing list and web hosting services
-
To REMOVE yourself from this mailing list, send an E-Mail message
to: [EMAIL