We help IT Professionals succeed at work.

PL/SQL Function that Returns the MachineID

cscg1976
cscg1976 asked
on
606 Views
Last Modified: 2013-12-18
Is there a PL/SQL Function that returns a unique number of the Hardware machine ? Basically I have a program that is located on 3 client machines and I would like every time that I create a TaxID to be unique amongst the 3 machines. So the best way I thought is getting the machine ID and concatenating it with a sequence created on every machine. Then the Taxid is passed to the server. That's why i want it to be unique so that there are no conflicts.
Comment
Watch Question

Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
use sys_context() function
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION
SujithData Architect
CERTIFIED EXPERT
Commented:
This one is on us!
(Get your first solution completely free - no credit card required)
UNLOCK SOLUTION

Commented:
--> Suppose you are maintaining a session_log table, which stores the information about that who is loged in to your database, when, from which client ............
**  Get rowid from session_log table for the connected session and use it as unique number along with sequence number.
*** select rowid, user_name,session_id,host from session_log;
     output of this query is as follows
ROWID                                       USER_NAME                      SESSION_ID  HOST
------------------                          ------------------------------    ----------       ------------------------------
AAANJLAABAAAOmqAAA       SCOTT                                1454           WG\ITS-31DFC1C86EA
AAANJLAABAAAOmqAAC       HR                                       1455           WG\ITS-41DFC1C86EA
AAANJLAABAAAOmqAAD       SYSTEM                              1456           WG\ITS-51DFC1C86EA

****  A unique rowid is maintained in each table
****  Its only a food for thought, you can mold this idea according to your choice

Gain unlimited access to on-demand training courses with an Experts Exchange subscription.

Get Access
Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Empower Your Career
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

  • Troubleshooting
  • Research
  • Professional Opinions
Unlock the solution to this question.
Join our community and discover your potential

Experts Exchange is the only place where you can interact directly with leading experts in the technology field. Become a member today and access the collective knowledge of thousands of technology experts.

*This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.

OR

Please enter a first name

Please enter a last name

8+ characters (letters, numbers, and a symbol)

By clicking, you agree to the Terms of Use and Privacy Policy.