Why and How we need to rebuild global Index in Oracle 11g
Views: 3650 Athar Fahad
This Video will teach you How to Move Object one Table Space to Another | How to Rebuild the Index ? move table from one tablespace to another in oracle 11g oracle move schema to another tablespace oracle how to move objects to another tablespace oracle 11g move schema to another tablespace alter table move tablespace oracle 8i oracle move table script oracle move cluster to new tablespace oracle move table example rebuild index oracle script alter index rebuild online parallel oracle rebuild all indexes oracle index rebuild online vs offline oracle rebuild partitioned index index rebuild oracle best practice index rebuild script in oracle 11g
Views: 1186 Oracle PL/SQL World
1.Shrink the Table: Shrinking is started from 10g. In this method I’m using user u1 and table name sm1. Now I’m deleting some rows in sm1 COUNT ---------- 1048576 Table sm1 has 1048576 rows. [email protected]: delete from sm1 where deptno=10; 262144 rows deleted. I deleted above number of rows. Rows COUNT ---------- 786432 And I’m giving commit [email protected]: commit; Commit complete. So now we have 786432 rows in sm1 table. Now see the following command [email protected]: select OWNER,TABLESPACE_NAME,SEGMENT_NAME,SEGMENT_TYPE,BYTES/1024/1024||' mb'"space",BLOCKS,EXTENTS from dba_segments where tablespace_name like 'U%TS'; OWNER TABLESPACE_NAME SEGMENT_NAME SEGMENT_TYPE space BLOCKS EXTENTS ----- --------------- ------------- ------------- ------ ---------- ---------- U1 U1TS SM1 TABLE 29 mb 3712 44 After I deleted some rows in sm1 table still above result showing same values, so now our duty is shrink this table. This is done by following 2 ways, i By using COMPACT key word: In this method shrinking is done in two phases. In the first phase all fragmented space are just defragmented, but still the High Water Mark is persist with last used block only. That mean used free blocks are not de allocated and HWM is not updated here. Issue the following command before use shrink command. [email protected] alter table sm1 enable row movement; Table altered. There is particular use with above command, when we shrink the table all rows are moves to contiguous blocks, so here row movement should be done. By default the row movement is disabled for any table, so above command enabled the row movement. Then execute shrink command now. [email protected]: alter table sm1 shrink space compact; Table altered. Now see the space of table by using below command. [email protected]: select OWNER,TABLESPACE_NAME,SEGMENT_NAME,SEGMENT_TYPE,BYTES/1024/1024||' mb'"space",BLOCKS,EXTENTS from dba_segments where tablespace_name like 'U%TS'; OWNER TABLESPACE_NAME SEGMENT_NAME SEGMENT_TYPE space BLOCKS EXTENTS ----- --------------- ------------- ------------- ------ ---------- ---------- U1 U1TS SM1 TABLE 29 mb 3712 44 So here seems nothing happened with above shrink command, but internally the fragmented space is defragmented. But the high water mark is not updated, used free blocks are also not de allocated. For de allocating the used blocks we have to execute below command. This is the second phase. [email protected]: alter table sm1 shrink space; Table altered. Now see the space by using below command. [email protected]: select OWNER,TABLESPACE_NAME,SEGMENT_NAME,SEGMENT_TYPE,BYTES/1024/1024||' mb'"space",BLOCKS,EXTENTS from dba_segments where tablespace_name like 'U%TS'; OWNER TABLESPACE_NAME SEGMENT_NAME SEGMENT_TYPE space BLOCKS EXTENTS ----- --------------- ------------- ------------- ---------- ---------- ---------- U1 U1TS SM1 TABLE 20.8125 mb 2664 36 So now the space of sm1 table is reduced. Note: Actually the alter table sm1 shrink space command will complete these two phases of the shrinking of table at a time. But here we done shrink process in two phases because when we use alter table sm1 shrink space command the table locked temporarily some time period, during this period users unable to access the table. So if we use alter table sm1 shrink space compact command the table is not locked but space is defragmented. When we not in business hours issue the second phase shrink command then users are won’t get any problem. ii Because of above method the table dependent objects are goes to invalid state, to overcome this problem we have to use below command. [email protected]: alter table sm1 shrink space cascade; Table altered. The above command also shrinks the space of all dependent objects. We also do this in two phases like above two phases. See the below command. [email protected]: alter table sm1 shrink space compact cascade; Table altered. And then [email protected]: alter table sm1 shrink space cascade; Table altered. Transporting tablespace to different platform by Using RMAN : https://www.youtube.com/watch?v=CN401PUKK4A Oracle EBS apps Upgrade from 12 2 to 12 2 5 (start CD 51) : https://www.youtube.com/watch?v=zeO4goqR70Y Transport tablespace by using RMAN.: https://www.youtube.com/watch?v=YG6kWX7Par8
Views: 7402 BhagyaRaj Katta
Online table maintenance is trivial in the current versions. But what about those of us that are still stuck on the older versions? Can I avoid lengthy downtime when changing table structures ? blog: https://connor-mcdonald.com twitter: https://twitter.com/connor_mc_d Subscribe as new tech videos come every week!
Views: 448 Connor McDonald
Stop rebuilding Global Indexes! Stop worrying about invalidating Global Indexes! Oracle 11g gave us "UPDATE GLOBAL INDEXES". 12c provides a huge improvement: orphaned_entries! In this tutorial, Oracle Certified Master John Watson demonstrates how 11g and 12c handle Global Index maintenance with orphaned entries and overnight maintenance job PMO_DEFERRED_GIDX_MAINT_JOB.
Views: 2671 SkillBuilders
The bigger your indexes are, the harder your index maintenance falls. Is it better to rebuild big indexes? Or should you reorganize? Learn the pros and cons of each command.
Views: 11654 Kendra Little's SQL Workbooks & Dear SQL DBA
This video will provide you a tutorial on when to rebuild or reorganize a SQL Index. If an index is fragmented greater than 35% then you will want to rebuild else if it is between 5% and 35% then you will want to reorganize the index. Github Script: https://github.com/ProfessorPitch/ProfessorPitch/tree/master/SQL/Indexes Microsoft Documentation: https://docs.microsoft.com/en-us/sql/relational-databases/indexes/reorganize-and-rebuild-indexes?view=sql-server-2017
Views: 96 ProfessorPitch
In the last video, we wrote up the SQL to create three tables: CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, CONSTRAINT users_pk PRIMARY KEY (user_id) ); CREATE TABLE projects( project_id NUMBER, Project_name VARCHAR2(50 CHAR) UNIQUE, creator VARCHAR2(50 CHAR) NOT NULL, CONSTRAINT projects_pk PRIMARY KEY (project_id), CONSTRAINT projects_users_fk FOREIGN KEY (creator) REFERENCES users (username) ON DELETE CASCADE ); CREATE TABLE project_users( project_id NUMBER NOT NULL REFERENCES projects (project_id) ON DELETE CASCADE, user_id NUMBER NOT NULL REFERENCES users (user_id) ON DELETE CASCADE, CONSTRAINT project_users_pk PRIMARY KEY (project_id, user_id) ); I'm going to increase the size of the users table a bit by adding a first and last name column. CREATE TABLE users( user_id NUMBER, username VARCHAR2(50 CHAR) UNIQUE, first_name VARCHAR2(50 CHAR), last_name VARCHAR2 (50 CHAR), CONSTRAINT users_pk PRIMARY KEY (user_id) ); But before we finish this design, we should consider indexing certain columns. What columns should we index? Well, as a reminder, the columns that are indexed by default are columns with the UNIQUE constraint, and those that are labeled as primary keys. Columns that are not indexed but often should be are those labeled as a foreign key. The column that jumps out the most to me is the creator column of the project table. It's the only foreign key that is not part of some index. Let's fix this by creating our first index. The way we do that is with the CREATE INDEX command. CREATE INDEX projects_creator_ix ON projects (creator) What naming convention are we following for the index? We are naming it by the table name, followed by an underscore, followed by the column, followed by an underscore, followed by an ix (for index). In this situation it does not apply, but if our foreign key column is labeled as UNIQUE, we can add the UNIQUE keyword like this: CREATE UNIQUE INDEX projects_creator_ix ON projects (creator) Now if you want to get rid of an INDEX, you can use this command: DROP INDEX projects_creator_ix Now, if we want to select data from the user table and the project table we can do that much faster. That's because the foreign key and column it references are both indexed and those are the columns we would do the join on. We will discuss how to do joins in a future video. So what are some potential problems with this database design? Overall, it is pretty good. With this design though we need to make sure there is no way for someone to update a user's username. In the next video we are going to discuss why. ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ Support me on Patreon! http://www.patreon.com/calebcurry Subscribe to my newsletter: http://bit.ly/JoinCCNewsletter Donate!: http://bit.ly/DonateCTVM2. ~~~~~~~~~~~~~~~Additional Links~~~~~~~~~~~~~~~ More content: http://CalebCurry.com Facebook: http://www.facebook.com/CalebTheVideoMaker Google+: https://plus.google.com/+CalebTheVideoMaker2 Twitter: http://twitter.com/calebCurry Amazing Web Hosting - http://bit.ly/ccbluehost (The best web hosting for a cheap price!)
Views: 10118 Caleb Curry
As soon as you have more than one index on a table, you’re going to start seeing fragmentation. Many people know that this fragmentation is bad, but why is it bad? And what is the best way to get rid of it? Come find out from the person who wrote the tools for detecting and removing index fragmentation. In this session, you’ll learn how fragmentation occurs and why the process that leads to it can often be as damaging to performance as the fragmentation itself. You’ll also learn how to test for fragmentation, the different methods of removing it, and everything you need to consider when putting together an appropriate fragmentation-management strategy. CEO / Owner Paul is a Microsoft SQL Server MVP and a Microsoft Regional Director. He spent 9 years working on the SQL Server team, writing DBCC CHECKDB, and ultimately responsible for the entire Storage Engine. In 2007 Paul left Microsoft to co-own and run SQLskills.com, and is a world-renowned author, consultant, and top-rated speaker on SQL Server performance tuning, administration, internals, and HA/DR. When he's not tweeting, blogging, or helping someone recover from a disaster, he's likely to be underwater somewhere in the world with his wife, Kimberly L. Tripp.
Views: 5937 DBAFundamentals
steps to relocate a table to a new tablespace
Views: 3182 Wysheid Wysheid
Watch and learn concepts of SQL Index In Oracle Database. In this tutorial you will learn about B-Tree Index and Function based Index. ------------------------------------------------------------------------ ►►►LINKS◄◄◄ Blog : Previous Tutorial ► ------------------------------------------------------------------------- ►►►Help Me In Getting A Job◄◄◄ ►Help Me In Getting A Good Job By Connecting With Me on My LinkedIn and Endorsing My Skills. All My Contact Info is Down Below. You Can Also Refer Me To Your Company Thanks ------------------------------------------------------------------------- Copy Cloud referral link || Use this link to join copy cloud and get 20GB of free storage https://copy.com?r=kb4rc1 -------------------------------------------------------------------------- ►Make sure you SUBSCRIBE and be the 1st one to see my videos! -------------------------------------------------------------------------- Amazon Wishlist: http://bit.ly/wishlist-amazon ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ►►►Find me on Social Media◄◄◄ Follow What I am up to as it happens on https://twitter.com/rebellionrider https://www.facebook.com/imthebhardwaj http://instagram.com/rebellionrider https://plus.google.com/+Rebellionrider http://in.linkedin.com/in/mannbhardwaj/ http://rebellionrider.tumblr.com/ http://www.pinterest.com/rebellionrider/ You can also Email me at for E-mail address please check About section Please please LIKE and SHARE my videos it makes me happy. Thanks for liking, commenting, sharing and watching more of our videos This is Manish from RebellionRider.com ♥ I LOVE ALL MY VIEWERS AND SUBSCRIBERS
Views: 43239 Manish Sharma
Hello Today I am showing you how to create tablespace. Alter tablespace datafile using fileid & filename and resize datafile. How to check Tablespace Size. How to check datafile Size in MB. How to drop Tablespace including contents and all Datafiles of these tablespace.
Views: 2156 Parag Mahalle
Oracle Database Performance Tuning - Optimizer Statistics Gathering - 11g, 12c In this video we explain how to gather the database optimizer statistics #performancetuning, #oracledatabase, #oracle, #database, #optimizerstatistics, #learning, About Optimizer Statistics Collection In Oracle Database, optimizer statistics collection is the gathering of optimizer statistics for database objects, including fixed objects. The database can collect optimizer statistics automatically. You can also collect them manually using the DBMS_STATS package. Oracle Database Performance Tuning - Optimizer Statistics Gathering - 11g, 12c Purpose of Optimizer Statistics Collection The contents of tables and associated indexes change frequently, which can lead the optimizer to choose suboptimal execution plan for queries. To avoid potential performance issues, statistics must be kept current. To minimize DBA involvement, Oracle Database automatically gathers optimizer statistics at various times. Some automatic options are configurable, such enabling AutoTask to run DBMS_STATS. Oracle Database Performance Tuning - Optimizer Statistics Gathering - 11g, 12c Stats collection Stats gathering database performance tuning, 10g, 11g 12c database administration
Views: 606 KINGS TUBE
Partitioning enhances the performance, manageability, and availability of a wide variety of applications and helps reduce the total cost of ownership for storing large amounts of data. Partitioning allows tables, indexes, and index-organized tables to be subdivided into smaller pieces, enabling these database objects to be managed and accessed at a finer level of granularity. Oracle provides a rich variety of partitioning strategies and extensions to address every business requirement. Moreover, since it is entirely transparent, partitioning can be applied to almost any application without the need for potentially expensive and time consuming application changes. Partitioning allows a table, index, or index-organized table to be subdivided into smaller pieces, where each piece of such a database object is called a partition. Each partition has its own name, and may optionally have its own storage characteristics. From the perspective of a database administrator, a partitioned object has multiple pieces that can be managed either collectively or individually. This gives the administrator considerable flexibility in managing partitioned objects. However, from the perspective of the application, a partitioned table is identical to a non-partitioned table; no modifications are necessary when accessing a partitioned table using SQL queries and DML statements. Partitioning Key ======================== Each row in a partitioned table is unambiguously assigned to a single partition. The partitioning key is comprised of one or more columns that determine the partition where each row will be stored. Oracle automatically directs insert, update, and delete operations to the appropriate partition through the use of the partitioning key. When to Partition a Table ========================== Here are some suggestions for when to partition a table: Tables greater than 2 GB should always be considered as candidates for partitioning. Tables containing historical data, in which new data is added into the newest partition. A typical example is a historical table where only the current month's data is updatable and the other 11 months are read only. When the contents of a table need to be distributed across different types of storage devices. When to Partition an Index ============================= Here are some suggestions for when to consider partitioning an index: Avoid rebuilding the entire index when data is removed. Perform maintenance on parts of the data without invalidating the entire index. Reduce the impact of index skew caused by an index on a column with a monotonically increasing value. Partitioned Index-Organized Tables =================================== Partitioned index-organized tables are very useful for providing improved performance, manageability, and availability for index-organized tables. For partitioning an index-organized table: ============================================ Partition columns must be a subset of the primary key columns Secondary indexes can be partitioned (both locally and globally) OVERFLOW data segments are always equi-partitioned with the table partitions See Also: Oracle Database Concepts for more information about index-organized tables System Partitioning System partitioning enables application-controlled partitioning without having the database controlling the data placement. The database simply provides the ability to break down a table into partitions without knowing what the individual partitions are going to be used for. All aspects of partitioning have to be controlled by the application. For example, an insertion into a system partitioned table without the explicit specification of a partition will fail. System partitioning provides the well-known benefits of partitioning (scalability, availability, and manageability), but the partitioning and actual data placement are controlled by the application. See Also: Oracle Database Data Cartridge Developer's Guide for more information about system partitioning Partitioning for Information Lifecycle Management Information Lifecycle Management (ILM) is concerned with managing data during its lifetime. Partitioning plays a key role in ILM because it enables groups of data (that is, partitions) to be distributed across different types of storage devices and managed individually.
Views: 7480 Md Arshad
Need to reorganize a table ? Want to do it whenever you want without impacting any users ? Easy in 12.2 ====================================================== Copyright © 2017 Oracle and/or its affiliates. Oracle is a registered trademark of Oracle and/or its affiliates. All rights reserved. Other names may be registered trademarks of their respective owners. Oracle disclaims any warranties or representations as to the accuracy or completeness of this recording, demonstration, and/or written materials (the “Materials”). The Materials are provided “as is” without any warranty of any kind, either express or implied, including without limitation warranties or merchantability, fitness for a particular purpose, and non-infringement.
Views: 470 Connor McDonald
Hi guys in my today scenario I'm going to explain with you What is a PARTITION in Oracle? #WhatisPARTITION Why to use Partition And Types of Partitions Oracle database Unbeatable,Unbreakable Platform..
Views: 23843 Oracle World
#Oracle optimization: #Indexes. Other lessons, visit https://www.youtube.com/watch?v=9RlxvHMg9PI&list=PL99-DcFspRUoscBHdh39T8EHENfm2VcQ3 Using a table witout indexes, clustered index nonclustered index, Primary key, unique index, bitmap index, rebuild index, function-based indexes
Views: 42 Learn with video tutorials
exchange Partition , Move partition in oracle Possible operations with partitions SQL Tutorial SQL Tutorial for beginners PLSQL Tutorial PLSQL Tutorial for beginners PL/SQL Tutorial PL SQL Tutorial PL SQL Tutorial for beginners PL/SQL Tutorial for beginners Oracle SQL Tutorial Add Drop Rename Split Move ( Moving from Tablespace to tablespace) Exchange (Table to Table(non Partitioned table)) not partitioned only exchanging data (p)
Views: 1755 TechLake
Why DUL? Doesn’t need the database or the instance to be open Does not use recovery, archive logs etc… It doesn’t care about data consistency more tolerant to data corruptions Does not require the SYTEM tablespace to recover DUL is a utility that can unload data from “badly damaged” databases. DUL will scan a database file, recognize table header blocks, access extent information, and read all rows Creates a SQL*Loader or Export formatted output matching SQL*Loader control file is also generated If data files are not available for the SYSTEM TableSpace the unload can still continue but USER, TABLE and COLUM names will not be known. Identifying the tables can be an overwhelming task. But it can be (and has been) done. You need in depth knowledge about your application and the application tables. Column types can be guessed by DUL, but table and column names are lost. Any old SYSTEM tablespace from the same database but weeks old can be of great help!. Most of the information that DUL uses does not change. (only the dataobj# is during truncate or index rebuild)
Views: 233 Maclean Liu
What is Partition in Oracle and Type of Partitions Range Partition SQL Tutorial SQL Tutorial for beginners PLSQL Tutorial PLSQL Tutorial for beginners PL/SQL Tutorial PL SQL Tutorial PL SQL Tutorial for beginners PL/SQL Tutorial for beginners Oracle SQL Tutorial
Views: 3342 TechLake
Learn some details about how the Oracle optimizer works with Themis instructor John Mullins.
Views: 781 Themis Education
Unusable indexes in Oracle, DML statements are not use the index to its maintenance, at the same time the optimizer will not use the index. Unusable indexes no segment exists. Unavailable index index becomes available methods are: 1. Place the index can not be truncate operation corresponding table; 2.rebuild index; In addition, the query optimizer can use conversion method expand table so that the SQL statement has encountered unusable index partition table to generate better execution plans.
Views: 66 崔旭
Hi guys in my today videos i will explain how to recover to controlfile without any backup. #RecreateControlfile #withoutBackup Oracle database Unbeatable,Unbreakable Platform..
Views: 11226 Oracle World
When is a Full Table Scan faster than an Index Scan? Watch Ross and Jordan act out an Oracle database reading and caching data via both methods, explaining the costs and benefits in simple and easy to understand terms. The demonstration is part of a talk by Ross Leishman of DWS Ltd on the principles of Understanding Indexes for SQL Tuning. The full lecture is at this link: https://www.youtube.com/watch?v=Z4hKomnGHFA DWS Ltd is a leading publicly listed Australian IT Services company, providing services to blue chip organisations since 1991. With a business philosophy based upon integrity, reliability and professional service delivery, DWS provides end to end IT solutions. www.dws.com.au
Views: 2724 DWS Ltd
DESCRIBE or DESC Keyword in Oracle | Oracle Tutorials for Beginners DESCRIBE Keyword in Oracle DESC Keyword in Oracle DESCRIBE Keyword in Oracle SQL DESC Keyword in Oracle SQL DESCRIBE Keyword in SQL DESC Keyword in SQL Oracle Tutorials for Beginners Oracle SQL for Beginners Oracle Database for Beginners Oracle SQL Tutorials for Biners Oracle Database tutorials for Beginners oracle describe table structure desc table in sql server descending order in oracle how to see table structure in oracle sql developer desc command in mysql pl sql describe table desc command in sql example describe table in sql query how to see table structure in oracle sql developer desc table in sql server sql query to view table structure in oracle oracle describe table invalid sql statement describe table in sql query oracle desc table order by column name describe not working in oracle oracle show tables how to see table structure in oracle sql developer how to get table structure in oracle 11g sql query to list all tables in a database describe table in oracle sql developer sql query to view table structure in sql server oracle get list of tables in schema oracle show tables describe table structure in sql server
Views: 815 Oracle PL/SQL World
Detection of Soft Corruption in 12c: To use the scripts below replace : , ",# and $ by proper bracket Lets Create a tablespace and small table. SQL: create tablespace DEMO1 datafile '/u02/tstdb1/TSTDB1/datafile/demo01.dbf' size 50M SQL: create table objects tablespace DEMO1 as select * from dba_objects; SQL: alter table objects add constraint pk_obj primary key #object_id$; SQL: create index idx_obj_name on objects#object_name$ tablespace demo1; Backup tablespace. RMAN: backup tablespace DEMO1; We need to put the DB in archivelog first Rebuild index with NOLOGGING option to simulate soft corruption later. RMAN: alter index idx_obj_name rebuild nologging; Confirm that we have datafiles that require backup because they have been affected with NOLOGGING operation. RMAN: report unrecoverable; Simulate corruption. RMAN: alter database datafile 5 offline; RMAN: restore datafile 5; RMAN: recover datafile 5; RMAN: alter database datafile 5 online; Query table with corrupted index and notice error. SQL: select count#*$ from objects where object_name like 'A%'; Let’s perform validation of datafile to check block corruption. RMAN: backup validate check logical datafile 5; Notice that we have 457 blocks marked corrupt but v$database_block_corruption view is empty. SQL: select count#*$ from v$database_block_corruption; Let’s query v$nonlogged_block view. set lines 200 set pages 999 select file#, block#, blocks,object#,reason from v$nonlogged_block; Will RMAN detect that we have corrupted blocks? RMAN: backup datafile 5; RMAN backup won’t fail due to NOLOGGING corrupt blocks and our backup will contain soft corrupted blocks. Let’s Identify corrupt segments using v$nonlogged_block view. set lines 2000 set pages 9999 col owner for a20 col partition_name for a10 col segment_name for a20 SELECT e.owner, e.segment_type, e.segment_name, e.partition_name, c.file# , greatest#e.block_id, c.block#$ corr_start_block# , least#e.block_id+e.blocks-1, c.block#+c.blocks-1$ corr_end_block# , least#e.block_id+e.blocks-1, c.block#+c.blocks-1$ - greatest#e.block_id, c.block#$ + 1 blocks_corrupted FROM dba_extents e, V$NONLOGGED_BLOCK c WHERE e.file_id = c.file# AND e.block_id "= c.block# + c.blocks - 1 AND e.block_id + e.blocks - 1 := c.block# UNION SELECT s.owner, s.segment_type, s.segment_name, s.partition_name, c.file# , header_block corr_start_block# , header_block corr_end_block# , 1 blocks_corrupted FROM dba_segments s, V$NONLOGGED_BLOCK c WHERE s.header_file = c.file# AND s.header_block between c.block# and c.block# + c.blocks - 1 UNION SELECT null owner, null segment_type, null segment_name, null partition_name, c.file# , greatest#f.block_id, c.block#$ corr_start_block# , least#f.block_id+f.blocks-1, c.block#+c.blocks-1$ corr_end_block# , least#f.block_id+f.blocks-1, c.block#+c.blocks-1$ - greatest#f.block_id, c.block#$ + 1 blocks_corrupted FROM dba_free_space f, V$NONLOGGED_BLOCK c WHERE f.file_id = c.file# AND f.block_id "= c.block# + c.blocks - 1 AND f.block_id + f.blocks - 1 := c.block# order by file#, corr_start_block# / This is the best outcome to get if you notice corruption errors. All errors are related to index corruption so we could fix this problem rebuilding index. alter index idx_obj_name rebuild; Simply issuing "alter index rebuild" command won't work. We should mark index unusable to drop segment before rebuilding it or just rebuild index with online option. It is better choice to mark index unusable because you don't need additional space then, but I will simply rebuild index with online option and see what will happen. SQL: alter index idx_obj_name rebuild online; Index altered. SQL: select count#*$ from objects where object_name like 'A%'; No errors... but, let's validate datafile for corruption. RMAN: backup validate check logical datafile 5; Notice "Marked Corrupt" column. Hm... 457 like before. Don't worry, this is not new corruption. These are FREE blocks which will be reused and Oracle will automatically re-format those blocks. Query the v$nonlogged_block view again as given above. We could force re-formatting creating dummy table and inserting data to dummy table. Check Doc ID 336133.1. create table s # n number, c varchar2#4000$ $ nologging tablespace DEMO1; SQL: BEGIN FOR i IN 1..1000000 LOOP INSERT /*+ APPEND */ INTO sys.s select i, lpad#'REFORMAT',3092, 'R'$ from dual; commit ; END LOOP; END; / SQL: drop table sys.s purge; Notice that we don't have corrupted blocks any more. RMAN: backup validate check logical datafile 5;
Views: 222 OracleDBA
...................................................Finish.................................................. To get my others videos just go to the link which is given below.. https://www.youtube.com/channel/UCFcOAx6xy6aQgKzJFaJ_8zQ https://youtu.be/HQ9Liql4L68 Stay connected with information... Stay Connected with my tutorial.. Stay connected with updated reports tutorial... Keep learning about Oracle Databese ....... Thanks for watching... Subscribe my Channel : Mahfujur Rahman Subscribe my channel : Mahfujur Rahman Thanks For Watching MdMahfujur Rahman Database Design and Development IDB-BISEW IT Scholarship Project. 01673472384
Views: 907 Mahfujur Rahman
DURGASOFT is INDIA's No.1 Software Training Center offers online training on various technologies like JAVA, .NET , ANDROID,HADOOP,TESTING TOOLS ,ADF,INFORMATICA,TABLEAU,IPHONE,OBIEE,ANJULAR JS, SAP... courses from Hyderabad & Bangalore -India with Real Time Experts. Mail us your requirements to [email protected] so that our Supporting Team will arrange Demo Sessions. Ph:Call +91-8885252627,+91-7207212428,+91-7207212427,+91-8096969696. http://durgasoft.com http://durgasoftonlinetraining.com https://www.facebook.com/durgasoftware http://durgajobs.com https://www.facebook.com/durgajobsinfo......
Views: 4080 Durga Software Solutions