PL/SQL :: How To Get Client Machine Name And Client User Name
Dec 25, 2012
the trigger shown below is working fine.But i want to get client machine name and client osuser name in the output of the same trigger shown below,how can i achieve this in the same trigger?
the output showing sessionid,date,db user name,host as local server machine name.but i want client machine name and client osuser names as u all know clients login to database from their machines.
I have installed oracle 10g on Red Hat Linux and I am able to connect as well.The listener and DB is up and running and I am able to coonect as well from the server.
But I have installed the oracle client (TOAD) on some windows machine and from there I am not able to connect . I am directly connecting by giving IP and other details and using TNS as well but I am not able to connect from client machine. I am getting ORA 12170 - TNS timeout error.
On cliente/server, I used to get the user IP address using SYS_CONTEXT and IP_ADDRESS, and the terminal name with SYS_CONTEXT and HOST.But in web environment, these functions returned Server IP and name.I have to build a trigger to obtain the information of user IP address and terminal name to save on audit table.
I have some client RMAN backups from an AIX machine, a set of .bkp files including the control file, that I have been asked to restore on a Windows 2003 server. My first question is if such a restore is possible?Also, the backups are from Oracle 10.2.0.3, and I need to restore them to 11g, will this cause any complications?
how to carry out such a restore procedure from scratch.
I want to read all the files present in a directory of client's machine.
However I have achieved this by creating java class in database but the problem is it accesses the directory of machine on which database is installed not the client's machine.
I have oracle client and I tried to access local directory of client's machine to read all the files in that directory but it didn't work.
However, I achieved this by creating one java class for ex. test.class and I run it locally through command prompt but I want to achieve it using Pl-sql.
I have client and database on same machine, when I will connect to the instance , it will use IPC, suppose If I will use connection string then which process will handle this request?
Is it also possible to use the EXPORT and IMPORT utilities from a client machine? I want to give these utilities to one of my developers without allowing him to sit in front of my Oracle server.
i am generating report from oracle forms using web.show_document .pdf output is coming in seperate url.entire piece of code is working fine.now i want to store this pdf out put in client machine whether path will be specified by user.
I have Oracle 11g database home in my 64 bit Windows 7 machine. However, now i would like to install Oracle 10.2.0 client as well. I tried giving a separate location.
But for some reason, whenever i start the Setup and run the Administrator Type, the installation just skips without giving any errors. It just creates the inventory folder in the specified path. It goes to the Product-Specific Prerequisite Checks and exits without giving any warnings or errors.
I recently got a new PC at work which is Windows 7 64 bit.
We run lots of crystal reports(1000's) that pull data from an oracle back end.
I have installed the Oracle Client 32 bit on this machine and have no problem connecting to the database and pulling back data.
However, when I use crystal to access the TNS Name it gives me the following error.
[URL]
My path variable on the PC has "C:oracleproduct10.2.0client_1BIN;".
I also tried to create and ODBC using the 32bit ODBC on the machine and that connects fine, but when you try to access the DSN from Crystal, I still get the 12154 error.
I want to export a table ( using exp or expdp ) from client machine. Dump file should be created to client machine. Is this possible ? How to do this ?
I have installed oracle 11g Release 11.1.0.1 on windows server 2008.I access this server from a client machine running on winXP through SQL PLUS. I wanted to shutdown and start DB server from this client machine. Accordingly i issued shutdown immediate command from SQLPLUS.
Now when i tried to start the DB with "STARTUP NOMOUNT" command i received error 12514. I understand this error means that the listener received a request to establish connections to a database but since DB services are not up and running, hence the error. So my first question is how do I resolve this error.
Continuing further, i tried to re-connect to the database as sys, and i received another error ORA-01041. So, my second question is why did i receive this error and again how can i resolve it
may be you can point me to relevant reference in Oracle documentation) how can i start and stop oracle from a client machine using SQL interface in CLI mode and windows environment and avoid this error.
I'm looking for a basic password reset / unlock tool for use at a help desk. Environment is mixed 10 and 11G. Current procedure is log into specific database using SQL Plus and manually type out reset/unlock commands.
I want to add a new validation to restrict concurrent user and/or session from a client. (we have almost 60 client firms using the software to enter daily trasnactions). All users from all clients are connecting to the database using a common functional ID.
What I did was: 1) Add a column 'user_logged_in' in the master table for client and update it as Y when user from that client logged on to the system, 2) Insert the application logon details (we can figure out the client details from this) into a global temp table, 3) Create a logoff trigger to update the 'user_logged_in'flag in client master table by using values from global temp table when session logged off and 4) Restrict the users from same client if the flag is 'Y'
But the problem in this case is logoff trigger will not be executed in case if the session got killed or terminated abnormally.
The problem is that this connection errors when I try to connect using my SQuirreL client. My developers want to connecting using the SID or the SERVICE_NAME and by using the "New Method" syntax, not the "Old Method" syntax. According to the documentation the "New Method" syntax works with the SERVICE_NAME or the SID. The "Old Method" only works with the SID.
# Host name is vmwwin7634.na.SAS.com # SID is sting2 # SERVICE_NAME is sting2.na.sas.com
PROBLEM using SID errors ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 THIS WORKS using SERVICE_NAME ==> jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com
I am using SQuirreL Client version 3.4.0
# Here is the tnsnames.ora entry on the server. STING2 = (DESCRIPTION =
[code]...
# In this documentation it says, "On new syntax SERVICE may be a oracle service name or a SID."You can find this on the orafax wiki under JDBC#Thin_driver.
# I was able to connect with the "old method" using the SID only, SERVICE_NAME errors jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2.na.sas.com (SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.") jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521:sting2 (this works)
# "New Method" jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2.na.sas.com (this works) jdbc:oracle:thin:@vmwwin7634.na.SAS.com:1521/sting2 (this errors) (SQuirreL client error, "Unexpected Error occurred attempting to open an SQL connection.")
I have new virtual UNIX machine and I installed oracle client on /usr/lib/oracle. Also I have a oracle database and I am able to connect to this database from my desktop sql developer.
So now I am trying to connect from new UNIX machine. Where I created tnsnames.ora file under /usr/lib/oracle/network/admin and before connecting did export the following
ORA-12545: Connect failed because target host or object does not exist. Not sure what I missed here. using same tns file I am able to connect from sql developer on windows.
I need to install Oracle client to get latest sql plus working on client pc as the problem is, i am not able to find out where i can download this , i just need the sql plus as i am not able use many commands because when i installed oracle forms 6i client tool , sql plus 8.0 got installed.
I am trying to ultimately as the title says separate a user input list into one column of entries. I am doing this through Cognos not a normal SQL editor which is what makes this a little harder to do. So far I have gotten that in general I can use the
SELECT 'First Entry' Asset FROM Dual Union SELECT 'Second Entry' Asset FROM Dual Union SELECT 'Third Entry' Asset FROM Dual
and this will give me 3 entries of data in one column. More can be added as long as the last statement doesn't have the union on it. So, the next step it would seem is to have a for loop combined with an if then or case statement that would find the number of entries and loop until we reach the number of entries and give me either SELECT 'First Entry' Asset FROM Dual Union or SELECT 'First Entry' Asset FROM Dual if we are on the last entry. I don't know the lingo to do this though. I have tried to get this to work with a simple test like cat, dog, horse, cow, pig, etc but it's frustrating that I can't get it to work. I can do all the individual steps I just can't seem to get it to work together. I have all the functions I need, I just need to the syntext to do a for loop along with an if then or case statement where the outcome is a valid select statement.