Error: Cannot drop schema because it is being referenced by object

My database has a schema with the same name as a user (let's call it 'username'). This schema was not explicitly created. I want to drop the User 'username' but I have to drop the schema 'username' first; However, when I tried to do that I got the message...
"Cannot drop schema 'username' because it is being referenced by object 'vw_Inventory'
There is a view named 'vw_Inventory' but I don't see where it's referencing this schema, or any schema for that matter. Why would I get this error and how do I resolve it so I can drop the Schema and User?
Darrell H Burns

If a Schema has some objects in it, then you cannot drop that Schema until you remove all the objects out of it. You can change the schema owner
to another database principal and drop the user like,
Alter Authorization ON Schema::username TO DBO; Drop User username;
other option would be
Transfer the username schema objects to a different schema and drop username schema and user like.
Alter Schema DBO Transfer Username.[OBEJECTNAME] ;
--need to repeat this until you transfer all objects under this schema
Drop Schema username;
Drop User username;
Regards,
Praveen D'sa
MCITP - Database Administrator - 2008
sqlerrors

Similar Messages

  • My Itunes wont open - reading error "cannot be read because it was created by a newer verdion of itunes"

    My Itunes wont open - reading error "cannot be read because it was created by a newer verdion of itunes"
    should i uninstall/ reinstal.
    will i loose all my music nd playlists?

    This technique should work...
    Empty/corrupt library after upgrade/crash
    Hopefully it's not been too long since you last upgraded iTunes, in fact if you get an empty/incomplete library immediately after upgrading then with the following steps you shouldn't lose a thing or need to do any further housekeeping. In the Previous iTunes Libraries folder should be a number of dated iTunes Library files. Take the most recent of these and copy it into the iTunes folder. Rename iTunes Library.itl as iTunes Library (Corrupt).itl and then rename the restored file as iTunes Library.itl. Start iTunes. Should all be good, bar any recent additions to or deletions from your library.
    See iTunes Folder Watch for a tool to catch up with any changes since the backup file was created.
    When you get it all working make a backup!
    tt2

  • HT1414 I get error "cannot restore phone because not enough memory" when trying to restore iphone 5

    My iphone 5 is freezing continuously and will not respond until turning off and on. It then freezes again with the first usage and will not respond with any button. I tried restoring it but get the message " Cannot restore phone because there isn't enough memory". Is anyone familiar with this problem?

    Read https://discussions.apple.com/message/20416055#20416055

  • Error: "Cannot access a property or method of a null object reference"

    I am getting the following action script error when I try to play my exported .swf in flash player 9.  If I hit "continue" or "dismiss all" it plays the file fine.  Is there a way to fix or at least supress this error message?
    Action Script Error:
    TypeError: Error #1009: Cannot access a property or method of a null object reference.
         at mx.managers::LayoutManager/set usePhasedInstantiation()
         at mx.core::Application()
         at template3427435882-34461-4573-128-41-612353629238248()
         at _template_mx_managers_SystemManager3427435882-34461-4573-128-41-612353629238248/create()
         at mx.managers::SystemManager/initializeTopLevelWindow()
         at mx.managers::SystemManager/docFrameHandler()

    Hi Owen,
    it looks like you have debug version of flash player installed. If you uninstall it through Control Panel and install regular (release) version from Adobe website, the message should go away.
    Margaret

  • Syncrnizat​ion Error - cannot complete sync because of some Cartid error

    I cannot complete organizer backup or sync because of a repeated error relating to something called CartId.  Only media files sycn.
    Please help!
    E A Crocker

    Hi and Welcome to the Community!
    Accurate and complete error messages are always much more useful than mere hints...with the hint you provided ("CartId"), I find nothing useful. You of course can search the public KBs for yourself:
    http://btsc.webapps.blackberry.com/btsc/microsites​/microsite.do
    Otherwise, do please provide the exact and complete error message so that others may be able to better understand your situation.
    Good luck and let us know!
    Occam's Razor nearly always applies when troubleshooting technology issues!
    If anyone has been helpful to you, please show your appreciation by clicking the button inside of their post. Please click here and read, along with the threads to which it links, for helpful information to guide you as you proceed. I always recommend that you treat your BlackBerry like any other computing device, including using a regular backup schedule...click here for an article with instructions.
    Join our BBM Channels
    BSCF General Channel
    PIN: C0001B7B4   Display/Scan Bar Code
    Knowledge Base Updates
    PIN: C0005A9AA   Display/Scan Bar Code

  • ERROR  cannot drop or replace type

    i have this code

    i have this code
    CREATE OR REPLACE TYPE PREMIER."SYS_PLSQL_63035_9_1"           
    You may have that code but you did NOT create that TYPE. When an object has a name like that it usually means that it was created by Oracle.
    One use case when Oracle does that is when you create a PIPELINED function in a package and the function uses PL/SQL types. Behind the scenes Oracle will create two or three SQL types so support that function properly. When it does it gives them names like the one you posted.
    See Solomon's answer in this thread for a discussion of the object types Oracle will create behind-the-schenes for PIPELINED functions
    https://forums.oracle.com/message/10425909?
    A PIPELINED function needs to return a collection and the collection is typically based on a scalar object type.
    So your problem is likely that the type whose code you posted is the SQL scalar object type that Oracle created and there is another type with a name like 'SYS%' that is defined as:
    CREATE OR REPLACE TYPE SYS_PLSQL_nnn as TABLE OF SYS_PLSQL_63035_9_1;
    Since that collection type depends on the scalar type you cannot modify the scalar type unless you drop the collection type and then rebuild it.
    Which begs the question: why are you MUCKING with object types that were implicitly created by Oracle?
    DON'T DO THAT unless you know EXACTLY what you are doing. You will likely break something that you should not be messing with.

  • Error:cannot backup SPFILE because the instance was not started with SPFILE

    I get the following error message, what I have done wrong?
    Starting backup at 27-JUN-08
    released channel: ch1
    RMAN-00571: ===========================================================
    RMAN-00569: =============== ERROR MESSAGE STACK FOLLOWS ===============
    RMAN-00571: ===========================================================
    RMAN-03002: failure of backup command at 06/27/2008 10:11:54
    RMAN-06062: can not backup SPFILE because the instance was not started with SPFILE
    Best Regards,
    Fan

    Show parameter pfile/spfile will not show you contents of pfile , for seeing contents you will have to show parameter with required parama name.
    show parameter log_archive_dest
    Whenever you start database ostartup first by default use spfile$Oracle_Sid.ora for starting the instance if this spfile does not exist then it goes for spfile.ora if spfile.ora also does not exist then it search init$Oracle_Sid.ora in default location.
    As you created spfile after restarting the database will automatically use spfile and will show you spfile in yours param when you will show parameter spfile if it does not show then you are still using pfile
    SQL> startup pfile='C:\oracle\product\10.1.0\admin\lease\pfile\init.ora.5242008172537'
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    Database opened.
    SQL> show parameter pfile
    NAME                                 TYPE        VALUE
    spfile                               string
    SQL> create spfile from pfile
      2  /
    File created.
    SQL> show parameter pfile
    NAME                                 TYPE        VALUE
    spfile                               string
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area  171966464 bytes
    Fixed Size                   787988 bytes
    Variable Size             145488364 bytes
    Database Buffers           25165824 bytes
    Redo Buffers                 524288 bytes
    Database mounted.
    Database opened.
    SQL> show parameter pfile
    NAME                                 TYPE        VALUE
    spfile                               string      C:\ORACLE\PRODUCT\10.1.0\DB_2\
                                                     DATABASE\SPFILELEASE.ORA
    SQL>

  • Mountain Lion install error: "Cannot be installed because a recovery system can't be created". What does this mean?

    How can I install Mountain Lion OS... I get error message saying a Recovery System can't be created... Any help or ideas out there?

    After a week of dealing with AppleCare we discovered there was a corrupted recovery disk on my hard drive when i upgraded from Snow Leopard to Lion, therefore not allowing the upgrade to Mountain Lion. So ended up backing up the computer, then formatting the computer and reloading SNOW LEOPARD then upgraded straight to Mountain Lion, then restored my user files. This has worked, and am so grateful to AppleCare for their tireless help with diagnosing and helping to sort this out! they've been fantastic!

  • In Photoshop CS 6 (64 & 32), I get the error "cannot complete command because the extension could not be loaded".  I can click to pass this, but none of my extensions will run.  If I click on "browse in Bridge" I get "Could not complete the command Browse

    Further info is that I have a current update of the JavaScript as of now, my Adobe software is all updated, as is my Windows 7 software.  Everything was running fine until yesterday, and the only changes to my system were the Tuesday Windows updates. Can anyone help me resolve this problem?

    I unstalled Photoshop.  Then I installed on another drive.  External.  It did the same thing!!!!  No mini-bridge, or any extentions loading.  I don't know what is wrong.
    I read something somewhere about a Panels file in photoshop.  So I'm looking there.

  • Error: Cannot reduce the visibility of the inherited method from object

    What does this mean?

    Let's say have a class WheeledVehicle. It has a method getWheelCount() which is public. Java guarantees that every WheeledVehicle has this method. You can subclass it (car, truck, APC) all you like, but if I have a variable x of type WheeledVehicle, I can always
    void foo(WheeledVehicle x) {
        System.out.println("Got " + x.getWheelCount() + " wheels.");
    } No matter what subclass x really happens to be. If you subclass WheeledVehicle and override getWheelCount() with a private method, java will not allow it. It breaks the contract.
    Ok.
    Every class in java extends class java.lang.Object . Object has a number of methods which you ought to make yourself familiar with. You have obviously done something like:
    class Bar {
       private Object clone() {

  • Cannot drop queue objects - invalid username/password

    Folks - I'm having an issue where I cannot drop the user that owns my AQ/streams objects from an 11g database.
    SYS@bwapepd1> drop user streams cascade;
    drop user streams cascade
    ERROR at line 1:
    ORA-24008: queue table STREAMS.LB_SUBS_SOURCE_QT must be dropped first
    So then I try to drop the queue -
    SYS@bwapepd1> execute dbms_aqadm.drop_queue('STREAMS.LB_SUBS_SOURCE_Q');
    BEGIN dbms_aqadm.drop_queue('STREAMS.LB_SUBS_SOURCE_Q'); END;
    ERROR at line 1:
    ORA-01017: invalid username/password; logon denied
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 3472
    ORA-06512: at "SYS.DBMS_AQADM", line 167
    ORA-06512: at line 1
    So, next I tried to drop the queue table with a force -
    SYS@bwapepd1> BEGIN
    dbms_aqadm.drop_queue_table(
    queue_table => 'STREAMS.LB_SUBS_SOURCE_QT',
    force => TRUE);
    END;
    BEGIN
    ERROR at line 1:
    ORA-01017: invalid username/password; logon denied
    ORA-06512: at "SYS.DBMS_AQADM_SYS", line 4215
    ORA-06512: at "SYS.DBMS_AQADM", line 197
    ORA-06512: at line 2
    I've tried as both SYS and the STREAMS owner and both get the same invalid username/password error.
    Any help is much appreciated.
    Thx!
    rb

    There is insufficient information here to help you but my recommendation would be:
    1. Stop the queue
    2. Drop the queue
    3. Drop the queue table
    4. Drop the user with cascade
    If you are getting an insufficient privs message when logged on as SYS then you need to make sure that you are where you think you are: You are not. Perhaps you have a remote connection, for example.
    PS: Is this Windows and are you using the joke that is remote desktop? That is one example of not being where you think you are.

  • HT1339 I lost all my songs on ipod when my mom plugged her ipod into my computer. I tried to restore it but it says it cannot be restored because it is in use by another application. What do I do now? help! I still have all my songs in my itunes library

    I lost all my ipod songs when my mom plugged her exact same ipod (5th generation nano) into my computer. She did not get my songs on hers but somehow I lost mine. I tried the five R's and evrything I could find online. I cannot get the songs from my iTunes library back on my ipod. I get a message that says. "Gina's ipod cannot be restored because it is being used in another application." Please help me

    Why do you need to restore your iPod to resync your content back over to it from your iTunes library? You should just be able to configure the content to sync to your device as you did before this problem occurred.
    iTunes: Syncing media content to iOS devices and iPod
    B-rock

  • User cannot dropped after run "Kill Session" command

    Hi ,
    I’m facing problem with oracle user,
    Oracle 10G R(2).Windows Xp
    Application in .NET
    1)I create user:
    2)Then I check current session using this select”
    "SELECT SID, SERIAL# FROM V$SESSION WHERE UserName =
    3)Then I execute this statement from application”
    ALTER SYSTEM KILL SESSION '{sid},{serialno}' IMMEDIATE”
    4)In our scenario user is no more connected.
    5) Now when we run below this statement from application oracle gives an error”CANNOT DROP THE USER THAT IS CURRENTLY CONNECTED”
    DROP USER {0} CASCADE
    Please advice.
    Faheem Latif

    Comments embedded
    Hi ,
    I’m facing problem with oracle user,
    Oracle 10G R(2).Windows Xp
    Application in .NET
    1)I create user:Please post complete command
    >
    2)Then I check current session using this select”
    "SELECT SID, SERIAL# FROM V$SESSION WHERE UserName =
    Please post the complete command.
    3)Then I execute this statement from application”
    ALTER SYSTEM KILL SESSION '{sid},{serialno}'
    IMMEDIATE”
    Please post the complete command
    4)In our scenario user is no more connected. How did you verify? Please post the complete command.
    >
    5) Now when we run below this statement from
    application oracle gives an error”CANNOT DROP THE
    USER THAT IS CURRENTLY CONNECTED” So the user is still connected.
    Which user are you trying to drop? Yourself?
    Again, please post the complete command.
    >
    DROP USER {0} CASCADE
    Please advice.
    Faheem LatifMy advice is you either provide sufficient detail, including all commands, and stop relying on crystal balls and fortunetellers.
    No one here was looking over your shoulder, so no one can tell what happened, without you providing sufficient clues. I agree with you this is cumbersome, and doesn't comply with your custom to dump everything here, not doing any research yourself.
    Sybrand Bakker
    Senior Oracle DBA

  • "Cannot complete command because the extension could not be loaded." with CEP5 Sample

    Hi,
    I have trouble with porting my extension to CEP5. I am getting error "Cannot complete command because the extension could not be loaded." when I open the panel.
    Is there any way to get more info about what happened and why? My extension was properly signed zxp and Extension Managed installed it without trouble.
    Also, to debug the problem, I tried to open the CEP HTML Test Extension - https://github.com/Adobe-CEP/Samples/tree/master/CEP_HTML_Test_Extension_5.0
    I have copied it to "~/Library/Application Support/Adobe/CEP/extensions/com.adobe.CEPHTMLTEST", created .debug file in it (https://gist.github.com/m6k/39a49786b7a85a9e312b), created empty .debug file inside Photoshop CC 2014.app (to suppress signature checking). When I open Photoshop CC 2014, I see test panels listed in extension menu, but when I try to open them, I also get the "Cannot complete command because the extension could not be loaded." error.
    Any hints what i am doing wrong and what can I do to debug this problem?
    Jan

    Hallgrimur, thanks, that is exactly the article I needed!
    My problem was that I forgot about the pref file  "~/Library/Preferences/com.adobe.CSXS.5.plist".

  • While Checking In " Cannot remove record because it has links"

    Hi All,
    We have an scenario while checking In MDM records in Data manager showing the following error " Cannot remove record because it has links".
    There are 2 main tables Table A and B, both are look up main to each other.
    Record 1 from Table A is linked with 5 records in Table B and one of the record from Table B is linked to Record 1 of Table A
    All the Records from Table B is checked In. Now am Check-out Record 1 from Table A and trying to Check-In back, while performing the same am getting the following error  " Cannot remove record because it has links".
    Is this work as per the Look up main design or am I missing anything. Help appreciated.
    thanks,
    <ar>

    Hi Alex,
    Before removing record you need to remove links for those records. By this I mean you must have a field in Table A which is lookup to Table B and vice-versa. So firstly delete this field value which is a sort of relationship between these two tables and afterward only try to delete/remove record.
    Regards,
    Mandeep Saini

Maybe you are looking for

  • Custom device / I am trying to use a vehicle controller model developed in LabVIEW with compactRIO (cRIO-9024)

    Now I have developed a vehile controller model with LabVIEW so as to run on VxWorks operating system. ( compactRIO cRIO-9024) And I converted a controller model of labview into *.lvmodel in order to use it as I did with simulink models.  However, con

  • How do I keep music on an external hard drive?

    I know there are some iTunes geniuses out there that can help me! I want to keep my music on an external hard drive (USB port kind) and have iTunes automatically pull music from it and dump new stuff in it. However, I am having continuous problems. W

  • Why Doesnt the Time Capsule show up my New Raid Setup External HD?

    I purchased a new enclosure for a RAID 1 setup (2, 1TB hard drives) and plugged it into my MacBook PRO to use disk utility to set up. The setup was fine. I then plugged this unit into the Time Capsule UBS port and it shows up on the airport applicati

  • Manual backup of iMovie events

    So here is my problem. I imported a lot of footage. I cant edit it all that fast. I already erased the original tape of my recorder. Its there, my hard drive is running out of space. I have a desktop PC, the one I used before getting my MacBook, so w

  • Apple TV Aspect Ratio

    I just bought an Apple TV2, but it does not correctly display video.  I am using the optical audio out which works fine. I am using a Sharp XV-Z10000 projector, which natively displays 720p at 1280x720.  My projector does have a DVI input with HDCP.