ALTER TABLESPACE(7) SQL Commands ALTER TABLESPACE(7)NAME
ALTER TABLESPACE - change the definition of a tablespace
SYNOPSIS
ALTER TABLESPACE name RENAME TO newname
ALTER TABLESPACE name OWNER TO newowner
DESCRIPTION
ALTER TABLESPACE changes the definition of a tablespace.
You must own the tablespace to use ALTER TABLESPACE. To alter the owner, you must also be a direct or indirect member of the new owning
role. (Note that superusers have these privileges automatically.)
PARAMETERS
name The name of an existing tablespace.
newname
The new name of the tablespace. The new name cannot begin with pg_, as such names are reserved for system tablespaces.
newowner
The new owner of the tablespace.
EXAMPLES
Rename tablespace index_space to fast_raid:
ALTER TABLESPACE index_space RENAME TO fast_raid;
Change the owner of tablespace index_space:
ALTER TABLESPACE index_space OWNER TO mary;
COMPATIBILITY
There is no ALTER TABLESPACE statement in the SQL standard.
SEE ALSO
CREATE TABLESPACE [create_tablespace(7)], DROP TABLESPACE [drop_tablespace(7)]
SQL - Language Statements 2010-05-14 ALTER TABLESPACE(7)
Check Out this Related Man Page
ALTER TABLESPACE(7) SQL Commands ALTER TABLESPACE(7)NAME
ALTER TABLESPACE - change the definition of a tablespace
SYNOPSIS
ALTER TABLESPACE name RENAME TO newname
ALTER TABLESPACE name OWNER TO newowner
DESCRIPTION
ALTER TABLESPACE changes the definition of a tablespace.
You must own the tablespace to use ALTER TABLESPACE. To alter the owner, you must also be a direct or indirect member of the new owning
role. (Note that superusers have these privileges automatically.)
PARAMETERS
name The name of an existing tablespace.
newname
The new name of the tablespace. The new name cannot begin with pg_, as such names are reserved for system tablespaces.
newowner
The new owner of the tablespace.
EXAMPLES
Rename tablespace index_space to fast_raid:
ALTER TABLESPACE index_space RENAME TO fast_raid;
Change the owner of tablespace index_space:
ALTER TABLESPACE index_space OWNER TO mary;
COMPATIBILITY
There is no ALTER TABLESPACE statement in the SQL standard.
SEE ALSO
CREATE TABLESPACE [create_tablespace(7)], DROP TABLESPACE [drop_tablespace(7)]
SQL - Language Statements 2010-05-14 ALTER TABLESPACE(7)
hi buddies
pls help in this matter
i have file like this input file
--------------------------
(PARTITION PARTITION_1 VALUES LESS THAN (101, 16383 ) TABLESPACE PART_1
,PARTITION PARTITION_2 VALUES LESS THAN (101, 32766 ) TABLESPACE PART_2
,PARTITION PARTITION_3 VALUES LESS THAN (101,... (3 Replies)
I am trying to update a script which I had created to monitor tablespace usage.
Originally the sql spooled out to a text file anything with more than 75% used.
I have been asked to change this.
Now the sql must spool out all tablespaces.
The script I have to write should scan the file for... (4 Replies)
Hi,
I need to execute a script to find the tablespace size in oracle.But i get an error.:confused:
Script Executed:-
#!/bin/ksh
ORACLE_SID= oracelinstance
ORACLE_HOME= oracle path
PATH=$ORACLE_HOME/bin
export ORACLE_SID ORACLE_HOME PATH
sqlplus... (4 Replies)
hello,
i have a dynamic file, which is generated by an ORACLE tool. Now i want to change a string, which begins with TABLESPACE following by "Name of Tablespace". The name of the new TABLESPACE is static.
Example: TABLESPACE new : APPLI
old: TABLESPACE "AMITTEL"
new: TABLESPACE "APPLI"
... (4 Replies)
Hi,
Here is my pattern
CREATE USER LZ
IDENTIFIED BY VALUES 'A0144280ESD70'
DEFAULT TABLESPACE USERS
TEMPORARY TABLESPACE TEMP1 PROFILE DEVELOPER_D_1
ACCOUNT UNLOCK
/
The Sed command must look for the Line that contains TEMPORARY TABLESPACE and replace the immediate word... (4 Replies)
this is a little more complex than that. I have a text file and I need to find all the distinct words that appear in a line after the word TABLESPACE
when I grep for just the word tablespace, I get:
how do i parse this a little better so i have a smaller file to read?
This is just an... (4 Replies)
I am trying to replace the line which has string "tablespace" not case senstive....
with below simple script: mysrcipt.sh
sed "s/.*/TABLESPACE USERS/g" create_table > tmp
mv tmp create_table
Is there any better way to do it? If Search string tooooooo long it will be tough to code in... (4 Replies)
I have prepared the below script to monitor the tablespace and alert the users whenever it reaches a threshold limit.
#!/bin/sh
. /home/.profile
sqlplus -s $LOGON << .eof > $scripts/check_tablespace.temp
set pages 0
select tablespace_name, free_percent
from (
SELECT... (4 Replies)
I'm new to unix script, and I need to check the tablespaces daily, here is the script(quite simple), but it does not work. Did I missed something ?
Please guide me, Many thanks !
#!/bin/sh
echo "ORA TABLEASPACE:"
sqlplus system/oracle as sysdba;
set pagesize 9999;
set linesize 132;
... (5 Replies)
Hi,
I am want find and replace in following content in the file.
i want to repalce a word
TABLESPACE XCRM_<ANY_CHAR>
to TABLESPACE XCRM
Sample File to Replace :
LOB(COMPLEX_VALUE) STORE AS
(
TABLESPACE XCRM_MED_D_NEW
STORAGE(INITIAL 64K BUFFER_POOL DEFAULT)
ENABLE... (3 Replies)
Buddies, I am writing the below script 'tab.sh' to monitor the tablespaces in Database:-
-------------------------------
export ORACLE_HOME=/home/oracle/app/oracle/product/11.2.0/dbhome_2
export PATH=$PATH:$ORACLE_HOME/bin
export ORACLE_SID=orcl
sqlplus system/oracle as sysdba <<EOF
spool... (5 Replies)
Hi colleagues,
I have the followind script.
db2 -x "select substr(TBSPACE,1,20) TABLESPACE from syscat.tables where tabschema = 'SCHEMA' and tabname like '%XXXX' group by TBSPACE order by TBSPACE" | awk '{print $1}' | while read tablespace
do
db2 "list tablespaces show detail" |grep -p -w... (5 Replies)
Hi Folks,
I am using db2 command -> db2 list tablespace show detail
Tablespace ID = 10
Name = TSCDDHLMSUM
Type = Database managed space
Contents = All permanent data.... (5 Replies)