- Community Home
- >
- Servers and Operating Systems
- >
- Operating Systems
- >
- Operating System - HP-UX
- >
- Re: Need to send message to connected SQL sessions
Operating System - HP-UX
1753826
Members
8695
Online
108805
Solutions
Forums
Categories
Company
Local Language
юдл
back
Forums
Discussions
Forums
- Data Protection and Retention
- Entry Storage Systems
- Legacy
- Midrange and Enterprise Storage
- Storage Networking
- HPE Nimble Storage
Discussions
Discussions
Discussions
Forums
Forums
Discussions
юдл
back
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
Discussion Boards
Discussion Boards
Blogs
Information
Community
Resources
Community Language
Language
Forums
Blogs
Topic Options
- 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-24-2003 07:08 PM
тАО04-24-2003 07:08 PM
Need to send message to connected SQL sessions
Hi,
Before shutdown or anytime if I want to send message to connected SQL sessions, how can I do ?
Assume that some users connected from windows, some from Unix.
How can we send messages to all connected sessions. From which Oracle userid we have to run the script,
please provide me the script.
Thanks
R.Ezhil
Before shutdown or anytime if I want to send message to connected SQL sessions, how can I do ?
Assume that some users connected from windows, some from Unix.
How can we send messages to all connected sessions. From which Oracle userid we have to run the script,
please provide me the script.
Thanks
R.Ezhil
3 REPLIES 3
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-27-2003 11:14 PM
тАО04-27-2003 11:14 PM
Re: Need to send message to connected SQL sessions
Oracle does not provide any way to do this and I can't think of any way to add it.
In any case, while some of the Oracle sessions may be interactive users who can receive messages, there may be other batch sessions, and sending a message to these would be meaningless.
At the unix level you could possibly identify users using ps and grep, but then again if you have more than one database on the same box, you would have to be very careful to pick out the required sessions.
Sorry I can't give any better news ;-(
--Graham
In any case, while some of the Oracle sessions may be interactive users who can receive messages, there may be other batch sessions, and sending a message to these would be meaningless.
At the unix level you could possibly identify users using ps and grep, but then again if you have more than one database on the same box, you would have to be very careful to pick out the required sessions.
Sorry I can't give any better news ;-(
--Graham
Computers make it easier to do a lot of things, but most of the things they make it easier to do don't need to be done.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2003 12:17 AM
тАО04-28-2003 12:17 AM
Re: Need to send message to connected SQL sessions
well I never cross any oracle sql command to broadcast a message to user.On unix you can used wall or write command - provide you know user tty.
sorry couldn't be any help.
regards
mB
sorry couldn't be any help.
regards
mB
There are three person in my team-Me ,myself and I.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
тАО04-28-2003 12:35 AM
тАО04-28-2003 12:35 AM
Re: Need to send message to connected SQL sessions
hi,
There is no broadcast facility like that. The clients connected to Oracle are vast and varied. What would it mean to broadcast to an application server? A client connected via sqlplus? Or forms?
Two things that can be done:
A. Using DBMS_ALERT
The client itself MUST be listening for such a message which could be sent using DBMS_ALERT (but not via DBMS_PIPES). DBMS_ALERT is a "broadcast" method (but the client must check and then display the message -- so SQLPlus would never participate in this). DBMS_PIPE is a point to point conversation.
The "dba" would just "exec dbms_alert.signal( 'some_alert', 'some_message' );" but if no one was listening to him, it would not matter. Each and every client would have had to of issued:
dbms_alert.register( 'some_alert' );
upon connecting and would periodically have to issue:
dbms_alert.waitone( .... );
to see if a message had been sent. There are asyncronous callbacks available in OCI (Oracles C Call level interface) but not in general.
B. Provided that:
- your clients are on Windows
- your network topology allows
- your IT-policy allows
(etc...)
you might want to try this:
select 'NET SEND '||machine||' Please log out from immediately! Administrator.' from v$session where type='USER';
...or if you want to use e.g. NT-usernames, use OSUSER instead of MACHINE.
Copy the result and paste it into command prompt. Users will see your message in a popup dialog box.
This works only in some specific environments, but I have used it successfully in several offices. Likewise, I have used this technique in several other scripts to dynamically build DML commands before issuing them.
hope this helps!
Yogeeraj
There is no broadcast facility like that. The clients connected to Oracle are vast and varied. What would it mean to broadcast to an application server? A client connected via sqlplus? Or forms?
Two things that can be done:
A. Using DBMS_ALERT
The client itself MUST be listening for such a message which could be sent using DBMS_ALERT (but not via DBMS_PIPES). DBMS_ALERT is a "broadcast" method (but the client must check and then display the message -- so SQLPlus would never participate in this). DBMS_PIPE is a point to point conversation.
The "dba" would just "exec dbms_alert.signal( 'some_alert', 'some_message' );" but if no one was listening to him, it would not matter. Each and every client would have had to of issued:
dbms_alert.register( 'some_alert' );
upon connecting and would periodically have to issue:
dbms_alert.waitone( .... );
to see if a message had been sent. There are asyncronous callbacks available in OCI (Oracles C Call level interface) but not in general.
B. Provided that:
- your clients are on Windows
- your network topology allows
- your IT-policy allows
(etc...)
you might want to try this:
select 'NET SEND '||machine||' Please log out from
...or if you want to use e.g. NT-usernames, use OSUSER instead of MACHINE.
Copy the result and paste it into command prompt. Users will see your message in a popup dialog box.
This works only in some specific environments, but I have used it successfully in several offices. Likewise, I have used this technique in several other scripts to dynamically build DML commands before issuing them.
hope this helps!
Yogeeraj
No person was ever honoured for what he received. Honour has been the reward for what he gave (clavin coolidge)
The opinions expressed above are the personal opinions of the authors, not of Hewlett Packard Enterprise. By using this site, you accept the Terms of Use and Rules of Participation.
News and Events
Support
© Copyright 2024 Hewlett Packard Enterprise Development LP