How to move the lob segment in a partitioned table
My Oracle 11.2, I have a partitioned table that I want to switch to a different tablespaceAfter invoking the script, there are still inside for the insensitive lob segment table
CREATE TABLE BONGO.AAA_3
(
ID NUMBER,
DATUM DATE,
OBJEKAT BLOB
)
TABLESPACE BONGODATA_HUGE
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
LOGGING
PARTITION BY RANGE (DATUM)
(
PARTITION P_MAXVALUE VALUES LESS THAN (MAXVALUE)
LOGGING
NOCOMPRESS
TABLESPACE BONGODATA_HUGE
LOB (OBJEKAT) STORE AS
( TABLESPACE BONGODATA
ENABLE STORAGE IN ROW
CHUNK 8192
RETENTION
NOCACHE
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
)
PCTUSED 40
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 64K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
FREELISTS 1
FREELIST GROUPS 1
BUFFER_POOL DEFAULT
)
)
NOCOMPRESS
NOCACHE
NOPARALLEL
MONITORING;
How to move this lob segment in a partitioned table?or, is there a package for data move in storage?
concerning
ALTER TABLE current_table MOVE PARTITION nom_partition
TABLESPACE destination_table_space
LOB (column_name) STORE AS (TABLESPACE current_tablespace);
Tags: Database
Similar Questions
-
move the lob segment fails with invalid identifier
Why this fails:
SQL > desc APPLSYS. WF_INBOUND_TABLE
Name Null? Type
----------------------------------------- -------- ----------------------------
Q_NAME VARCHAR2 (30)
MSGID NOT NULL RAW (16)
CORRID'ART VARCHAR2 (128)
PRIORITY NUMBER
NUMBER OF THE STATE
TIMESTAMP DELAY (6)
NUMBER OF EXPIRY
TIME_MANAGER_INFO TIMESTAMP (6)
NUMBER OF LOCAL_ORDER_NO
NUMBER OF CHAIN_NO
NUMBER OF THE CSCN
DSCN NUMBER
ENQ_TIME TIMESTAMP (6)
NUMBER OF ENQ_UID
ENQ_TID VARCHAR2 (30)
DEQ_TIME TIMESTAMP (6)
NUMBER OF DEQ_UID
DEQ_TID VARCHAR2 (30)
NUMBER OF RETRY_COUNT
EXCEPTION_QSCHEMA VARCHAR2 (30)
EXCEPTION_QUEUE VARCHAR2 (30)
NUMBER OF STEP_NO
NUMBER OF RECIPIENT_KEY
DEQUEUE_MSGID RAW (16)
USER_DATA SYSTEM. WF_PAYLOAD_T
SENDER_NAME VARCHAR2 (30)
SENDER_ADDRESS VARCHAR2 (1024)
NUMBER OF SENDER_PROTOCOL
ANYDATA USER_PROP
SQL > alter table APPLSYS. WF_INBOUND_TABLE move TABLESPACE APPS_TS_TX_DATA;
Modified table.
SQL > ALTER TABLE APPLSYS. WF_INBOUND_TABLE MOVE LOB (USER_PROP) STORE DID (TABLESPACE APPS_TS_TX_DATA);
*
ERROR on line 1:
ORA-00904: "USER_PROP": invalid identifieruser600570 wrote:
Well, no matter what the type is be, how to move to this segment?The segment does not move when the corresponding table is moved to new tablespace?
At least that's what I see.SQL> select * from v$version ; BANNER ---------------------------------------------------------------- Oracle Database 10g Enterprise Edition Release 10.2.0.4.0 - 64bi PL/SQL Release 10.2.0.4.0 - Production CORE 10.2.0.4.0 Production TNS for Solaris: Version 10.2.0.4.0 - Production NLSRTL Version 10.2.0.4.0 - Production SQL> create table t nologging as select * from applsys.wf_inbound_table where 1 = 2 ; Table created. SQL> select dbms_metadata.get_ddl('TABLE','T') from dual ; DBMS_METADATA.GET_DDL('TABLE','T') -------------------------------------------------------------------------------- CREATE TABLE "APPS"."T" ( "Q_NAME" VARCHAR2(30), "MSGID" RAW(16), "CORRID" VARCHAR2(128), "PRIORITY" NUMBER, "STATE" NUMBER, "DELAY" TIMESTAMP (6), "EXPIRATION" NUMBER, "TIME_MANAGER_INFO" TIMESTAMP (6), "LOCAL_ORDER_NO" NUMBER, "CHAIN_NO" NUMBER, "CSCN" NUMBER, "DSCN" NUMBER, "ENQ_TIME" TIMESTAMP (6), "ENQ_UID" NUMBER, "ENQ_TID" VARCHAR2(30), "DEQ_TIME" TIMESTAMP (6), "DEQ_UID" NUMBER, "DEQ_TID" VARCHAR2(30), "RETRY_COUNT" NUMBER, "EXCEPTION_QSCHEMA" VARCHAR2(30), "EXCEPTION_QUEUE" VARCHAR2(30), "STEP_NO" NUMBER, "RECIPIENT_KEY" NUMBER, "DEQUEUE_MSGID" RAW(16), "USER_DATA" "SYSTEM"."WF_PAYLOAD_T" , "SENDER_NAME" VARCHAR2(30), "SENDER_ADDRESS" VARCHAR2(1024), "SENDER_PROTOCOL" NUMBER, "USER_PROP" "SYS"."ANYDATA" ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505 PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "APPLSYSD" OPAQUE TYPE "USER_PROP" STORE AS LOB ( ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 CACHE STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505 PCTINCREASE 50 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) SQL> select owner, table_name, column_name, segment_name, tablespace_name from dba_lobs 2 where table_name = 'T' ; OWNER TABLE_NAME ------------------------------ ------------------------------ COLUMN_NAME ----------------------------------------------------------------------------------------------------------------------------------- SEGMENT_NAME TABLESPACE_NAME ------------------------------ ------------------------------ APPS T USER_PROP SYS_LOB0000365381C00035$$ APPLSYSD SQL> alter table t move tablespace APPLSYSX ; Table altered. SQL> select dbms_metadata.get_ddl('TABLE','T') from dual ; DBMS_METADATA.GET_DDL('TABLE','T') -------------------------------------------------------------------------------- CREATE TABLE "APPS"."T" ( "Q_NAME" VARCHAR2(30), "MSGID" RAW(16), "CORRID" VARCHAR2(128), "PRIORITY" NUMBER, "STATE" NUMBER, "DELAY" TIMESTAMP (6), "EXPIRATION" NUMBER, "TIME_MANAGER_INFO" TIMESTAMP (6), "LOCAL_ORDER_NO" NUMBER, "CHAIN_NO" NUMBER, "CSCN" NUMBER, "DSCN" NUMBER, "ENQ_TIME" TIMESTAMP (6), "ENQ_UID" NUMBER, "ENQ_TID" VARCHAR2(30), "DEQ_TIME" TIMESTAMP (6), "DEQ_UID" NUMBER, "DEQ_TID" VARCHAR2(30), "RETRY_COUNT" NUMBER, "EXCEPTION_QSCHEMA" VARCHAR2(30), "EXCEPTION_QUEUE" VARCHAR2(30), "STEP_NO" NUMBER, "RECIPIENT_KEY" NUMBER, "DEQUEUE_MSGID" RAW(16), "USER_DATA" "SYSTEM"."WF_PAYLOAD_T" , "SENDER_NAME" VARCHAR2(30), "SENDER_ADDRESS" VARCHAR2(1024), "SENDER_PROTOCOL" NUMBER, "USER_PROP" "SYS"."ANYDATA" ) PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS NOLOGGING STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT) TABLESPACE "APPLSYSX" OPAQUE TYPE "USER_PROP" STORE AS LOB ( ENABLE STORAGE IN ROW CHUNK 8192 PCTVERSION 10 CACHE STORAGE(INITIAL 40960 NEXT 40960 MINEXTENTS 1 MAXEXTENTS 505 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT)) SQL> select owner, table_name, column_name, segment_name, tablespace_name from dba_lobs 2 where table_name = 'T' ; OWNER TABLE_NAME ------------------------------ ------------------------------ COLUMN_NAME ----------------------------------------------------------------------------------------------------------------------------------- SEGMENT_NAME TABLESPACE_NAME ------------------------------ ------------------------------ APPS T USER_PROP SYS_LOB0000365381C00035$$ APPLSYSX SQL> drop table t purge ; Table dropped.
If you want to be able to move the segment to a different tablespace to the table, I guess that's not possible. Oracle only allows LOB to be stored in a separate tablespace as the corresponding table provided that they are defined as the LOBs explicitly during the creation of the table, unlike the LOB created by oracle internally because of the column datatype being ANYDATA as in this case.
-
Calculate the free space of the lob segment / reclaim space?
Friends...
DB: 11 GR 2
OS: Linux
I am trying shrink lob segment and recover the free space between the business segments.
This area in Oracle DB is new to me so try to learn and to shrink the segment.
I went through various metalink doco (386341.1) but not be able to get answers for below...
Issues related to the:
1. how much free space is available in the lob segment?
2 can I assume 'no LOB DATA' as the free space currently and even will be recovered once the segment will be shrunk?
3. no disadvantage of using "ALTER TABLE... SHRINK SPACE.
4. is it true if storage segment is 100 GB as many redo will be generated when trying to alter table... shrink the space?
I'm following the steps below.
1 find Segment name-> sys_lob123
2. find the size of storage - > 100 GB
3. find the size of the LOB data-> 70
4. find the size of the data not LOB-> 30
2. the storage size
Select 'storage' from dba_extents bytes
where nom_segment = 'sys_lob123. '
100 GB
3. the size of the LOB
Select dbms_lob.getlength (col_lob) in the table_lob;
70 GB
4. the size of the LOB data not
100-70 = 30 GB (i.e. #3 - #2)
Thanks in advance and enjoy your time looking into this...
Use DBMS_REDEFINITION to reorganize the LOB segment, it is the best way to retrieve a LOB segment space. Also use the clause "MEANS of COMPRESS" and SECURE LEADER, creating the temp table. There is no reason that you can use the BASIC FILE. It's online process, which means that your app can stay up to... However, make sure that monitor you the database when executing redef, as it can cause conflicts and slow down your application, in which case you must kill the reorg...
If this process is not feasible or overwhelms you, "ALTER TABLE MOVE" is another option.
With 'Displacement of Alter table', you need to rebuild all indexes after you move the LOB segment. Don't forget this is an offline process and your application needs a time out while you do this.
Here is the query to list the 10 LOBs albums in your database-
fixed line 160
Col a20 PROPRIETARY format
Col TABLE_NAME format a30
Col COLUMN_NAME format a30
Col nom_segment format a30
size col 999 999 999 format
SELECT *.
FROM (SELECT b.owner,
b.table_name,
b.column_name,
a.segment_name,
SUM (a.bytes) / (1024 * 1024) "size".
FROM dba_segments a, b dba_lobs
WHERE a.segment_name LIKE '% SYS_LOB '.
AND a.segment_name = b.segment_name
AND a.owner NOT IN ('SYS', 'SYSTEM', 'GENERAL', "OUTLN")
B.owner GROUP,
b.table_name,
b.column_name,
a.segment_name
ORDER BY DESC 5)
WHERE ROWNUM<>
-
Displacement of the LOB segments.
Is there a a way to move LOB segment, keeping the segment of the table? The statement:
ALTER table < tab > move lob (< lob >) store as (tablespace < TBS >)
moves not only the LOB segment, but also table segments, so consumes a lot of resources, needs to rebuild indexes etc.
Thank you.
If you move the lob segment, then the data of the line must change because the lob is in a different place. There is no way around that. The row stores a pointer to LOB. Oracle has decided to implement this in a way that makes all change of rowid (you can't influence that).
So, as I said - it's life.
-
Move the LOB to a new tablespace
I want the users tablespace LOB to some other tablespace. But when I tried I got the error set-aside. I moved all the objects corresponding to the particular schema, but not the LOB. Can you please explain why Cant I move the LOB. And if you can explain that I want to know the importance of the lob indexex. Thank you in advance.
SQL > select TABLE_NAME, INDEX_NAME, TABLESPACE_NAME from dba_lobs where owner = 'PC_DOM ';
TABLESPACE_NAME INDEX_NAME TABLE_NAME
------------------------------ ------------------------------ ------------------------------
PCSF_DOMAIN SYS_IL0000077924C00002$ $ USERS
PCSF_CPU_USAGE_SUMMARY SYS_IL0000077933C00006$ $ USERS
PCSF_REPO_USAGE_SUMMARY SYS_IL0000077936C00005$ $ USERS
PCSF_USER SYS_IL0000077940C00002$ $ USERS
PCSF_GROUP SYS_IL0000077944C00002$ $ USERS
PCSF_ROLE SYS_IL0000077948C00002$ $ USERS
PCSF_DOMAIN_USER_PRIVILEGE SYS_IL0000077952C00002$ $ USERS
PCSF_DOMAIN_GROUP_PRIVILEGE SYS_IL0000077956C00002$ $ USERS
8 selected lines.
SQL > alter table PCSF_DOMAIN move lob (SYS_IL0000077924C00002$) store as (tablespace TS_PC_DOM);
ALTER table PCSF_DOMAIN move lob (SYS_IL0000077924C00002$) store as (tablespace TS_PC_DOM)
*
ERROR on line 1:
ORA-00942: table or view does not existDo not use segment name of LOB but about the name of the column in the table and qualify the name of the table with the owner of the table if you are not logged in as owner of the table:
Try:
alter table PC_DOM.PCSF_DOMAIN move lob (
) store as ( tablespace TS_PC_DOM ); Each LOB column is materialized with 2 segments:
-a LOB segment containing LOB data
-a LOB index that is a structure designed to facilitate access to the LOB data in the LOB segment.Edited by: P. Forstmann on 22 July. 2011 20:48
Edited by: P. Forstmann on 22 July. 2011 20:52
-
How to move a LOB to a different tablespace
Hello
I have a PRODUCT table where one of its fields is a LOB.
The table has been created the TBL1 tablespace and Lob his field to a tablespace dedicad TBL_LB1
I have to move the table to a different tablespace.
The statement that I would use is
ALTER TABLE PRODUCT MOVE TABLESPACE storage TBL2 (initial then the 4M 4 M);
Can you tell me how to write the statement to move the Lob field to the new tablespace TBL_LB2?
I don't know what syntax to use to move the Lob of TBL_LB1 to TBL_LB2 field
Thank you
Published by: user12180597 on 14-Dec-2009 6.20Hello
Something like that
ALTER TABLE Product MOVE LOB(
) STORE AS ( TABLESPACE TBL_LB2 ) Concerning
Anurag -
Can W7 \64 bit\FF42.0\How I move the profiles?
Everything seems to work perfectly. But I realized that I should be able to find how to move my profile to another drive on my computer somewhere in the profile itself. I've looked everywhere I can think of and can't find this info. If you can tell me where it is, maybe I can manage. But if not, can you tell me how to move the profiles? My os is Windows 7 Pro 64 bit. I am running Firefox 42.0. Your guesses are all correct, except that I'm not sure about the plugin from Adobe. Thanks for any help.
You can use the Profile Manager to create a new profile on a different hard drive folder by clicking on the button "choose a folder.
Be sure to select a new empty file and not a folder that already contains files.You can transfer files from the current profile folder to this folder.
-
How to move the search return bar to the previous version?
Using the latest update of Firefox gave me a new search bar, one where I can't change quickly, search engines to the contrary having to go into a menu to do so. This is detrimental for me since I use each search engine search suggestions, I installed. I can't do that. How to move the search return bar to the previous version?
I found a solution. If you go in Subject: config, then find the browser.search.showOneOffButtons boolean and rocking that it restores the old functionality. (You may have to restart your browser)
Note that, as always, to edit your subject: config at your own risk.
credit: askvg.com
-
In FF 29,0, how to move the address bar on the top of the tab bar?
It's OK in Firefox 28 and less than the value of browser.tabs.onTop = false to move the address bar on the top of the tab bar. But at 29 of Firefox, I can't find the browser.tabs.onTop
who can tell me how to move the address bar to the top of the tab bar?Read this article. This article will help you to customize Firefox commands, buttons, and toolbars.
-
I want to know how to move the cards while trying to play stings on pogo
Original title:
Pogo games
Hello, it was a gift of birthday a week ago. So, I'm new on a laptop that I think I'm from fresh all over again. But here's my question: I want to know how to move the cards trying to play spades on pogo. Don't know how to slide or push enter or even pushing the button on the finger. Please help I really like playing Spades and pinochle. Thank you
You should ask in the forum games Pogo, not Microsoft.
http://Games-Forum.Pogo.com/
-
HOW TO MOVE THE FLAG POINT MAP, MIRCOSOFT 2013
HOW TO MOVE THE FLAG POINT MAP, MIRCOSOFT 2013
Hello
It is not a Community Forum for MapPoint.
Ask here
Highway, Streets & Trips, MapPoint Forum:
http://social.Microsoft.com/forums/en-us/streetsandtrips/threadsOther Support options (not free)
Support for MapPoint, streets & trips and Highway:
http://support.Microsoft.com/ph/851Don
-
HOW TO MOVE THE FLAGS IN MICROSOFT MAP POINT 2013
HOW TO MOVE THE FLAGS IN MICROSOFT MAP POINT 2013
I suggest that ask you in this Microsoft forum:
Highway, streets and Trips, MapPoint .
Thank you.
-
How to move the MSWMM files and keep the data on my computer?
I downloaded digital film from my camera to a destination on my D drive as a file MSWMM (collections), and whenever I try to move the downloaded film (collection), it does not recognize the movie more.
How to move the MSWMM files and keep the data on my computer?
The mswmm file is the project file, not a video.
Think of it as a recipe for a cake, it only tells you what to do with the ingredients, but does not include the ingredients.
The mswmm file tells the computer to look in a certain folder to use a video or audio file.
If you move the file, then MM knows not where is the file, then you must tell it, by right clicking on a red x on the timeline and then choose search for the file. -
How to move the original system to the SSD newly installed without an optical drive?
I want to buy a W530 and spare SSD upgrade.
I want to order one without a DVD player.
How to move the system of origin, drivers and other software for the SSD newly installed without an optical drive?
Hope someone could help me. Thank you.
The two utilities that I mentioned manage alignment automatically. Also, I photographed my hard drive, then restored the SSD. I have no clone, which means a direct copy of the HDD to the SSD.
I just went through this myself in July, using Acronis True Image 2012 to get my existing on my 256 GB SSD mSATA HARD disk image. It worked like a charm. I checked that the SSD has been properly aligned.
See:
and:
Now stop worrying!
-
Make a bunch of audio files, placed in a folder on my desktop. Files initially sent to RealPlayer to burn, but when finished burning CD and went to read a CD, folder got seized by Media Player, 'Indexed' and disappeared from the office. I'm a relatively new computer user, and I need to learn more about file paths, how to view the path FULL of a file on my computer and how to type (create) full path when I need to. The "Indexing" feature seems to erase this lesson for me, and after having spent four hours trying to find Vista instructions on "How to move the file from one place to another", I gave up! Windows 'Help and Support' on my computer gives wrong directions. It states that if I right click on a folder > properties, a dialog box opens with a tab by which I can move my account. There is no tab location here. I found locations tab when right click on the "Mobile" folder, but still no option to "move file". No idea what is the folder "Roaming" or why it's on my computer. I want my audio files in the My Music folder, but this place is "access denied." Don't know how to get the audio file it in any case, but if anyone has any advice, I would be very happy! Thank you. PS - I had no problem moving folders in XP. I don't like the idea that a computer is to decide where to put my files. I want to control where I put my files. I don't like the way search works under Vista. I liked the XP search companion better because, for a computer fool like me, it was really easy to organize and find files and folders and had an option specific to find audio and video file TYPES.
Here is an article on how to move your personal folders in Vista: http://www.howtogeek.com/howto/windows-vista/moving-your-personal-data-folders-in-windows-vista-the-easy-way/. If you're talking about the special folders (such as photos, Documents, office...), then here is an article on how to move: http://www.winhelponline.com/articles/95/1/How-to-move-the-special-folders-in-Windows-Vista.html.
If you have trouble with the search after you move the files, then rebuild the index: http://www.tech-recipes.com/rx/2103/vista_rebuilding_the_search_index/. Here is an article on how to use Indexing Options in Vista that may be useful for you: http://www.vistax64.com/tutorials/69581-indexing-options.html.
If the above does not help, your problem seems to relate to the image of the files/folders and their interactions with Media Center (which operate on different other folders). Please repost your question in images and video Forum at: http://social.answers.microsoft.com/Forums/en-US/vistapictures/threads where the people who specialize in issues of the image will be more than happy to help you with your quesitons.
Good luck!
Lorien - MCSA/MCSE/network + / has + - if this post solves your problem, please click the 'Mark as answer' or 'Useful' button at the top of this message. Marking a post as answer, or relatively useful, you help others find the answer more quickly.
Maybe you are looking for
-
How can I get a refund or credit? I'll never watch this movie or this type of film.
-
Sound after Vista->; downgrade XP on Satellite M100 problem
My laptop is Toshiba Satellite M100. After bios upgrade (5.10-> 2.80) and downgrade OS (Vista-> XP) I have a sound problem.There is not a sound from the speakers. But the line out (headphone) sound is ptesent.I use drivers sound card for XP on the of
-
compaq620: all the exe files do not work. I can not install any application
Please help me on this problem... I tried solutions like deleting this file open exe, restore the system while pressing f8 keys etc., but they did not work... so please give me a successful solution
-
Windows 7 backup could not write to disc error 0 x 80070005 network "access denied."
I spent the last hour looking at the Knowledge Base. There just aren't clear answers, so let's try again. I am running Window 7 profressionelle. I'm doing a return upwards using the backup of Windows 7. Backup target is a network (Western Digital MyB
-
Substitution of DND using MLPP
Hello I have a requirement of a customer of the hotel operators can call room even that their phones are on DND. I'm looking for workaround to set this up. If anyone can share configuration of DND example substitute using MLPP or any other workaround