Questions tagged [oracle10g]

Oracle is an RDBMS product. Specific releases of the product are known as Oracle9i, Oracle10g and Oracle 11g. Generally there are two releases within each major version. Questions tagged [tag:oracle10g] are assumed to be specific to this version or features introduced in this version.

Oracle is an RDBMS product. The software has undergone a number of releases, including 10gR1 and 10gR2. This tag also covers the current version of Oracle XE, the free release. Questions tagged with oracle10g are assumed to be specific to this version or features introduced in this version. It is generally advisable to specify both the full database version (eg 10.2.0.4) and often useful to include the underlying operating system.

10g is Oracle's grid computing product group including (among other things) a database management system (DBMS) and an application server. In addition to supporting grid computing features such as resource sharing and automatic load balancing.

Questions should probably be additionally tagged for the widest readership.

Questions about SQL in general should probably be tagged .

Questions about PL/SQL in particular should probably be tagged as well as .

Where the question relates to installation or operation, it may be more appropriate to post in the DBA Stack Exchange site.

Oracle's documentation is quite extensive, and answers to many questions can be found there. It can be found at:

7104 questions
162
votes
10 answers

Why are Oracle table/column/index names limited to 30 characters?

I can understand that many years ago there would be this kind of limitation, but nowadays surely this limit could easily be increased. We have naming conventions for objects, but there is always a case that turns up where we hit this limit -…
Chris Gill
  • 2,848
  • 5
  • 26
  • 31
134
votes
8 answers

DBMS_OUTPUT.PUT_LINE not printing

When executing the following code, it just says the procedure is completed and doesn't print the infomation i want it to (firstName, lastName) and then the other values from the select query in a table below. CREATE OR REPLACE PROCEDURE…
dexter
  • 1,347
  • 2
  • 9
  • 7
130
votes
8 answers

Checking oracle sid and database name

I want to check SID and current database name. I am using following query for checking oracle SID select instance from v$thread; but table or view does not exist error is coming. I am using following query for checking current database name select…
Adnan
  • 4,517
  • 15
  • 44
  • 54
122
votes
14 answers

How do I use CREATE OR REPLACE?

Am I correct in understanding that CREATE OR REPLACE basically means "if the object exists, drop it, then create it either way?" If so, what am I doing wrong? This works: CREATE TABLE foo (id NUMBER, title VARCHAR2(4000) DEFAULT 'Default…
Jason Baker
  • 192,085
  • 135
  • 376
  • 510
117
votes
14 answers

How to check for null/empty/whitespace values with a single test?

I'd like to write a SELECT statement that uses just one test to return columns with no value (null, empty, or all spaces). I thought this would work: SELECT column_name from table_name WHERE column_name NOT LIKE '%_%'; But this does not work for…
John Gordon
  • 29,573
  • 7
  • 33
  • 58
100
votes
2 answers

null vs empty string in Oracle

Possible Duplicate: Why does Oracle 9i treat an empty string as NULL? I have a table in Oracle 10g named TEMP_TABLE with only two columns - id and description just for the sake of demonstration. The column id is a sequence generated primary key…
Tiny
  • 27,221
  • 105
  • 339
  • 599
92
votes
9 answers

How to find the privileges and roles granted to a user in Oracle?

I am using Linux, Oracle10g. I have created one user called test. and granted create session and select any dictionary permission to the same user. i also granted sysdba and sysoper roles to the same users. Now i want to display all the privileges…
Abhimanyu garg
  • 961
  • 1
  • 7
  • 8
91
votes
18 answers

Disabling contextual LOB creation as createClob() method threw error

I am using Hibernate 3.5.6 with Oracle 10g. I am seeing the below exception during initialization but the application itself is working fine. What is the cause for this exception? and how it can be corrected? Exception Disabling contextual LOB…
GiriByaks
  • 941
  • 1
  • 7
  • 6
90
votes
9 answers

CASE .. WHEN expression in Oracle SQL

I have the table with 1 column and has following data Status a1 i t a2 a3 I want to display the following result in my select query Status| STATUSTEXT a1 | Active i | Inactive t | Terminated a2 | Active a3 | Active One way I could…
Nilesh Barai
  • 1,067
  • 1
  • 11
  • 13
85
votes
11 answers

Is it possible to output a SELECT statement from a PL/SQL block?

How can I get a PL/SQL block to output the results of a SELECT statement the same way as if I had done a plain SELECT? For example how to do a SELECT like: SELECT foo, bar FROM foobar; Hint : BEGIN SELECT foo, bar FROM foobar; END; doesn't work.
GameFreak
  • 2,881
  • 7
  • 34
  • 38
81
votes
5 answers

How to rename a table column in Oracle 10g

I would like to know: How to rename a table column in Oracle 10g?
Arvind Lairenjam
  • 981
  • 1
  • 8
  • 14
74
votes
10 answers

ORA-28000: the account is locked error getting frequently

I am facing this error given below : ORA-28000: the account is locked Is this a DB Issue ? Whenever I unlock the user account using the alter SQL query, that is ALTER USER username ACCOUNT UNLOCK, it will be temporarily OK. Then after sometime…
Thush
  • 975
  • 3
  • 8
  • 11
74
votes
7 answers

How to execute an oracle stored procedure?

I am using oracle 10g express edition. It has a nice ui for db developers. But i am facing some problems executing stored procedures. Procedure: create or replace procedure temp_proc is begin DBMS_OUTPUT.PUT_LINE('Test'); end it is created…
Rahbee Alvee
  • 1,924
  • 7
  • 26
  • 42
72
votes
6 answers

Different CURRENT_TIMESTAMP and SYSDATE in oracle

After executing this SQL in oracle 10g: SELECT SYSDATE, CURRENT_TIMESTAMP FROM DUAL I receive this strange output: What is cause of the difference in time? The server time is equal of SYSDATE value
Nik Kashi
  • 4,447
  • 3
  • 40
  • 63
68
votes
9 answers

Best way to reset an Oracle sequence to the next value in an existing column?

For some reason, people in the past have inserted data without using sequence.NEXTVAL. So when I go to use sequence.NEXTVAL in order to populate a table, I get a PK violation, since that number is already in use in the table. How can I update the…
Cade Roux
  • 88,164
  • 40
  • 182
  • 265
1
2 3
99 100