Server Administration :: Unused Columns

Jul 13, 2013

If you mark a column unused, is there any way to project it? I know the docs say you can't, but as the data is still there I would have thought it should be possible. I can see the column in dba_tab_cols, but the obvious ways of making it usable don't work:

orcl> select column_name,hidden_column from user_tab_cols where table_name='DEPT';

COLUMN_NAME HID
------------------------------ ---
LOC NO
DNAME NO
DEPTNO NO

orcl> alter table dept set unused column loc;

Table altered.

orcl> select column_name,hidden_column from user_tab_cols where table_name='DEPT';

COLUMN_NAME HID
------------------------------ ---
SYS_C00003_13071316:19:02$ YES
DNAME NO
DEPTNO NO

orcl> select "SYS_C00003_13071316:19:02$" from dept;
select "SYS_C00003_13071316:19:02$" from dept
*
ERROR at line 1:
ORA-00904: "SYS_C00003_13071316:19:02$": invalid identifier

orcl> alter table dept rename column "SYS_C00003_13071316:19:02$"
2 to loc;
alter table dept rename column "SYS_C00003_13071316:19:02$"
*
ERROR at line 1:ORA-00904: "SYS_C00003_13071316:19:02$": invalid identifier

orcl> alter table dept modify "SYS_C00003_13071316:19:02$"
2 visible;
alter table dept modify "SYS_C00003_13071316:19:02$"
*
ERROR at line 1: ORA-00904: "SYS_C00003_13071316:19:02$": invalid identifier

View 2 Replies


ADVERTISEMENT

Server Administration :: How To Find Unused Columns

Nov 9, 2011

is there a way to find out which unused columns in oracle?

View 8 Replies View Related

SQL & PL/SQL :: Dropping Unused Columns In A Partition?

Jan 21, 2003

I have been trying to drop an unused column in a partitioned table, and the number of records stored in this unused column was very high. I kept on running into errors as follows:

ORA-01562: failed to extend rollback segment number 10

ORA-01650: unable to extend rollback segment R09 by 256 in tablespace RBS

I tried to "SET TRANSACTION USE ROLLBACK SEGMENT <name>" with a larger rollback segment, but it still did not work. Can I drop the "unused column" from each partition instead?

How to apply that? Or, what are my options besides increasing the size of the rollback segment?

View 6 Replies View Related

Server Administration :: How To Find Non-indexed Queries And Columns That Require Indexes

Sep 1, 2011

How to find non-indexed queries and columns that require indexes?

View 3 Replies View Related

Server Administration :: Change Space Allocation For Character Columns In Database

Oct 24, 2012

I want to change space allocation for character columns in my database, So it will store them as 'CHAR' and not 'BYTE'.my character set is

SQL> SELECT VALUE FROM V$NLS_PARAMETERS WHERE PARAMETER='NLS_CHARACTERSET';
VALUE
----------------------------------------------------------------
AL32UTF8
SQL> alter system set NLS_LENGTH_SEMANTICS='CHAR' scope=both;

System altered.I bounced the instance just to make sure

System altered.
SQL> shutdown immediate;
Database closed.
Database dismounted.
ORACLE instance shut down.

Connected to an idle instance.

SQL>
SQL>
SQL> startup
ORACLE instance started.
[code].....

And then I want to see that when I create a table with some varchar2 column,The space for it will be allocated by chars, and not by bytes! However, when I run a check of create table, this is what I get:

SQL> drop table check_char;

Table dropped.

SQL> create table check_char (some_name varchar2(10));

Table created.

SQL> select a.char_used
2 from all_tab_columns a
3 where table_name='CHECK_CHAR'
4 and a.owner='SYS';

C
-
B
SQL>

What is the reason for space allocation to remain in BYTES and not CHAR, or what else I can check?

View 4 Replies View Related

Finding Unused Index

Nov 3, 2008

I have read and used the AWR script (mentioned in the page Finding unused index for finding unused customised (Z) indexes in our SAP system using oracle 10.2.0.2 as the SAP database.

But this returns no rows. Is there any precondition? I want to know how much / many times the indexes are used...We are smelling that lot of unused index are there in the database.

View 8 Replies View Related

SQL & PL/SQL :: Unused Variables In A Procedure

Jul 30, 2010

A way to identify variables declared in a procedure that are not being used? I had thought plsql_warnings might do the trick but it does not.

I have inherited a lot of code that was ill conceived and unfortunately have started to notice a trend.

View 8 Replies View Related

SQL & PL/SQL :: Index Unused State

May 7, 2013

I made an Index Unused while doing some update by using sql developer right click 'Make unusealbe'. Now I need make it as useable.

marking as Usable. I have checked in all_indexes state is show as 'UNUSABLE'.

View 2 Replies View Related

Release Tablespace Unused Space

Nov 18, 2011

I have a problem...

I created a tablespace called my_ts:

CODECREATE TABLESPACE my_ts DATAFILE 'C:\Oracle\oradata\db\my_ts.dbf' SIZE 5M  EXTENT MANAGEMENT LOCAL UNIFORM SIZE 128K;
ALTER DATABASE DATAFILE  'C:\Oracle\oradata\db\my_ts.dbf' AUTOEXTEND ON;

Its was sucessfully created and my_ts.dbf file has 5MB

charging with data...

CODEcreate table big_table tablespace my_ts as select * from dba_objects;
select * from big_table;
begin
  for i in 1..10 loop
    insert into big_table select * from dba_objects;
  end loop;
end;

Now the my_ts.dbf file has 90MB

Now I want drop this table:
CODEdrop table big_table purge;

And my tablespace file still has 90MB.

I already tried to restart the database but doesn't works...

how can I reduce the size to the original (5MB)?

View 3 Replies View Related

PL/SQL :: List Of Unused Tables And Procedures

Aug 28, 2012

I am in the task of clean up of tables. I need to find the list unused tables and procedures. Is there any way where i can find when was the last time the table queried?

Give sql query to find the list of unused tables and procedures.

View 6 Replies View Related

PL/SQL :: Unable To Drop Unused Column?

Nov 14, 2013

SQL> SELECT * FROM DBA_UNUSED_COL_TABS; OWNER                          TABLE_NAME                          COUNT ------------------------------ ------------------------------ ---------- CRIS_WAREHOUSE_USER            F_TRADING_COLLATERAL_SR                1 SQL> SELECT * FROM DBA_UNUSED_COL_TABS; OWNER                          TABLE_NAME                          COUNT ------------------------------ ------------------------------ ---------- CRIS_WAREHOUSE_USER            F_TRADING_COLLATERAL_SR                1 SQL> alter table F_TRADING_COLLATERAL_SR drop unused columns; Table altered. SQL> SELECT * FROM DBA_UNUSED_COL_TABS; OWNER                          TABLE_NAME                          COUNT ------------------------------ ------------------------------ ---------- CRIS_WAREHOUSE_USER            F_TRADING_COLLATERAL_SR                1 SQL>

View 6 Replies View Related

Compressed Table - Drop Unused Column

Feb 9, 2012

what happens if you mark a column unused in a compressed table and then alter table drop unused columns? We had a customer do this and Oracle threw a -3113 (end of communication) error. They did a system restore before contacting us and blew away any evidence in alert logs/trace files. They did this on a 400GB compressed table.

My question is, when you drop an unused column off a compressed table, does it uncompress? Where does this uncompression occur? In the instances default tablespace? In the tablespace configured for the table?

Basically, we are wondering whether the error was due to poor error-handling of the system running out of space during decompression and trying to see if we can reproduce it. This was on an 11.1.0.7 system.

View 7 Replies View Related

Server Utilities :: SQLLDR / Dates And Null Columns?

Nov 10, 2010

I am experiencing somewhat same issue...but have been unable to resolve it(new to Oracle) I am getting the infile from flat file(data dump from SQL) using sqlldr to upload data to the Oracle table...since the data is already in the flat file...I cannot do anything in the SQL to pre-format the data...

Sample of ERROR I am getting - Column CREATE_DATE which has date and time - happens to other date time columns also if remove the CREATE_DATE from Control file(happens to every single line of record):
==========================================
Record 2: Rejected - Error on table LGCY_CHS.METS_CHS_USER_PRIV, column CREATE_DATE.
ORA-01841: (full) year must be between -4713 and +9999, and not be 0

[code]...

Flat file: (3 lines of data)

5|Annie|1|AR|84601D0A-6D9D-4D0F-86EB-2FDD9D7E680B|0|0|1|1|1|0|1|0|kgarbin|XPLTMCE01|2005-04-07 13:54:42.087|Annie|VAXP60|2008-10-03 16:54:59.583|2008-10-03 16:54:59.583
11|Beverly|1|BA|9A2D6304-E997-4B40-96E5-2221E521B077|1|0|0|1|0|0|0|0|kgarbin|XPLTMCE01|2005-04-07 13:54:42.087|BEVERLY|VAXP60|2008-10-03 09:39:33.973|2008-10-03 09:39:33.973
29|KGarbin|1|KG|B229FCF9-BED0-4E50-9804-83324B677C67|0|0|1|1|1|1|0|1|kgarbin|XPLTMCE01|2005-04-07 13:54:42.087|Gfoote|VAXP60|2008-09-08 10:05:01.690|2008-09-08 10:05:01.690

View 1 Replies View Related

Reports & Discoverer :: Create A Report By Using One Field / Text As Columns Name In Layout But Display All Columns

Jun 16, 2010

I want to create a report by using one field and one text as columns name in layout but display the all the columns. I mention the 5 column names in query.how can I write function in summary column.

View 4 Replies View Related

Performance Tuning :: Index 15 Columns When Cannot Predict Columns Will Be Used In Where Clause?

Apr 4, 2011

I am running a fairly busy Oracle 10gR2 DB, one of the tables has about 120 columns and this table receives on average 1500 insertions per second. The table is partitioned and the partitioning is based on the most important of the two timestamp columns. There are two timestamps, they hold different times.

Out of these 120 columns, about 15 need to be indexed. Out of the 15 two of them are timestamp, at least one of these two timestamp columns is always in the where clause the queries.

Now the challenge is, the queries we run can have any combination of the 13 other columns + one timestamp. In reality the queries never have more than 7 or 8 columns in the where clause but even if we had only 4 columns in the where clause we would still have the same problem.

So if I create one concatenated index for all these columns it will not be very efficient because after the 4th or 5th column the sorting would no longer be very useful and I believe the optimiser would simply not use the rest of the index. So queries that use the leading columns of the index in sequence work well, but if I need to query the 10th column the I have performance issues.

Now, if I create multiple single column indexes oracle will have to work a lot harder to maintain all these indexes and it will create performance issues (I have tried that). Besides, if I have multiple single column indexes the optimiser will do nested loops twice or three times and will hit only the first few columns of the where clause so I think it will kind of be the same as the long concatenated index.

What I am trying to do is exactly what the Bitmap index would do, it would be very good if I could use the AND condition that a Bitmap index uses. This way I could have N number of single column indexes which the optimiser could pick from and serve the query with exactly the ones it needs. But unfortunately using the Bitmap index here is not an option given the large amount of inserts that I get on this table.

I have been looking for alternatives, I have considered creating multiple shorter concatenated indexes but this still would not address the issue since many queries would still not be served properly and therefore would take a very long time to complete.

What I had in mind would be some sort of multidimensional index, I am not even sure if such thing exists. But essentially it would be some sort of index that could serve a query efficiently regardless of the fact that the where clause has the 1st, 3rd and last columns of the index.

So considering how widely used Oracle is and how many super large databases there are out there, this problem must be common.

View 12 Replies View Related

Server Utilities :: Migration From Postgres Into Oracle Columns With Spaces

Jul 21, 2010

I have migrated from postgres to oracle entire databases however some tables have spaces how can they be removed and how can i found out all the tables in a schema with spaces?

View 8 Replies View Related

Server Utilities :: Creating SQL Loader Ctl File With Over 1000 Columns?

Dec 3, 2010

Next week I will be getting an input file which will contain over 1000 data columns to be loaded into ORACLE. It's about 6,400 characters in length.

My question is...has ever created a huge ctl file like this to be used for SQLLoader, using so many columns? I will be sending certain columns(data) to certain tables, so it's not just going into 1. It will be about 6 tables.

View 39 Replies View Related

Server Administration :: Create Tablespace For Administration

Nov 29, 2010

i'm a student currently learning database administration security.

I need to create a tablespace for administration of database but i don't know what datafile settings are best suited for admin usage.

I have attached the schema that was given to me for this assignment.

View 12 Replies View Related

SQL & PL/SQL :: How To Select All Columns From Table Except Those Columns Which Type In Query

Jan 21, 2011

I have a two question.

Question 1:How to select all columns from table except those columns which i type in query

Question 2:How to select all columns from table where all columns are not null without type each column name which is in empty data

View 5 Replies View Related

Server Utilities :: To Load Single Column Data Into Multiple Columns

Mar 26, 2012

I want to load single column data into multiple columns.

View 3 Replies View Related

Server Administration :: Monitoring Script Required For Oracle 9.2.0.7.0 On Windows 2000 Server

Apr 8, 2010

My manager is asking to create a SQL scrip, which will provide following information.

Our database is 9.2.0.7.0 on Windows 2000 Server

-How many records Insert / Update or Delete daily in my Oracle database?

- Check Archive log / Redo Log switching information?

-Check database growth ?

View 10 Replies View Related

Server Administration :: Installing Oracle Database 10.1.0.2.0 On Windows 2003 Server 64bit?

Jan 11, 2011

i am trying to install Oracle 10.10.2.0 on Windows Server 2003 standard x64 Edition Service Pack, but when i try to run the installer or open DVD it gives me below error.

"The image file D: is Valid, but is for a machine type other than the current machine."

View 1 Replies View Related

Server Administration :: Restoring The Oracle Services In Windows 2008 Server

Jun 27, 2012

I was trying to delete the database in the test server. When i was deleting listener was already stopped, i continued deleting using dbca, it shown me some alert that datafiles cant be deleted because system could't find database, since listner was stopped so only service was deleted(the one showing in the windows administrator toolsservicesOracleServiceTEST).

All the datafile parameter files are still there. How can i delete the datafiles and parameter files belongs to that database or how to create the deleted service, so that i will start the listener and do the complete deleting of the database.

View 3 Replies View Related

Server Administration :: How To Migrate Database From Windows 2003 To 2008 Server

Oct 31, 2012

I have to migrate production database version 10gR2 on windows 2003 server to oracle 11gR2 on windows 2008 server . So far i have just installed the oracle software on 64bit windows 2008 server. How to move the data or migrate from old server to new server .

View 22 Replies View Related

Server Administration :: Server Installation Gets Abruptly Ended For Client Get TNS Errors

Jan 11, 2011

after a long time,(i never remember when was the last time i installed 9i)i was asked to install 9i.So, whether i install server or cilent i get this error <attachment>

after i ignore it and finished the installation,The server installation gets abruptly ended for the client i get TNS errors.

View 2 Replies View Related

Server Administration :: Unable To Find Server Process In Oracle Database For Specific Application / Client

Feb 13, 2013

I am trying to find the unix process for one of my application in the database but I am unable to view the same. To simulate, I did the following.

1. My database runs on different server.
2. I invoked "sqlplus" from another unix box to login to the database.
3. I found that the process id (ps -ef |grep sqlplus).
4. When I execute the below mentioned query it does not display the process id that I am looking for. But the osuser, username, program and machine details are correct. How can I know the process details from the database?

SELECT SYS.GV_$SESSION.OSUSER, SYS.GV_$SESSION.USERNAME, SYS.GV_$PROCESS.SPID,
SYS.GV_$SESSION.MACHINE, SYS.GV_$SESSION.PROGRAM,
SYS.GV_$PROCESS.PROGRAM ,SYS.GV_$SESSION.SQL_ID
FROM
SYS.GV_$PROCESS, SYS.GV_$SESSION
WHERE
SYS.GV_$PROCESS.ADDR=SYS.GV_$SESSION.PADDR and SYS.GV_$SESSION.USERNAME='TEST'
and SYS.GV_$SESSION.MACHINE like '%hostname%'

View 3 Replies View Related

Server Administration :: While Creating Index ORA-00603 / ORACLE Server Session Terminated By Fatal Error

Jul 26, 2010

While creating the index we are getting the error "ORA-00603: ORACLE server session terminated by fatal error".

We have the space in tablespaces and also in the file systesm.

View 13 Replies View Related

Server Administration :: Create Multiple Database In Single Server

Apr 18, 2011

I have database in single server. I already have ORACLE_SID=stagedb. So i want to create new sid and named as proddb.Is it possible have multiple db in single server? This server not running as RAC. It run as single only.

View 1 Replies View Related

Server Administration :: Access To Database Server Machine Login?

Apr 30, 2012

database administration , we are planning to use amazon cloud database , this database does not allow us to login to server machine , unfortunately amazon don't provide ssh to this machine , in general for doing any of adminstration task on the database will there be need to log into the machine ? we can always log in through toad or any other sql client but we cannot do ssh to server..general can this limitation effect administration ?

View 9 Replies View Related

Server Administration :: Oracle 11g R2 Installation On Windows 2008 64 Bit Server

Apr 19, 2011

I want to install Oracle 11g R2 in windows 2008 64 bit server. How can I know whether my server is ready to install Oracle ie is all components are available in server or any patch is to be applied etc.

View 3 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved