Several symbols that are used in Oracle might represent different meanings in different place.
Question mark ?
ORACLE HOME
? (a Question Mark) in a path string represents the environmental variable of ORACLE_HOME. It's usually $ORACLE_HOME in UNIX or Linux, %ORACLE_HOME% in Windows.
SQL> alter tablespace temp add datafile '?/dbs/temp02.dbf' size 200M;
You may also use the environment variable $ORACLE_HOME directly in the statement.
SQL> alter tablespace temp add datafile '$ORACLE_HOME/dbs/temp02.dbf' size 200M;
Please note that, do NOT use ? or $ORACLE_HOME in ALTER SYSETM statements in a RAC system, they usually don't be interpreted.
At sign @
1. Execute start with
If the @ sign is used at the beginning of a path string, then it notifies Oracle utility to execute the script followed with.
SQL> @?/rdbms/admin/awrrpt.sql
2. ORACLE_SID
If the @ sign is in a path string, then it represents the environmental variable of ORACLE_SID. It's usually $ORACLE_SID in UNIX or Linux, %ORACLE_SID% in Windows.
Example 1:
SQL> alter tablespace tablespace_name add datafile [email protected];
Example 2:
SQL> create pfile='?/dbs/[email protected]' from spfile;
You may also use the environment variable $ORACLE_SID in the statement.
SQL> create pfile='?/dbs/init$ORACLE_SID.ora' from spfile;
3. Followed by a Connection String (or a TNS Name)
If the @ is in a connection string, it means the following identifier is a hostname, let's see some examples. The first one is the local naming method.
[oracle@test ~]$ sqlplus sys/password@ora12c as sysdba
The second is the easy connect method.
[oracle@test ~]$ sqlplus sys/password@ora12c-server:1521/ora12c as sysdba
For your reference, the following documents contain more about those symbols: