How Drop Tablespace and Recover Oracle Database When Accidentally Delete Datafile איך זרוק Tablespace ולשחזר Oracle Database כאשר בטעות מחק Datafile
Accident may happens, even though it's costly one. התאונה ייתכן קורה, אף אחד זה יקרה. This is especially the case in Oracle database, which stores the database objects physically in data files on hard disk. הדבר נכון במיוחד במקרה במאגר נתונים אורקל, אשר מאחסן את אובייקטי מסד נתונים פיזית קבצי הנתונים בדיסק הקשיח. Fast hand administrators may accidentally delete some of the datafiles, or the datafiles may get corrupted or unreadable on hard disk failure. מנהלי היד מהירה עלולה בטעות למחוק חלק datafiles, או datafiles עשוי לקבל פגומה או בלתי קריא על כשל בדיסק הקשיח. You may get also some missing datafiles after database recovery process. אתה יכול לקבל גם כמה datafiles חסר לאחר תהליך שחזור מסד נתונים. In any case, missing a or a few datafiles will cause Oracle database to fail to startup, rendering the whole DB inaccessible. בכל מקרה, חסרים או datafiles כמה יגרום מסד נתונים אורקל להיכשל ההפעלה, עיבוד DB נגיש כולו.
The solution to the missing datafiles is to drop the affected tablespace where has incomplete datafiles, and then recreate the tablespace and import the data into the tablespace from backup. הפתרון הוא חסר datafiles עד טיפת tablespace מושפע שבו יש datafiles שלם, ולאחר מכן לשחזר את tablespace ו לייבא את הנתונים לתוך tablespace מן הגיבוי. However, the steps are not so straight forward. עם זאת, הצעדים הם לא כל כך ישר קדימה.
- Run SQL*Plus. הפעלה של SQL * Plus.
- Connect to database as SYSDBA with this query: להתחבר למסד הנתונים כפי SYSDBA עם שאילתה זו:
CONNECT / AS SYSDBA CONNECT / AS SYSDBA
- Mount the database instead of starting it up: הר מסד הנתונים במקום להתחיל אותו:
STARTUP MOUNT; הר STARTUP;
- Issue the following command to bring the missing datafile offline so that Oracle won't trying to connect and access the datafile anymore: הנושא את הפקודה הבאה להביא את מחובר datafile חסר כך אורקל לא מנסה להתחבר ולגשת datafile יותר:
ALTER DATABASE DATAFILE '<datafile name with complete path>' OFFLINE DROP; ALTER DATABASE DATAFILE 'שם <datafile להשלים עם path>' OFFLINE DROP;
Repeat the command for every datafiles that unaccounted for. חזור על הפקודה עבור כל datafiles כי לא נכלל בספירה עבור.
- Now start the database proper: עכשיו להתחיל את מסד הנתונים הנכון:
ALTER DATABASE OPEN; ALTER מסד נתונים פתוח;
- As the tablespace has damaged, drop it to recreate from fresh backup. ככל tablespace פגע, ושחרר אותו לשחזר מגיבוי טריים.
DROP TABLESPACE <tablespace name> INCLUDING CONTENTS; <tablespace TABLESPACE DROP name> כולל תכנים;
- Ensure the other datafiles for the tablespace has been deleted, if not, remove them manually from the operating system. להבטחת datafiles אחרים עבור tablespace נמחקה, אם לא, להסיר אותם ידנית מתוך מערכת ההפעלה.
Tip: עצה: How to check datafiles that belong to tablespace כיצד לבדוק datafiles השייכים tablespace . .
- Continue with the recovery process. להמשיך בתהליך ההחלמה.
IMPORTANT : The page is machine translated and provided "as is" without warranty. חשוב: הדף מכונת תירגם מתפרסם "כמות שהוא" ללא אחריות. Machine translation may be difficult to understand. תרגום מכונה יכול להיות קשה להבין. Please refer to נא עיין original English article המאמר המקורי באנגלית whenever possible. בכל הזדמנות אפשרית.
Related Articles מאמרים קשורים
- How to Remove and Drop Datafiles from Tablespace in Oracle Database כיצד להסיר ושחרר Datafiles מ Tablespace ב Oracle Database
- How to Rename or Move Oracle Tablespace Datafile to Another Location כיצד לשנות שם או להעביר אורקל Tablespace Datafile אל מיקום אחר
- Oracle ORA-01658 Unable to Create INITIAL Extent for Segment in Tablespace Error
- ORA-25153 Temporary Tablespace is Empty Error in Oracle ORA-25153 זמניים Tablespace היא שגיאה ריק אורקל
- Delete, Remove or Drop Oracle Stored Packages with Drop Package מחיקה, הסרה או זרוק אורקל חבילות מאוחסן עם חבילת זרוק
- Change Oracle Database User Password שינוי Oracle Database משתמש סיסמא
- Oracle Database Link קישור מסד נתונים אורקל
- ORA-02449 Oracle Drop Table Error ORA-02449-Oracle זרוק טבלה שגיאה
- Create, Add or Split Oracle Database Partition Fails with ORA-14080 Error צור, הוספה או פיצול Oracle Database החלוקה נכשל עם שגיאה ORA-14080
- Oracle Database Import Error 3113/3114 Oracle Database ייבוא שגיאה 3113/3114










































May 21st, 2009 10:08 21 מאי 2009 10:08
Exactly what I needed! בדיוק מה שהייתי צריכה! Thanks for saving what seemed to be a wretched issue! תודה שהצלת את מה שנראה הבעיה העלוב!
April 20th, 2009 20:47 20 אפריל 2009 20:47
thanks a million. מיליון תודות.
ura life saver סוכריה ura
February 19th, 2009 06:49 19 פבואר 2009 06:49
This is a life saver …. זוהי סוכריה .... this works fine in oracle 10G HP itenium (or any where else). זה עובד יפה ב-Oracle 10g itenium HP (או כל שם אחר).
great doc. doc נהדר.
thanks תודה
Dewan Gazzali Dewan Gazzali
December 17th, 2008 13:53 17 דצמבר 2008 13:53
*2nds last post* * 2nds להודעה האחרונה *
November 6th, 2008 06:15 6 נובמבר 2008 06:15
You are a life saver!!!!!! אתה שומר החיים !!!!!!
October 28th, 2008 03:09 28 אוקטובר 2008 03:09
I ran a script to create a user w/o checking it closely enough. רצתי סקריפט כדי ליצור משתמש w / o לבדוק אותה מקרוב מספיק. Next thing you know, my db won't start because it is looking for a data file that doesn't exist. הדבר הבא שאתה יודע, db שלי לא יתחילו כי הוא מחפש קובץ נתונים שאינו קיים. This tip helped me get around the error quickly. טיפ זה עזר לי לעקוף את התקלה במהירות. Thanks for posting it. Thanks for posting אותו.
October 9th, 2008 02:31 9 אוקטובר 2008 02:31
Thank you for taking the time to post this very valuable information. תודה לך על שהקדשת מזמנך כדי לפרסם מידע זה יקר מאוד.
September 2nd, 2008 00:31 2 ספטמבר 2008 00:31
Thank you very much, this was really helpful. תודה רבה לך, באמת זה היה מועיל.
I had problems dropping the tablespace, i had to drop the user also. היו לי בעיות להפיל את tablespace, הייתי צריכה לעזוב גם את המשתמש.
July 8th, 2008 19:31 8 יולי 2008 19:31
This info helped us to a very great extent and hence we are able to proceed further smoothly. מידע זה סייע לנו במידה רבה מאוד, ולכן אנו מסוגלים להמשיך הלאה בצורה חלקה.
April 2nd, 2008 18:27 2 אפריל 2008 18:27
These are only to drop the TS אלה הן רק עד טיפת TS
but not to recover… אבל לא להתאושש ...
hence the worst…. ומכאן הגרוע ביותר ....
August 4th, 2007 02:57 4 אוגוסט 2007 02:57
[...] If one or more datafiles is missing after a recovery process or accidental deletion, you can use ALTER DATABASE DATAFILE <datafile name> OFFLINE DROP command to make the datafile offline so that database can starts up after which the troubled tablespace can be dropped. [...] אם אחד או יותר datafiles חסר לאחר תהליך החלמה או מחיקה בשוגג, אתה יכול להשתמש <datafile ALTER DATABASE DATAFILE name> OFFLINE הפקודה DROP להפוך את מחובר datafile כך באתר יכולים מתחיל לעלות אחרי בה tablespace מוטרד יכול להשמט. (See instruction to recover from missing datafiles.) [...] (ראה הוראת להתאושש חסר datafiles.) [...]