Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

What does $ mean?

Status
Not open for further replies.

NuniPR

Programmer
Mar 3, 2005
55
PR
Hi guys!!!

As usual, I know you'll come to the rescue!!!

I have a question regarding the "$" symbol. I am new at the company I work for and they've assigned me to administer an Oracle DB. The thing is that as a programmer, I never had to worry about certain things...

I have a user, which I understand is like a sys user. It's user id has a "$" at the beginning. What does it mean? Also, for the $USER, who has privileges to modify it?

Thanks so much in advance for your quick response.


Nunina
 
If this is at a UNIX level, it is likely a shell script variable.
 
Hi,

Variable names in unix start with a $ sign.
When you are connected, you can display them with the comand env his way :
Code:
env

appers a long list like this

Code:
LOGIN=oracle
LOGNAME=oracle
MAIL=/usr/spool/mail/dmadmin
MAILCHECK=600
MAILMSG='[YOU HAVE NEW MAIL]'
MANPATH=/usr/share/man:/usr/dt/man:/usr/local/man:/apache/apa_1.3.19/man
NLS_LANG=FRENCH_France.UTF8
NLS_NUMERIC_CHARACTERS=.,
NLSPATH=/usr/lib/nls/msg/%L/%N:/usr/lib/nls/msg/%L/%N.cat
NLS_SORT=FRENCH
ODMDIR=/etc/objrepos
OPTIND=1
ORACLE_HOME=/oracle/ora_9.2.0
ORACLE_SID=EXTEST
....
.....

All these variables may be changed by the user connected because they belong to his [env]ironment.

I can change ORACLE_SID like this and connect to new instance with sqlplus :
Code:
ORACLE_SID=SID_DEVL
sqlplus system/password
 
Aau,

You may wish to point out to Nunina that the method/syntax of assigning a Unix system variable a value (as in your example, "ORACLE_SID=SID_DEVL") depends upon the "Unix shell" you are using (Bourne shell, k-shell, c-shell [by the seashore <wink>], et cetera).

[santa]Mufasa
(aka Dave of Sandy, Utah, USA)
[ Providing low-cost remote Database Admin services]
Click here to join Utah Oracle Users Group on Tek-Tips if you use Oracle in Utah USA.
 
Hi,
As an added note, if your new company expects you to be an Oracle DBA and you have had no experience/training at this, I hope they are willing to send you to classes to learn what to do ( and, perhaps more importantly, what NOT to do) with a production Oracle database..
If not, find a new company to work for -

[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
I don't suppose this has anything to do with an Operating System Authenticated User (OPS$<username>)?
 
Hi,

No, I don't think it's at Unix level. Actually the DB runs in Windows 2003.

Thanks

Nunina [gorgeous]
Cognos BI Administrator
San Juan, PR
 
Hi,
I have never seen a USER named $<anythingelse>( Oracle, in fact, will not allow $ to start a Username, the $ is a reserved character and has limitations on where it can be used)..

There is a table called USER$ in the SYS schema..But,do not manipulate any SYS or SYSTEM objects directly...


Please read the Oracle Adminsitrator's guide and the Oracle Concepts manual..

Good docs are here:




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi Guys!

It's been a while, sorry. Have been in training all over the states for the past couple of months.

The Oracle database runs in a Windows Server (2003). The $USER appears on EVERY table. In ocasions, it appears as the user that LAST_MODIFIED whatever.

I believe it is a system owner of some type. That's my confusion.

Any other insight would be great. Most Oracle help sites assume Unix is the OS.

Thanks,

Nunina

Nunina [gorgeous]
Cognos BI Administrator
San Juan, PR
 
Hi,
'appears on every table' exactly where?
Stuff does not 'appear' in/on a table unless something puts it there..


Was it Oracle training?




[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hi,
Further thoughts/points:

A complete search of Oracle's objects fails to find even one that starts with a $ .
I suspect some auditing trigger or code is trying to insert a Username into the table by assigning the name to an operating system variable called $USER but that it is being 'seen' as a Literal string instead and that is what is being inserted...Find the code and you may find the problem..



[profile]

To Paraphrase:"The Help you get is proportional to the Help you give.."
 
Hello,

actually it is possible to have a username $USER,
if you use suitable syntax,
proof of concept:
Code:
SQL> create user $USER identified by testpw;
create user $USER identified by testpw
            *
ERROR at line 1:
ORA-00911: invalid character


SQL> create user "$USER" identified by testpw;

User created.

SQL> select username from all_users
  2  where username like '$%';

USERNAME
------------------------------
$USER

SQL>
Nunina,
to make sure, could you please log in as sysdba, and run the select I gave above?

regards
 
Hello again,

one more thought: I think the idea Ken posted on 3 Nov 05 11:07 might be the answer.

For this, Nunina, two more questions:

1)You wrote that you are on Windows. Is there a Windows user whose username is just USER?
2)In your init<SID>.ora file, is there an entry for os_authent_prefix?
(Default is OPS$, but it might be $ here.)

regards
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top