Alter the tablespace storage parameter
Hi,
I want to alter the tablespace storage parameter from 1024 to 200 KB. Can anyone please provide me what is the procedure? Its very urgent.
Suman
SQL> select tablespace_name, EXTENT_MANAGEMENT, ALLOCATION_TYPE, SEGMENT_SPACE_M
ANAGEMENT from dba_tablespaces;
Output of the sql
TABLESPACE_NAME EXTENT_MAN ALLOCATIO SEGMEN
SYSTEM DICTIONARY USER MANUAL
PSAPR3E LOCAL SYSTEM MANUAL
PSAPR3E620 LOCAL SYSTEM MANUAL
PSAPR3EUSR LOCAL SYSTEM MANUAL
PSAPTEMP LOCAL UNIFORM MANUAL
PSAPTF60D LOCAL SYSTEM MANUAL
PSAPUNDO LOCAL SYSTEM MANUAL
SYSAUX LOCAL SYSTEM AUTO
<u><b>PSAPR3E700 LOCAL UNIFORM AUTO</b></u>
Message was edited by:
Amit Jain
Similar Messages
-
The OPTIMAL storage parameter in the rollback segment
Hi,
in metalink note Subject: ORA-01555 "Snapshot too old" in Very Large Databases (if using Rollback Segments)
Doc ID: 45895.1
I see :
Solution 1d:
Don't use the OPTIMAL storage parameter in the rollback segment. but how not to use the OPTIMAL storage parameter in the rollback segment ?
Thank you.If you are using undo_management=AUTO (in 9i or higher) then there is no "OPTIMAL" setting.
"OPTIMAL" is when using Manual Undo Management with Rollback Segments created by the DBA.
If you are using Manual Undo Management, check your Rollback Segments. The Optimal size would be visible in V$ROLLSTAT.
select a.segment_name a, b.xacts b, b.waits c, b.shrinks e, b.wraps f,
b.extends g, b.rssize/1024/1024 h, b.optsize/1024/1024 i,
b.hwmsize/1024/1024 j, b.aveactive/1024/1024 k , b.status l
-- from v$rollname a, v$rollstat b
from dba_rollback_segs a, v$rollstat b
where a.segment_id = b.usn(+)
and b.status in ('ONLINE', 'PENDING OFFLINE','FULL')
order by a.segment_name
/To unset the Optimal setting you can run
alter rollback segment SEGMENT_NAME storage (optimal NULL);Note that if you unset OPTIMAL, then your Rollback Segments will remain at very large sizes if and when they grow running large transactions ("OPTIMAL" is the pre-9i method for Oracle to automatically shrink Rollback Segments). You can manually SHRINK or DROP and CREATE Rollback Segments then. -
STORAGE parameter in CREATE TABLESPACE
Hello all,
Env: 10gR2
I have the export of a schema of around 70Gb from 9i. I need to Import it to 10g.
This will be used only for 'SELECT', there wont be any DML once i import the data.
There are tables of size upto 20Gb.
What would be the best STORAGE parameters that i should be using along with the CREATE TABLESPACE if my db block size is 8k?
TIA,
JJIf you are using locally managed tablespace then it is not required to specify storage parameters like initial, next and pctincrease. It is better to create LMT with uniform extent size. For the table with 20GB data create a seperate tablespace with uniform extent size as 1024MB. All tables of size more than 1GB can be allocated to this TS. For tabes of size between 100MB and 1GB create seperate tablespace of extent size 100MB. For all other tables create another TS with extent size 10M.
If you are using dictionary managed tablespace then calculate the size of tables and first create empty tables with the necessary initial and next value. Then import data with the option IGNORE=Y.
Mohan
http://www.myoracleguide.com -
Move the database storage layout, please Help.
Hi Buddies,
My current database A (9i) 's storage layout is
File System SIZE
/yqa1/tech/oracle 8628 MB <-- Oracle software plus server's dump dirs only
/yqa7/appl/oracle 34521 MB <-data
/yqa8/appl/oracle 34521 MB <-data
we want to split existing 32G filesystem into separate chunks of 8G and map them into seperate filesystems
(for expamle: split /yqa7/appl/oracle into
/def1/appl/oracle [8G]
/ghi7/appl/oracle [8G]
/jkl23/appl/oracle [8G]
/xyz2/appl/oracle [8G]
for database A, finallly, we want to change the storage layout like this:
File System SIZE
/yqa1/tech/oracle 8628 MB <-- Oracle software plus server's dump dirs only
/yqa7/appl/oracle 8628 MB <-data
Is there any best practice to achive the purpose? or any frinds can provide practice documentation regarding to this?
Thanks a lot in advance.
JerryYou'd need to take the tablespace offline
ALTER TABLESPACE tablespace_name OFFLINE;
before you move or copy the datafile to relocate it.
After completing the move or copy, you could use the
ALTER DATABASE RENAME FILE 'old_file_name' TO 'new_file_name' ;
for each of the datafiles in that tablespace.
Then, you can bring the tablespace online again
ALTER TABLESPACE tablespace_name ONLINE; -
How to alter the materialized view defintion with -- For update clause
My db version is 9.2.0.3
My orginal materialized view difination does not have "for update " clause.
how can i alter the mview defination to inclused and exclude the "for update" clause.
I dont want to drop and recreate the mview with for update clause. But I what to change the existing definition.
Please suggest.
Thanks
Naveen.I already have the view definition in place. I want to change the exising defination, by adding the "for update " clause. Is it possible with any " alter mview ... " syntax.
Below is my existing syntax. I don't what to drop and recreate. Just want to alter the existing definition , with for update clause.
create materialized view test
pctfree 0
tablespace DATA storage (pctincrease 0)
build immediate refresh start with sysdate next (trunc(sysdate+1) +1/24)
with primary key
disable query rewrite
as select * from test@isource;
Please suggest!
Thanks
Naveen
Edited by: user12096071 on Apr 8, 2010 2:56 PM -
Delete with extent returning to the tablespace
When I delete all the rows from the table I can use:
'truncate table mytable drop storage'
and the extents are returned to the tablespace that table resides in.
Is something like this possible with the delete statement? If not - or if I just didn't use it - when the delete makes many extents empty, does Oracle automatically reclaim them?
Thx.>>
when the delete makes many extents empty, does Oracle automatically reclaim them?
<<
Inserts into the table can and will refill the empty blocks given enough activity and over time but even if every block in an extent is empty Oracle does not release the extent back to the tablespace as freespace at least through 10g.
If you need to release the extents to the tablepsace for reuse due to space requirements then you would need to reorganize the table and its indexes. The alter table move statement can be used if enough free space exists in the tablespace to support the operation or exp/truncate/imp ignore=y can be used.
The question is how much space would be freed? How badly do you need it for other objects? And how long before the table would need to re-extend if you take the space away (or how long before the table would reuse the extents)?
You do not want to perform reorganizations just to do them. There needs to be a real benefit to yourself or your application from the work.
HTH -- Mark D Powell -- -
PSAPTEMP default storage (Parameter settings)
Hi there,
I am trying to increase INITIAL and NEXT values for default setting of PSAPTEMP. Using sapdba version 9, under Tablespace, when I select the INITIAL and change value, the value gets reset to default 1024K. How can I extend these values. Do I need to drop and recreate or can I do it online.
Regards,
JeetDear Jeet,
first of all: don't use sapdba anymore.
It's not developed anymore and the recommendated tool is now br*tools.
See note
12741 - Current versions of SAPDBA and BR*Tools
for details
Concerning your question:
When you've got a locally managed temp. tablespace (as it is recommended) then the INITIAL and NEXT values should be identical and the allocation type for the tablespace should be UNIFORM.
The exact value for this parmeters depends on the sort_area-size used in the database.
The formula looks like this:
( N * sort_area_size ) + 2 * db_block_size
db_block_size is 8K in SAP systems and the N depends on the size of your PSAPTEMP (tempsize):
N = 1 : tempsize <= 2 GB
N = 3 : 2 GB < tempsize <= 6 GB
N = 5 : 6 GB < tempsize <= 10 GB
N = 10 : 10 GB < tempsize
All this - in more detail - can be found in these notes:
164925 - Storage parameter of tablespace PSAPTEMP
659946 - FAQ: Temporary tablespaces
Hope that helps.
Best regards, Lars -
How to see the tablespace size
hi
how to get the tablespace size??
thxHello,
select SUM(bytes)/1024/1024 MB from dba_data_files
where tablespace_name = 'xxxxxx';
works fine.
I am trying to build a function for that:
select SUM(bytes)/1024/1024 MB
from dba_data_files
where tablespace_name=upper('&user')
However, I need to make some enhancements:
1. how to make comments in sql files?Refer to the REM statement in the sqlplus reference manual
2. a lot of outputs are generated:
SQL> @get_size
Enter value for user: tts1
old 3: where tablespace_name=upper('&user')
new 3: where tablespace_name=upper('tts1')
MB
2048
how to avoid that so that only the size is
displayed.
for example:
SQL> @get_size
Enter value for user: tts1
MB
2048
Refer to set verify off in the sqlplus reference manual.
>
3. how to let the function accept a parameter such
as:
SQL> @get_size tts1
Refer to the define command in the sqlplus reference manual.
>
4. how to include a usage (help) to that function
such as:
SQL> @get_size
usage: get_size <tablespace name>
Many thanksRefer to the prompt statement in the sqlplus reference manual.
Sybrand Bakker
Senior Oracle DBA -
How to determine the object in the tablespace
Hi
I have a problem with my database, How can i determine the object in the tablespace
and how do move old tablespace into new tablespace and how to drop existing tablespace.
ThanksHi,
If you want to find for all objects information, you can use dba_segments and filter this against the tablespace name. Once done you can create another tablespace and move the objects from old tablespace to new tablespace. Later you can drop the old tablepspace. You can use the below mention commands also:
SELECT 'ALTER TABLE '|| table_name ||' MOVE TABLESPACE USERS;'
FROM user_tables WHERE tablespace_name='MY_TableSpace';
SELECT 'ALTER INDEX '|| index_name ||' REBUILD TABLESPACE USERS;'
FROM user_indexes WHERE tablespace_name='MY_TableSpace';
SELECT 'ALTER TABLE '|| table_name ||' MOVE LOB ('
|| column_name ||') STORE AS (TABLESPACE USERS);'
FROM user_lobs WHERE tablespace_name='MY_TableSpace';
On the other hand,
You can also export a backup of the source tablespace and import into the target tablespace.
Regards,
XIC -
Updates/Inserts to the Tablespace
We have this centralized database called CONSOLE running in Oracle Database 10.2.0.5. We have site databases (150 small database from different towns). All of these inserts data into the CONSOLE database every 4 hours. I was tasked to monitor the console database. Part of my plan is to make sure that no tablespaces will be full and I need to address this issue before it occurs. The problem is we only have limited storage in the CONSOLE database and the upgrade in storage is scheduled in the 3rd week of June.
Is there a way to find out when was a tablespace (datafile) was last written to? (And from which table this data (row) belongs?)
The concept that I would like to find out is the same in the dba_tables view where you can check when was the table last analyzed.With this script you can monitor the tablespace size and take action:
==========================================
set linesize 150
column tablespace_name format a20 heading 'Tablespace'
column sumb format 999,999,999
column extents format 9999
column bytes format 999,999,999,999
column largest format 999,999,999,999
column Tot_Size format 999,999 Heading 'Total| Size(Mb)'
column Tot_Free format 999,999,999 heading 'Total Free(MB)'
column Pct_Free format 999.99 heading '% Free'
column Chunks_Free format 9999 heading 'No Of Ext.'
column Max_Free format 999,999,999 heading 'Max Free(Kb)'
set echo off
PROMPT FREE SPACE AVAILABLE IN TABLESPACES
select a.tablespace_name,sum(a.tots/1048576) Tot_Size,
sum(a.sumb/1048576) Tot_Free,
sum(a.sumb)*100/sum(a.tots) Pct_Free,
sum(a.largest/1024) Max_Free,sum(a.chunks) Chunks_Free
from
select tablespace_name,0 tots,sum(bytes) sumb,
max(bytes) largest,count(*) chunks
from dba_free_space a
group by tablespace_name
union
select tablespace_name,sum(bytes) tots,0,0,0 from
dba_data_files
group by tablespace_name) a
group by a.tablespace_name
order by pct_free;
=========
regards
Shanoj -
Creating a primary key with the parallel option and the tablespace option
I know I can create a unique index with these options and then make the primary key with the "using index" clause. anyway to do this and skip the create unique index and just create the primary key ?
SQL> ALTER TABLE t
2 ADD CONSTRAINT pk_t
3 PRIMARY KEY (testcol)
4 USING INDEX
5 TABLESPACE example
6 PARALLEL (DEGREE 2);
PARALLEL (DEGREE 2)
ERROR at line 6:
ORA-03001: unimplemented featureYou can name the tablespace but you must do an alter index thereafter. -
Hi ,
I am trying to make the tablespace online.
But facing the below issues .Need your help.
SQL> alter tablespace XXXXXX online;
alter tablespace XXXXX online
ERROR at line 1:
ORA-01115: IO error reading block from file 15 (block # 1)
ORA-01110: data file 15: '/xxxxxx.dbf'
ORA-27091: skgfqio: unable to queue I/O
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
Additional information: 1
Additional information: 1
SQL> alter tablespace XXXXXX read write;
alter tablespace XXXXXXX read write
ERROR at line 1:
ORA-01646: tablespace XXXXXX is not read only - cannot make read write
Os Solaris : 5.8
Database ;Oracle 9.2.0.4.0
Thanks
USR0072USR0072 wrote:
Hi ,
I am trying to make the tablespace online.
But facing the below issues .Need your help.
SQL> alter tablespace XXXXXX online;
alter tablespace XXXXX online
ERROR at line 1:
ORA-01115: IO error reading block from file 15 (block # 1)
ORA-01110: data file 15: '/xxxxxx.dbf'
ORA-27091: skgfqio: unable to queue I/O
ORA-27069: skgfdisp: attempt to do I/O beyond the range of the file
Additional information: 1
Additional information: 1
SQL> alter tablespace XXXXXX read write;
alter tablespace XXXXXXX read write
ERROR at line 1:
ORA-01646: tablespace XXXXXX is not read only - cannot make read write
Os Solaris : 5.8
Database ;Oracle 9.2.0.4.0
Thanks
USR0072fix the Operating System error.
Oracle is the victim; not the culprit -
Unable to Extend the Tablespace in BW Production Server
Hello Gurus,
I am unable to extend the tablespace - PSAPODSD in our BW production server.
While extending it throws this error
BR1052E File odsd.data53 is already used by the database - this can cause problems in backups
I am attaching the log for your reference
Options for extension of tablespace PSAPODSD (1. file)
1 * Last added file name (lastfile) ....... [/oracle/PBW/sapdata3/odsd_52/odsd.data52]
2 * Last added file size in MB (lastsize) . [2000]
3 - New file to be added (file) ........... [/oracle/PBW/sapdata2/odsd_53/odsd.data53]
4 ~ Raw disk / link target (rawlink) ...... []
5 - Size of the new file in MB (size) ..... [2000]
6 - File autoextend mode (autoextend) ..... [no]
7 # Maximum file size in MB (maxsize) ..... []
8 # File increment size in MB (incrsize) .. []
9 - SQL command (command) ................. [alter tablespace PSAPODSD add datafile '/oracle/PBW/sapdata2/odsd_53/odsd.data53' size 2000M autoextend off]
Standard keys: c - cont, b - back, s - stop, r - refr, h - help
BR0662I Enter your choice:
BR0280I BRSPACE time stamp: 2009-05-04 07.32.04
BR0663I Your choice: 'c'
BR0259I Program execution will be continued...
BR1052E File odsd.data53 is already used by the database - this can cause problems in backups
BR0669I Cannot continue due to previous warnings or errors - you can go back to repeat the last action
BR0280I BRSPACE time stamp: 2009-05-04 07.32.04
BR0671I Enter 'b[ack]' to go back, 's[top]' to abort:
BR0280I BRSPACE time stamp: 2009-05-04 07.32.10
BR0257I Your reply: 'b'
BR0673I Going back to the previous menu...
Please guide us to resolve this issue .
Imp - backup is completed successfully, I checked through sqlplus V$backup there is no active files
Thanks & Regards
ShishirHi,
login as ora<SID> and run this
sqlplus "/as sysdba"
sql> select FILE_NAME from dba_data_files where TABLESPACE_NAME='PSAPODSD';
This will show the list of the files located at os level and check whether the "odsd.data53" is present in which sapdata*. If this exist then add a new datafile.
Thanks
Arun -
Restoring only the tablespace from the database
How do we restore only a 'tablespace' from a Terabyte database without restoring the entire database.
ie... if a particular tablespace has been dropped from the database and we have the backup available for the database.
So, how do we go about it for restoring only that tablespace.
Version:10.2.0.4
OS : solaris 10
Edited by: user13364377 on Sep 29, 2010 3:49 AM
Edited by: user13364377 on Sep 29, 2010 3:51 AMIf you have a RMAN backup before dropping the tablespace then we can restore the tablespace by below method
It is a tablespace point in time recovery ,here we need to create a auxillary DB.
Recover a table/tablespace from Rman backup on same server:
===============================================
Here we have to create the auxillary database.
1.u should have valid backup of the database before dropping the tablespace.
2.create the password file of target database.
orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
3.Take backup of the control file to trace for creating the new control file for new
auxillary database/
SQL> alter database backup controlfile to trace;
sample control file:
STARTUP NOMOUNT
CREATE CONTROLFILE SET DATABASE "aux1" RESETLOGS FORCE LOGGING ARCHIVELOG
MAXLOGFILES 16
MAXLOGMEMBERS 3
MAXDATAFILES 100
MAXINSTANCES 8
MAXLOGHISTORY 454
LOGFILE
GROUP 1 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO01.LOG' SIZE 10M,//make sure here to change the location of of redo
GROUP 2 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO02.LOG' SIZE 10M, logs to new location or change the location name before
GROUP 3 'D:\ORACLE\PRODUCT\10.1.0\ORADATA\aux1\REDO03.LOG' SIZE 10M //starating the database at the end.
-- STANDBY LOGFILE
DATAFILE
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSTEM01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\UNDOTBS01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\SYSAUX01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS01.DBF',
'D:\ORACLE\PRODUCT\10.1.0\ORADATA\prafulla\USERS02.DBF'
CHARACTER SET WE8MSWIN1252
4.create the password file of auxillary database.
orapwd file=$ORACLE_HOME\dbs\PWDORCL2.ORA password=oracle
5.create the control file
sqlplus "/as sysdba"
SQL>@create.sql
6 catalog all the backuppiece to the newly created database;
catalog backuppiece 'D:\oracle\product\10.1.0\LOG_707656915_50P1';
7.We have to restore system,sysaux,undo and the tablespace which was dropped
run
set newname for datafile 1 to 'D:\oracle\product\10.1.0\oradata\aux1\system01.dbf';
set newname for datafile 2 to 'D:\oracle\product\10.1.0\oradata\aux1\undotbs01.dbf';
set newname for datafile 5 to 'D:\oracle\product\10.1.0\oradata\aux1\users02.dbf';
set newname for datafile 3 to 'D:\oracle\product\10.1.0\oradata\aux1\sysaux01.dbf';
set newname for datafile 4 to 'D:\oracle\product\10.1.0\oradata\aux1\users01.dbf';
restore tablespace SYSTEM;
restore tablespace UNDOTBS1;
restore tablespace users;
restore tablespace sysaux;
switch datafile all;
8.Take the other tablespace offline
sqlplus>alter tablespace tablespace_name offline drop;
9.recover the database prior to the time when tha table/tablespace was dropped.
RMAN> run{
2> set until time "to_date('07-01-2010 14:00:00','dd-mm-yyyy hh24:mi:ss')";
3> recover database;
4> }
10.open the database in resetlog mode.
take a transpotable tablespace backup of that tablespace and import it on the database where you dropped it. -
How to DB Storage PArameter for DSO
Hi,
I want to change DB storage parameter - Data Type and Size Category for DSO. How to go about it or i need to have a ABAP program to do the same? Presently it is
DATA Type DODS and Size Category 6 but i need to change both of these. Changing option is grayed out. Please suggest me some way out !Hi
Do u have data in the DSO?
You can change DB Storage and other settings only when the DSO is empty
Please check
Empty out your DSO and change the settings
Cheers
Maybe you are looking for
-
Trying to export a older flash file in player 8, having issues.
i have this flash file that is written for player 5. i had to republish in player 8 to take advantage of the anti aliasing features available, however, i seem to have a problem with a secondary swf that gets pulled in to the main movie. the secondary
-
Reload iPhoto .mac web gallery photos
I have reinstalled iPhoto' 08 because it stopped working. After reinstall it I can update the .mac web gallery, every gallery I add, appears in .mac web gallery after the first 4 galleries wich were uploaded before reinstall iPhoto. Is it possible to
-
Image doesnt reflect...in my pdf
Hi I have used an image in my PDF...using image control from standard library.. i have given the source from localssystem when i run i can see it displaying in my system..but not in another system.. Y so...solution pls! HARSH
-
Do I have to have 30 meg to copy 30 meg on my computor
Hello anyone out there? I am an old lady of 42 and completely computer iliterate!! I am having trouble with my ipod 30meg which my children gave me for my birthday. I filled my computor with about 1/3 of my music collection, downloading each one to m
-
I'm trying to replicate and Excel spreadsheet "schedule" in P6. In the "Gantt chart" portion of the spreadsheet each column is a day. Where I'm running into trouble is under the date in row 1, the initials of the shift supervisor on duty are listed i