Segments exist even after dropping tables

Oracle 11g on AIX.
I dropped all the tables from my schema, but the following query
shows this:
SQL> select distinct segment_name,segment_type
     from dba_segments
     where owner='ABC'
SEGMENT_NAME                             SEGMENT_TYPE
BIN$hA51n8ndcCjgQ59/4sFwKA==$0           TABLE PARTITION
BIN$hA51n8nccCjgQ59/4sFwKA==$0           INDEX PARTITION
BIN$hA51n8nqcCjgQ59/4sFwKA==$0           TABLE PARTITION
BIN$hA51n8oqcCjgQ59/4sFwKA==$0           TABLE
BIN$hAyiirsGEErgQ59/4sEQSg==$0           TABLE
BIN$hF/vMCFREwbgQ59/4sETBg==$0           TABLE
BIN$hA51n8npcCjgQ59/4sFwKA==$0           INDEX PARTITION
SQL> select owner, table_name
     from dba_part_tables
     where owner='ABC';
OWNER                          TABLE_NAME
ABC                            BIN$hA51n8ndcCjgQ59/4sFwKA==$0
ABC                            BIN$hA51n8nqcCjgQ59/4sFwKA==$0So my question is, why are segments still allocated even after I've dropped
all the tables in my schema?
Is there some command I can use to free them up?
Thanks.

They are just recyclebin objects given to you so that you can recover the dropped tables after the drop command too. Please see,
http://download.oracle.com/docs/cd/E11882_01/server.112/e10595/tables011.htm#ADMIN11681
To drop these objects, you can use
purge recyclebinHTH
Aman....

Similar Messages

  • Table exists even after dropping

    I dropped a table named contacts,but still it exists when i type "select * from tab"
    SQL> drop table contacts;
    Table dropped.
    SQL> commit;
    Commit complete.
    SQL> drop table contacts;
    drop table contacts
    ERROR at line 1:
    ORA-00942: table or view does not exist
    SQL> select * from tab;
    TNAME                          TABTYPE  CLUSTERID
    IMDB_TOP_250                   TABLE
    BIN$F6bMvnw8TJKPvSnuh1APtg==$0 TABLE
    BIN$zmR6g5IHTFmwn0V9Ura2Rw==$0 TABLE
    BIN$zCxH4k4qSy65ccSfghjAqg==$0 TABLE
    TEST                           TABLE
    BIN$VPLTXcUvTymZfz/fp0X/WA==$0 TABLE
    BIN$m+y9ZlWbQHeNlCorBWy2fQ==$0 TABLE
    TEST1                          TABLE
    contacts                       TABLEWhy i can still see contacts table in my schema?

    Why i can still see contacts table in my schema?What is the oracle version? Once table is dropped without purge option it must be available in recycle bin with BIN$xxxxxxxx name , but you should not see the actual table name.
    11:32:17 SQL> select * from tab;
    TNAME                          TABTYPE  CLUSTERID
    BONUS                          TABLE
    DEPT                           TABLE
    EMP                            TABLE
    MLOG$_EMP                      TABLE
    RUPD$_EMP                      TABLE
    SALGRADE                       TABLE
    T                              TABLE
    7 rows selected.
    Elapsed: 00:00:00.04
    11:32:19 SQL> drop table t;
    Table dropped.
    Elapsed: 00:00:00.26
    11:32:23 SQL> select * from tab;
    TNAME                          TABTYPE  CLUSTERID
    BIN$0qXpuvV0RYOELyxiSqkcWQ==$0 TABLE
    BONUS                          TABLE
    DEPT                           TABLE
    EMP                            TABLE
    MLOG$_EMP                      TABLE
    RUPD$_EMP                      TABLE
    SALGRADE                       TABLE
    7 rows selected.Paste the output of
    1. select * from user_recyclebin;
    2. select object_name,object_type from user_objects;
    Anand
    Edited by: Anand.. on Mar 22, 2011 11:01 PM

  • VALUE IN PO HISTORY OF SERVICE ENTRY SHEET EXIST EVEN AFTER DELETION OF SES

    Respected All,
    My client has prepared a down payment request , prepared a service purchase order against that vendor, created service entry sheet.
    Later on he came to know that the qty he has entered is wrong ,so  he reversed all the goods receipt(done 102 Mvt) , deleted the service entry sheet and now trying to create new SES against the same line through ML81N.
    But the Qty column after selection of services is coming blank, i have checked the po history, in that the GR Qty and value is zero and service Qty is zero but service value and down payment column still contains the value, though we have reversed the service entry seet.
    please guide me what to do to reflect the qty part in ML81N again.
    Thanks and Regards
    Abhay Mahodaya

    can you see the material document with reverse movement ( 102 ) ,corresponding to your cancelation of SE sheet in the P.O history tab?
    also check whether the 'actual quantity' in the Service entry extreme right column shows zero.
    check in the deleted SE sheet history tab 'change document' button whether the last row change mentioned is setting deletion indicator

  • CN41 commitment exists even after PR/PO deletion

    Hi Guys
    We have scenario as follow
    1- Create a PR and coverted to PO with A as account assignment (WBS is assigned in the asset)
    2- Above created PR and the PO lines are deleted as the next level
    3- New PR has been created with the same WBS and the PO in the point 1 is used to convert this PR as well. MIGO and MIRO is done for this PO and the cycle got completed
    4- Again a New PR is created with the same WBS and deleted at PR level itself
    Now when we run CN41 the actual value is proper(this has been taken from MIGO and from MIRO for unplanned delivery costs)
    But when we come to the commitement, this still has value but which should not have any value
    The reason being only one of the PR and PO line is open and for which MIGO and MIRO has been done
    2 other PR lines are deleted and the PO first line related to the first PR has also been deleted
    Based on the forum and other docs, i have ran various program like RKANBU01, RKACOR04, RKACOR10 etc...and including CJEN transaction. But CN41 still has value in the commitment column, which ideally in our case it should not have any value
    Thanks in advance guys
    Bala

    Dears...
    Note that PO Commitment gets closed in case of unplanned delivery costs posted by MIRO only after flagging the "Final Invoice" indicator at the item level of PO and PR commitment gets closed by flagging the "Closed" indicator at the item level of PR.
    Re-run the commitment line items report to check if the commitment is nullified....
    Hope this helps....
    Regards
    Kaashif M

  • Ribbon tab exists even after uninstalling PowerPoint Add-in

    I have created an application level Add-in for PowerPoint 2010/2013 using C# VSTO. The add-in is installed from msi installer file.
    The problem is that after I uninstall the add-in from the control panel and open a new PowerPoint presentation, the ribbon tab is still visible with all the functionalities correctly working.
    To remove the tab I have to do either of the following two things:
    Remove the add-in from the COM Add-ins list from the PowerPoint Developer tab.
    End the running instance of PowerPoint from Task Manager.
    I have called the dispose methods(in ThisAddIn_Shutdown method) for all the initializations I have done in ThisAddIn_StartUp method but this is not helping.
    private void ThisAddIn_Shutdown(object sender, System.EventArgs e)
    this.Application.WindowSelectionChange -= Application_WindowSelectionChange;
    this.Application.SlideSelectionChanged -= Application_SlideSelectionChanged;
    this.Application.SlideShowBegin -= Application_SlideShowBegin;
    this.Application.SlideShowEnd -= Application_SlideShowEnd;
    }I figured out that this is happening because of the task-pane objects created inside ThisAddIn_StartUp, which I have disposed in ThisAddIn_Shutdown, Application_PresentationClose and Application_PresentationCloseFinal. But still I have no luck.Please let me know what else is to be done!Thanks

    Hi,
    This is the forum to discuss questions and feedback for Microsoft Office, the issue is more related to develop the add-in, you'd better post your question to the MSDN forum for VSTO
    http://social.msdn.microsoft.com/Forums/en-US/home?forum=vsto&filter=alltypes&sort=lastpostdesc
    The reason why we recommend posting appropriately is you will get the most qualified pool of respondents, and other partners who read the forums regularly can either share their knowledge or learn from your interaction with us. Thank you for your understanding.
    George Zhao
    TechNet Community Support

  • Ipod will go to slider screen to be turned off even after hitting cancel it continues and will snap a picture every once in while while this is happening

    repair shop said sounded like the on off button is stuck and cant be replaced  any suggestions

    wanted to add that i did a reset and restore from phone and then thru apple factory reset and the problem still exists even after all that with no extra apps on phone

  • Unable to extend TEMP segment even after adding fresh temp files

    Hi All,
    I have a huge table with rows nearly 2 million. When this table is moved to another tablespace, the command failed giving the following error:
    ORA-01652: unable to extend temp segment by 128 in tablespace XYZ
    To overcome this error, an additional temp file was added with huge size. Unfortunately, the same error appeared again when the table was tried to move to another tablespace. I wonder if the new temp file was not recognized by database, so tried to see how many files belong to temporary tablespace, but the query listed the newly added temp file also.
    What could be the possible reason for this error? Suggestions or clues are most welcome.
    Thanks,
    ...

    The temp segment is for the table that is being moved.
    Oracle creates a temporary segment when doing a move. If the target tablespace has enough space, the move succeeds and the temp segment gets converted to a Table segment. Else, if the move fails because of lack of space (the temp segment itself unable to grow), then the temp segment is dropped on failure.
    Thus, in a
    alter table ABC move tablespace MY_TBS;or
    the target tablespace MY_TBS should have enough space for ABC. While Oracle is building the copy of ABC in MY_TBS, it is being built as a temporary segment. If the copy succeeds, the temporary segment is renamed as a Table segment 'ABC' and the original table segment 'ABC' is dropped.
    This behaviour also happens when you do an ALTER TABLE .. MOVE ; into the same tablespace that it is existing in. The new copy of the table is a temporary sgement till the copy succeeds.

  • TRUNCATE TABLE NOT WORKING AFTER DROPPING CONSTRAINTS

    Hi,
    I have a table with a foreign key constraint. I know you can't truncate tables when there are foreign key constraints. So I drop the constraints before running the TRUNCATE TABLE command. But SQL Server is still stating there are foreign key constraints
    even after they have just been dropped.
    When I use SQL Server Management Studio to generate a drop & create script on this table or any other table with an FK consttaint, the generated script fails stating that there are still foreign key constraints??
    I have the same problem for every table that has FK constraints, for those without FK, TRUNCATE table works without issues.
    The end goal is to reset the identity value of the primary key. Since DBCC does not work on Azure, TRUNCATE TABLE is the only way left, especially if you can't even drop and recreate tables with FK constraints.
    What am I missing here?
    Peter

    Hi,
    Thanks for posting here.
    TRUNCATE TABLE is similar to the DELETE statement with no WHERE clause; however, TRUNCATE TABLE is faster and uses fewer system and transaction log resources.
    TRUNCATE TABLE removes all rows from a table, but the table structure and its columns, constraints, indexes, and so on remain. To remove the table definition in addition to its data, use the DROP TABLE statement.
    If the table contains an identity column, the counter for that column is reset to the seed value defined for the column. If no seed was defined, the default value 1 is used. To retain the identity counter, use DELETE instead.
    Restrictions
    You cannot use TRUNCATE TABLE on tables that:
    •Are referenced by a FOREIGN KEY constraint. (You can truncate a table that has a foreign key that references itself.)
    •Participate in an indexed view.
    •Are published by using transactional replication or merge replication.
    For tables with one or more of these characteristics, use the DELETE statement instead.
    TRUNCATE TABLE cannot activate a trigger because the operation does not log individual row deletions. For more information, see CREATE TRIGGER (Transact-SQL).
    Truncating Large Tables
    Microsoft SQL Server has the ability to drop or truncate tables that have more than 128 extents without holding simultaneous locks on all the extents required for the drop.
    Permissions--------------------------------------------------------------------------------
     The minimum permission required is ALTER on table_name. TRUNCATE TABLE permissions default to the table owner, members of the sysadmin fixed server role, and the db_owner and db_ddladmin fixed database roles, and are not transferable. However, you
    can incorporate the TRUNCATE TABLE statement within a module, such as a stored procedure, and grant appropriate permissions to the module using the EXECUTE AS clause.
    You cannot truncate a table which has an FK constraint on it.
    Typically my process for this is:
    Drop the constraints
    Trunc the table
    Recreate the constraints.
    Hope this helps you.
    Girish Prajwal

  • Why does TextEdit revert to Helvetica 12 even after you set a new default font whenever you drop an image into an RTFD?

    Anyone know a workaround for when TextEdit reverts to Helvetica 12 even after you set the new default to say Verdana 14 every time your drop an image into an RTFD? Kind of defeats the purpose! Is there a way around this? THANKS!

    Among the alternatives not mentioned... Using a TiVo DVR, rather than the X1; a Roamio Plus or Pro would solve both the concern over the quality of the DVR, as well as providing the MoCA bridge capability the poster so desperately wanted the X1 DVR to provide. (Although the TiVo's support only MoCA 1.1.) Just get a third-party MoCA adapter for the distant location. Why the hang-up on having a device provided by Comcast? This seems especially ironic given the opinions expressed regarding payments over time to Comcast. If a MoCA 2.0 bridge was the requirement, they don't exist outside providers. So couldn't the poster have simply requested a replacement XB3 from the local office and configured it down to only providing MoCA bridging -- and perhaps as a wireless access point? Comcast would bill him the monthly rate for the extra device, but such is the state of MoCA 2.0. Much of the OP sounds like frustration over devices providing capabilities the poster *thinks* they should have.

  • Drop table if exists in sql statement

    Oracle: 10G
    Is there a way to check if table exist and then only drop table. Something like:
    drop table (select table_name from user_tables where lower(table_name) = 'o2i_filing_dest')

    As already suggested, you could e.g. use an anonymous PL/SQL block as part of your SQL script, e.g. something like that:
    set echo on
    spool <your_log_file>
    WHENEVER SQLERROR EXIT FAILURE
    DECLARE
      PROCEDURE EXEC_DONT_FAIL( P_CMD IN VARCHAR2 ) IS
        e_table_or_view_does_not_exist exception;
        pragma exception_init(e_table_or_view_does_not_exist, -942);
        e_type_does_not_exist exception;
        pragma exception_init(e_type_does_not_exist, -4043);
        e_sequence_does_not_exist exception;
        pragma exception_init(e_sequence_does_not_exist, -2289);
      BEGIN
        EXECUTE IMMEDIATE P_CMD;
      EXCEPTION
      WHEN e_table_or_view_does_not_exist OR e_type_does_not_exist OR e_sequence_does_not_exist THEN
          NULL;
      END;
    BEGIN
      EXEC_DONT_FAIL('drop type <type_name1> force');
      EXEC_DONT_FAIL('drop view <view_name1>');
      EXEC_DONT_FAIL('drop table <table_name1> purge');
      EXEC_DONT_FAIL('drop sequence <seq_name1>');
    END;
    CREATE TABLE ...Note that the literals in angle brackets are just placeholders for demonstration purposes, you need to use your actual object names/file names there.
    Of course you could also use a FOR ... LOOP in the PL/SQL block that queries e.g. USER_OBJECTS to find out which objects to drop.
    That way it is ensured that only expected exceptions will be ignored but all others will raise and stop your script in that case.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/
    Edited by: Randolf Geist on Sep 25, 2008 10:09 AM
    Clarification regarding angle brackets added

  • Wifi keeps scanning and dropping even after connected to home network.  Never had this issue until the update, and now my phone runs slow and terrible.  Horrible update!!  Any ideas on a fix?

    Wifi keeps scanning and dropping even after connected to home network.  Never had this issue until the update, and now my phone runs slow and terrible.  Horrible update!!  Any ideas on a fix?

    It's important that you have a steady WiFi connection, ZealousEdge. What phone do you have? Is your phone unable to connect to any WiFi network? If you can, please try deleting the saved WiFi network and re-adding it.
    AndreaS_VZW
    Follow us on Twitter @VZWSupport
    If my response answered your question please click the "Correct Answer" button under my response. This ensures others can benefit from our conversation. Thanks in advance for your help with this!!

  • Document number not available in BSAD Table even after clearing

    Dear Experts,
    with the FM posting_interface_start, posting_interface_clearing, posting_interface_end iam able to post the document with clearing using Tcode f-30/fb05 and can see the document number getting generated and when i see the BSAD table with the same generated document number it say no table entires for that document number BUT is still available in BSID table even after getting cleared. Can any body explain me why the document  is not getting moved from BSID Table to BSAD Table.
    Your inputs will be highly appreciated.
    Regards,
    Jyothsna Reddy

    Hi experts,
    when iam clearing the open item with posting_interface_clearing getting the message like :" Documnet number xxxxx posted in company code xxxx". when i checked that particular document in table bsad it says no table entries for that particular document. iam confused whether my document got cleared or not.
    Thanks
    Jyothsna Reddy
    Edited by: Rob Burbank on Dec 30, 2011 11:56 AM

  • I dropped my ipad and the screen blacked out and could not be turned on even after pressing the sleep and home button

    I dropped my ipad and the screen blacked out and could not be turned on even after pressing the sleep and home button.
    I tried connecting the device to my computer and itunes said that it could not identify my device.

    What to Do When Your iPad Won't Turn On
    http://ipad.about.com/od/iPad_Troubleshooting/ss/What-To-Do-When-Your-Ipad-Wo-No t-Turn-On.htm
    iOS: Not responding or does not turn on
    http://support.apple.com/kb/TS3281
    iPad Frozen? How to Force Quit an App, Reset or Restart Your iPad
    http://ipadacademy.com/2010/11/ipad-frozen-how-to-force-quit-an-app-reset-or-res tart-your-ipad
    iPad: Basic troubleshooting
    http://support.apple.com/kb/TS3274
     Cheers, Tom

  • DROP TABLE works through SSMS but not via T-SQL Query

    Hello All,
    I am trying to drop a number of tables (1,000+) in a particular database by scripting the actions in T-SQL. When I run the query I get error 3701 on every table which points to a permissions issue. However, I am able to delete tables one by one using
    the tree-view in the SSMS Object Explorer. 
    1. I have tried starting query sessions with both the DBO of the database and the SA account to no avail. (Both had the sysadmin role when I tried.)
    2. Both the DBO account and the SA account are able to drop tables using SSMS Object Explorer.
    Do I need a specific GRANT of permissions to use T-SQL versus SSMS or am I missing something even more fundamental?
    TIA, Simon
    <code>
    DECLARE @Company VARCHAR(max), 
    @ID VARCHAR(max), 
    @NAME VARCHAR(max), 
    @TABLE_CATALOG VARCHAR(max),
    @NAV_DATABASE VARCHAR(max),
    @TABLE_NAME VARCHAR(max), 
    @STATEMENT VARCHAR(max),
    @OBJECT_NAME VARCHAR(max),
    @OBJECT_NAME_BARE VARCHAR(max),
    @OBJECT_TYPE VARCHAR(max);
    SET @TABLE_CATALOG = 'NAV_PENTA_TEST_GAAP';
    SET @NAV_DATABASE = @TABLE_CATALOG
    IF @TABLE_CATALOG <> DB_NAME() 
    BEGIN
    DECLARE @ERRORMSG VARCHAR(max);
    SET @ERRORMSG =  'You are not in the correct database. You specified ' + @TABLE_CATALOG + ' but you are currently in a session for ' + db_name();
    RAISERROR(@ERRORMSG, 18, 1);
    RETURN;
    END;
    -- To hold the object names (tables) from Navision
    CREATE TABLE #NavisionObjects
    [CompanyName]
    VARCHAR(max),
    [ID] VARCHAR(max),
    [Name]
    VARCHAR(max),
    [TABLE_NAME]
    VARCHAR(max)
    -- To hold the object names (tables) from SQL only
    CREATE TABLE #NavisionSQLObjects
    [TABLE_NAME]
    VARCHAR(max)
    -- Holds the list of dependent objects
    CREATE TABLE #DependentObjects
    [name] VARCHAR(max),
    [type] VARCHAR(max)   
    WITH T AS (
    SELECT [Company Name],[ID],[Name],[Company Name]+'$'+[Name] AS TABLE_NAME 
    FROM [Object]   
    WHERE [Name] like '%IT IS%' AND [Company Name]>''
    UNION ALL
    SELECT [Company Name],[ID],[Name],[Name] AS TABLE_NAME 
    FROM [Object]   
    WHERE [Name] like '%IT IS%' AND [Company Name] IN ('',' ')
    INSERT INTO #NavisionObjects SELECT [Company Name],[ID],[Name],[TABLE_NAME] FROM T;
    UPDATE #NavisionObjects SET TABLE_NAME = TABLE_NAME+ID WHERE ID LIKE '1%';
    INSERT INTO #NavisionSQLObjects 
    SELECT TABLE_NAME from INFORMATION_SCHEMA.TABLES 
    WHERE TABLE_CATALOG = @TABLE_CATALOG AND TABLE_NAME LIKE '%IT IS%' AND TABLE_TYPE='BASE TABLE';
    --SELECT * FROM #NavisionObjects where CompanyName like 'E15%' order by TABLE_NAME;
    --SELECT * FROM #NavisionSQLObjects where TABLE_NAME like 'E15%' order by TABLE_NAME;
    DECLARE cTables CURSOR FOR SELECT A.CompanyName,A.ID,A.[TABLE_NAME] FROM #NavisionObjects A
    INNER JOIN #NavisionObjects B ON B.[TABLE_NAME]=A.[TABLE_NAME]
    OPEN cTables;
    FETCH NEXT FROM cTables INTO @Company,@ID,@TABLE_NAME;
    WHILE (@@FETCH_STATUS = 0)
    BEGIN
    PRINT 'Storing dependencies for [' + @TABLE_NAME + ']';
    BEGIN TRY
    INSERT INTO #DependentObjects 
    EXEC sp_depends @TABLE_NAME;
    END TRY
    BEGIN CATCH
    PRINT 'Could not get dependencies for table [' + @TABLE_NAME + ']';
    END CATCH
    FETCH NEXT FROM cTables INTO @Company,@ID,@TABLE_NAME;
    END
    CLOSE cTables;
    Drop dependent objects first so that table drops are less likely to fail. 
    DECLARE cdo CURSOR FOR SELECT [Name],[Type] FROM #DependentObjects;
    OPEN cdo;
    FETCH NEXT FROM cdo INTO @OBJECT_NAME, @OBJECT_TYPE;
    WHILE (@@FETCH_STATUS = 0)
    BEGIN
    BEGIN TRY
    SET @OBJECT_NAME_BARE = 
    CASE 
    WHEN CHARINDEX('dbo',@OBJECT_NAME) = 1
    THEN RIGHT(@OBJECT_NAME,LEN(@OBJECT_NAME)-4)
    ELSE @OBJECT_NAME
    END;
    SET @STATEMENT = 'DROP ' + @OBJECT_TYPE + ' [' + @OBJECT_NAME_BARE + ']';
    PRINT @STATEMENT;
    EXEC sys.sp_sqlexec @STATEMENT;
    END TRY
    BEGIN CATCH
    PRINT 'Could not DROP object [' + @OBJECT_NAME + '] of type ' + @OBJECT_TYPE + ', SQL Error ' + CAST(@@ERROR AS VARCHAR(max));
    END CATCH
    FETCH NEXT FROM cdo INTO @OBJECT_NAME, @OBJECT_TYPE;
    END
    CLOSE cdo;
    DEALLOCATE cdo;
    OPEN cTables;
    FETCH NEXT FROM cTables INTO @Company,@ID,@TABLE_NAME;
    WHILE (@@FETCH_STATUS = 0)
    BEGIN
    PRINT 'Removing [' + @TABLE_NAME + ']' ;
    BEGIN TRY
    SET @STATEMENT = 'TRUNCATE TABLE dbo.[' + @TABLE_NAME + ']';
    PRINT @STATEMENT;
    EXEC sys.sp_sqlexec @STATEMENT;
    END TRY
    BEGIN CATCH
    PRINT 'Could not truncate table [' + @TABLE_NAME + ']';
    END CATCH
    BEGIN TRY
    SET @STATEMENT = 'DROP TABLE dbo.[' + @TABLE_NAME + ']';
    PRINT @STATEMENT;
    EXEC sys.sp_sqlexec @STATEMENT;
    BEGIN TRY
    SET @STATEMENT = 'DELETE FROM [Object] WHERE [Company Name] = ' + CHAR(39) + @Company + CHAR(39) + ' AND [ID] = ' + CHAR(39) + @ID + CHAR(39) + ' AND [TABLE_NAME] = ' + CHAR(39) +
    @TABLE_NAME + CHAR(39) ;
    EXEC sys.sp_sqlexec @STATEMENT;
    print @STATEMENT;
    END TRY
    BEGIN CATCH
    PRINT 'Could not Delete Object [' + @TABLE_NAME + '], from Object table, SQL Error ' + CAST(@@ERROR AS VARCHAR(max));
    END CATCH
    END TRY
    BEGIN CATCH
    PRINT 'Could not DROP table [' + @TABLE_NAME + '], SQL Error ' + CAST(@@ERROR AS VARCHAR(max));
    END CATCH
    FETCH NEXT FROM cTables INTO @Company,@ID,@TABLE_NAME;
    END
    CLOSE cTables;
    DEALLOCATE cTables;
    DROP TABLE #DependentObjects;
    DROP TABLE #NavisionObjects;
    DROP Table #NavisionSQLObjects;
    </code>

    3701 = ...does not exist or you don't have permission.
    Most of the time it means the former. So there are probably some problems in your DROP TABLE statements. Since there is a whole lot about Navision in the script, I decline from trying to figure out what. But I encourage you to study the PRINT statements.
    I think that it would be a good idea to include the schema name, in cases these tables are not in dbo after all.
    Note: rather than writing:
       SET @STATEMENT = 'DROP ' + @OBJECT_TYPE + ' [' + @OBJECT_NAME_BARE + ']';
    write:
       SET @STATEMENT = 'DROP ' + @OBJECT_TYPE + quotename(@OBJECT_NAME_BARE)
    Somewhat briefer. And it works also when the object name includes a right bracket.
    sp_sqlexec is undocumented, use sp_executesql instead.
    Erland Sommarskog, SQL Server MVP, [email protected]

  • Space is not released from tablespaces even after purging recycbin

    Hi,
    I had 168GB of space occupied by recyclebin objects (BIN$...) when i queried on dba_segments, after purging the recyclebin it is showing 0.
    But i didn't find any difference in the free space dba_free_space in tablespaces before and after purging.
    Is it the thing that even after purging recycbin, it is not released the space for respective Tablespaces?
    Also wanted to know how to release the space.
    Thanks,
    Mahi

    If you have a table X, with segments in tablespace TS, and you drop the table, you now have a recycle bin object BIN$X that owns those same segments in that same tablespace TS. That's why the segments still appear in DBA_SEGMENTS. But Oracle knows that it is free to reuse the segments associated with BIN$X if it runs out of other space to use (and Oracle knows to reuse segments from recycle bin objects in the order they were dropped) so the segments are free in DBA_FREE_SPACE. Just like deleting a file on the file system is just updating a pointer to some sort of file allocation table but not actually removing the bits from the hard drive, dropping an object when the recycle bin is just marking the segments as no longer associated with a real object.
    I have no idea whether 11g has changes to recover index names-- you might take a look at the 11g documentation (either the New Features guide or the Flashback Drop docs).
    Justin

Maybe you are looking for

  • How do I move multiple emails from Inbox to a specific folder?

    I have left a lot of emails in my Inbox that should have been moved to specific folders. How do I move them in bulk to their specific folders other than moving each one individually. I have highlighted the messages concerned by searching and then sel

  • My computer crashed and I need to rebuild my site on a different computer

    My computer crashed and I need to rebuild my iweb site on another computer. What do I need to do?

  • Seagate external usb hdd

    my seagate backup plus portable drive 1TB, is not working with time machine and marvericks os x. I had no issue before the update. It shows up in the disk utility and everything checks out fine.  I am going to try and update the firmware on the drive

  • Questions on structure/path of folders & directory

    When I copied photos from my Vista into iPhoto'09, iPhoto display them nicely into events. But how do I locate the path of the photos that Mac copied to ? I used Finder but cannot find them. I mean where is the path of iPhoto that Mac copied the phot

  • Ajax with jsf problem

    Hi I have small problem here. I worked struts with ajax before. currently. I m trying to work on ajax with jsf, here i m getting the problem. i created one ajaxaction class its extends httpservlets. then i created one manage bean, then i want to call