Invalid objects in sys user

Hi all,
I have lots of invalid objects in sys user. while trying to recompile i got the following error
ORA-20001: Cannot recompile SYS objects
ORA-06512: at "SYS.DBMS_UTILITY", line 321.
Then i tried to recompile it using sql>cd $ORACLE_HOME/rdbms/admin/ utlrp.sql and utlprp.sql but i didnt find any difference.
My database version is oracle10g. can any one help me for this.
Thanks

1.http://www.oracle-base.com/articles/misc/RecompilingInvalidSchemaObjects.php
2.http://www.dbapool.com/dbscripts/script_32.html
Hth
Girish Sharma

Similar Messages

  • Compile Invalid Objects

    Hi friends,
    how do i compile all the invalid objects in one time ???
    thanks,
    Raj

    Hi,
    Here's what I do when I need to recompile a user's schema. Don't say it's bullet proof, but so far it has worked for me. I use it after each deployment to a schema.
    procedure recompile_schema
    is
       l_type   user_objects.object_type%type;
       l_name   user_objects.object_name%type;
       l_stat   user_objects.status%type;
       compile_error exception;
       pragma exception_init(compile_error, -24344);
       cursor dep_cur
       is
              select object_id
                from (select o1.object_id
                            ,o1.object_name
                            ,o1.object_type
                            ,o1.status
                            ,d1.referenced_name
                            ,d1.referenced_type
                            ,case
                                when exists (select null
                                               from user_dependencies d2
                                              where d2.referenced_name = d1.name
                                                and d2.referenced_type = d1.type)
                                then
                                   1
                                else
                                   0
                             end
                                is_referenced
                        from user_dependencies d1, user_objects o1
                       where o1.object_type in
                                   ('PACKAGE'
                                   ,'PROCEDURE'
                                   ,'FUNCTION'
                                   ,'PACKAGE BODY'
                                   ,'VIEW'
                                   ,'MATERIALIZED VIEW'
                                   ,'TRIGGER'
                                   ,'SYNONYM')
                         and d1.name = o1.object_name
                         and d1.type = o1.object_type)
               where is_referenced = 1
          start with is_referenced = 0
          connect by object_name = prior referenced_name
                 and object_type = prior referenced_type
            group by object_id
            order by max(level) desc, object_id;
       procedure do_compile(pi_object_type   in user_objects.object_type%type
                           ,pi_object_name   in user_objects.object_name%type)
       is
       begin
          --dbms_output.put_line('Compiling: ' || pi_object_name);
          if pi_object_type = 'PACKAGE BODY'
          then
             exe('ALTER PACKAGE ' || pi_object_name || ' COMPILE BODY');
          else
             exe('ALTER ' || pi_object_type || ' ' || pi_object_name || ' COMPILE');
          end if;
       exception
          when compile_error
          then
             dbms_output.put_line(sqlerrm);
       end do_compile;
    begin
       dbms_output.put_line('recompiling invalid objects in schema ' || user);
       -- loop through all objects in order of dependancy.
       for rec in dep_cur
       loop
          -- select the objects attributes (type, name and status).
          select object_type, object_name, status
            into l_type, l_name, l_stat
            from user_objects
           where object_id = rec.object_id;
          -- if the object is invalid, recompile it.
          if l_stat = 'INVALID'
          then
             dbms_output.put_line('Compiling(1): ' || l_name);
             do_compile(l_type, l_name);
          end if;
       end loop;
       -- Recompile all remaining INVALID OBJECTS (all those without dependencies).
       for rec
       in (select object_type, object_name
             from user_objects
            where status = 'INVALID'
              and object_type in
                        ('PACKAGE'
                        ,'PROCEDURE'
                        ,'FUNCTION'
                        ,'TRIGGER'
                        ,'PACKAGE BODY'
                        ,'VIEW'
                        ,'MATERIALIZED VIEW'
                        ,'TRIGGER'
                        ,'SYNONYM'))
       loop
          dbms_output.put_line('Compiling(2): ' || rec.object_name);
          do_compile(rec.object_type, rec.object_name);
       end loop;
    end recompile_schema;Regards
    Peter

  • Is it ok to apply patch with invalid Objects?--Urgent

    hello,
    DB: 10.1.0.3.0
    Patch: P4751926
    OS: Linux
    I have seven invlaid objects.
    Is it ok to apply patch with invalid Objects?
    sys.LEAF_CATEGORY_TYP------------------------------------TYPE BODY
    sys.CUSTOMER_TYP----------------------------------------------TYPE
    sys.CATALOG_TYP-------------------------------------------------TYPE BODY
    sys.COMPOSITE_CATEGORY_TYP-------------------------TYPE BODY
    sys.DBMS_STATS---------------------------------------------------PACKAGE BODY
    sys.DBMS_STATS_INTERNAL--------------------------------- PACKAGE BODY
    PUBLIC.DBMS_XDBUTIL_INT------------------------------------SYNONYM
    DN

    did u try to recompile the invalid objects with the utlrp.sql script? (the script is under, <oracle_home>/rdbms/admin
    your dbms_stats is invalid, and that package is needed for getting the statistics so better to have it valid than invalid.

  • How to find invalid objects in specific schema?

    Please let me know hoe to find invalid objects in specific schema such as SYS?
    Please help and guide
    Thanks,
    Waheed.

    Ok i get invalid objects now if i want to delete these invalid objects which query i have to run?
    also let me know there is no harm if i del invalid objects from SYS schema?
    Please help and guide
    Thanks,
    Waheed.

  • ORA-01017: invalid username/password; logon denied FOR SYS USER

    Hello,
    I was usually login through the same password for sys user to log on to the database as sysdba, but last time i used " / as sysdba" to connect using local system administrative account which is connected very well and still connecting in the same way. The initializing parameter file set with the following parameter:
    remote_login_passwordfile=EXCLUSIVE
    Now if i use to connect the database server remotely using sys user, it gives me "ORA-01017: invalid username/password; logon denied" error and if i use the same login credentials on DB server machine using other local user accounts it is giving me "Insufficient Privilige" error. I can only connect now using local administrator account from DB server machine using " / as sysdba" statement.
    Kindly guide me the issue.

    When you use " / as sysdba" locally on server, you are using OS authentication which will bypass the password file and user/pass authentication.
    Looks like you have discrepancy between the password you use and real password. You can login " / as sysdba" and change your SYS password to a new one.
    When was last time you successfully login using password? What has changed since then?

  • Transport user error: invalid object name while starting CMS in CCM

    Hi Experts,
            I'm not able to start the CMS in CCM.It was working fine. Suddenly it went down due to some data base access failure. After that Iu2019m not able to start the CMS.
    Kindly find the event viewer error and information.
    Error: The root server reported an error Initialization Failure.
    Error: Failed to register object..   Reason: Transport user error: invalid object name..
    Information: Central Management Server stopped
          Could you please tell me how to start the CMS in CCM? Since I can able to setup CMS Database and audit database successfully.
    Regards,
    Sridharan

    Hi ,
            Thanks for the response.I have trace the CMS.I found some error in log file.any idea on the following errors,
    trace message: CNSClientManager::VerifyConnection() : search fails(37) - Transport user error: object with the specified name not found.
    trace message: CNSClientManager::VerifyConnection() : Failed to query for APSs.  Empty cluster list returned.
    trace message: TheAPSServer::RegisterApsInNameServer: Fail to register the current APS(Transport user error: invalid object name.)
    trace message: CNSClientManager::ClusterInfo::InvalidateAPS: Removing APS  from m_ActiveMembers and adding to m_InactiveMembers
    trace message: SIServerController:run: Fail to initialize or uninitialize.  Reason is The root server reported an error Initialization Failure.:
    Regards,
    Sridharan

  • How to Compile Sys invalid objects

    Dear,
    We have found one invalid object in our database which owner is SYS.
    How i compile this objects it's OBJECT_TYPE is package_body.
    Please suggest me if any..
    Wting
    Raj

    hello.
    I run this script, but sys's objects again to be with erros:
    OWNER     OBJECT_NAME
    SYS     ALL_WORKSPACES
    SYS     DBA_OUTLINES
    SYS     DBA_OUTLINE_HINTS
    SYS     DBA_WORKSPACES
    SYS     DBA_WORKSPACE_SESSIONS
    SYS     KU$_OUTLINE_VIEW
    SYS     LOGOFF_PROC
    SYS     LT
    SYS     LTADM
    SYS     LTDDL
    SYS     LTDTRG
    SYS     LTPRIV
    SYS     LTRIC
    SYS     LTUTIL
    SYS     LT_CTX_PKG
    SYS     NO_VM_CREATE
    SYS     NO_VM_CREATE_PROC
    SYS     NO_VM_DROP
    SYS     NO_VM_DROP_PROC
    SYS     OUTLN_PKG
    SYS     OWM_DDL_PKG
    SYS     OWM_MIG_PKG
    SYS     OWM_REPUTIL
    SYS     SYS_LOGOFF
    SYS     UD_TRIGS
    SYS     USER_OUTLINES
    SYS     USER_OUTLINE_HINTS
    SYS     USER_WORKSPACES
    SYS     WM$WORKSPACE_SESSIONS_VIEW
    SYS     WM_DDL_UTIL
    SYS     WM_INSTALLATION
    MDSYS     ALL_GEOMETRY_COLUMNS
    MDSYS     ALL_SDO_GEOM_METADATA
    MDSYS     ALL_SDO_INDEX_INFO
    MDSYS     ALL_SDO_INDEX_METADATA
    MDSYS     ALL_SDO_LRS_METADATA
    MDSYS     ALL_SDO_MAPS
    MDSYS     ALL_SDO_STYLES
    MDSYS     ALL_SDO_THEMES
    MDSYS     DBA_GEOMETRY_COLUMNS
    MDSYS     DBA_SDO_GEOM_METADATA
    MDSYS     DBA_SDO_INDEX_INFO
    MDSYS     DBA_SDO_INDEX_METADATA
    MDSYS     DBA_SDO_LRS_METADATA
    MDSYS     DBA_SDO_MAPS
    MDSYS     DBA_SDO_STYLES
    MDSYS     DBA_SDO_THEMES
    MDSYS     GEODETIC_SRIDS
    MDSYS     MD2
    MDSYS     SDO_CATALOG
    MDSYS     SDO_GEOM_TRIG_DEL1
    MDSYS     SDO_GEOM_TRIG_INS1
    MDSYS     SDO_GEOM_TRIG_UPD1
    MDSYS     SDO_LRS_TRIG_DEL
    MDSYS     SDO_LRS_TRIG_INS
    MDSYS     SDO_LRS_TRIG_UPD
    MDSYS     SDO_META
    MDSYS     SDO_MIGRATE
    MDSYS     SDO_RELATEMASK_TABLE
    MDSYS     SDO_RELATE_MASK
    MDSYS     TRANSFORM_MAP
    MDSYS     USER_GEOMETRY_COLUMNS
    MDSYS     USER_SDO_GEOM_METADATA
    MDSYS     USER_SDO_INDEX_INFO
    MDSYS     USER_SDO_INDEX_METADATA
    MDSYS     USER_SDO_LRS_METADATA
    MDSYS     USER_SDO_MAPS
    MDSYS     USER_SDO_STYLES
    MDSYS     USER_SDO_THEMES
    Can I help you? thanks.
    Oracle9i Enterprise Edition Release 9.2.0.2.0 - Production

  • Invalid objects after upgrade 8.1.7 to 9.2.0.6

    I upgraded the database from 8.0.5 under EBS 11.0.3 to 8.1.7 then from 8.1.7 to 9.2.0.6 under EBS 11.5.10.2
    in front of try to compile objects with utlrp, utlrcmp or compile i can't make these objects valid!
    can any one help me please?
    my invalids objects & errors from dba_errors are :
    OWNER NAME TEXT
    SYSTEM AD_APPS_PRIVATE PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_APPS_PRIVATE PL/SQL: SQL Statement ignored
    SYSTEM AD_APPS_PRIVATE PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_APPS_PRIVATE PL/SQL: SQL Statement ignored
    SYSTEM AD_COMPILE PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_COMPILE PL/SQL: SQL Statement ignored
    SYSTEM AD_INST PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_INST PL/SQL: SQL Statement ignored
    SYSTEM AD_INST PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_MCURR PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_MCURR PL/SQL: SQL Statement ignored
    SYSTEM AD_PARALLEL_COMPILE_PKG PL/SQL: ORA-00942: table or view does not exist
    SYSTEM AD_PARALLEL_COMPILE_PKG PL/SQL: SQL Statement ignored
    CTXSYS CTX_ACCESS PLS-00201: identifier 'SYS.DBA_SYNONYMS' must be declared CTXSYS CTX_ACCESS PL/SQL: SQL Statement ignored
    CTXSYS CTX_ACCESS PLS-00201: identifier 'SYS.DBA_OBJECTS' must be declared
    CTXSYS CTX_ACCESS PL/SQL: SQL Statement ignored
    CTXSYS CTX_ADM PLS-00905: object CTXSYS.DISPATCHER is invalid
    CTXSYS CTX_ADM PL/SQL: Statement ignored
    CTXSYS CTX_DDL PLS-00905: object CTXSYS.DISPATCHER is invalid
    CTXSYS CTX_DDL PL/SQL: Item ignored
    CTXSYS CTX_DDL PLS-00905: object CTXSYS.DISPATCHER is invalid
    CTXSYS CTX_DML PLS-00201: identifier 'DBMS_LOCK' must be declared
    CTXSYS CTX_DML PL/SQL: Statement ignored
    CTXSYS CTX_LING PLS-00593: default value of parameter "LOG_MODE" in body
    must match that of spec
    CTXSYS CTX_QUERY PLS-00201: identifier 'DBA_OBJECTS' must be declared
    CTXSYS CTX_QUERY PL/SQL: SQL Statement ignored
    CTXSYS CTX_VP PLS-00201: identifier 'DBA_OBJECTS' must be declared
    CTXSYS DISPATCHER PLS-00201: identifier 'DBMS_PIPE' must be declared
    CTXSYS DISPATCHER PL/SQL: Declaration ignored
    CTXSYS DMLQ PLS-00201: identifier 'DBMS_LOCK' must be declared
    CTXSYS DMLQ PL/SQL: Statement ignored
    CTXSYS DRASERM PLS-00593: default value of parameter "PERSON_MASK" in b
    ody must match that of spec
    CTXSYS DRDBG PLS-00201: identifier 'DBMS_PIPE' must be declared
    CTXSYS DRDBG PLS-00201: identifier 'DBMS_PIPE' must be declared
    CTXSYS DRDBG PL/SQL: Statement ignored
    CTXSYS DRICON PLS-00201: identifier 'DBA_TAB_PRIVS' must be declared
    CTXSYS DRICON PL/SQL: SQL Statement ignored
    CTXSYS DRICON PL/SQL: SQL Statement ignored
    CTXSYS DR_IDX PLS-00201: identifier 'DBMS_LOCK' must be declared
    CTXSYS DR_IDX PL/SQL: Statement ignored
    CTXSYS DR_REC PL/SQL: SQL Statement ignored
    CTXSYS DR_REC PLS-00201: identifier 'SYS.USER$' must be declared
    CTXSYS DR_REC PL/SQL: SQL Statement ignored
    CTXSYS DR_REWRITE PLS-00905: object CTXSYS.DISPATCHER is invalid
    CTXSYS DR_REWRITE PL/SQL: Statement ignored
    CTXSYS DR_REWRITE PLS-00201: identifier 'SYS.USER$' must be declared
    CTXSYS DR_REWRITE PLS-00905: object CTXSYS.DISPATCHER is invalid
    CTXSYS DR_REWRITE PL/SQL: Item ignored
    CTXSYS DR_RTM PLS-00201: identifier 'DBMS_LOCK' must be declared
    CTXSYS DR_RTM PL/SQL: Statement ignored
    CTXSYS DR_UTL PLS-00302: component 'IS_PARALLEL_SERVER' must be declar
    ed
    CTXSYS DR_UTL PL/SQL: Statement ignored
    CTXSYS LISTENER PLS-00905: object CTXSYS.DISPATCHER is invalid
    CTXSYS LISTENER PL/SQL: Item ignored
    CTXSYS LISTENER PLS-00320: the declaration of the type of this expressio
    n is incomplete or malformed
    CTXSYS LISTENER PL/SQL: Statement ignored
    CTXSYS LISTENER PLS-00320: the declaration of the type of this expressio
    n is incomplete or malformed
    CTXSYS PIPE PL/SQL: Statement ignored
    CTXSYS PIPE PLS-00201: identifier 'DBMS_PIPE' must be declared
    CTXSYS PIPE PL/SQL: Statement ignored
    CTXSYS SVCQ PLS-00201: identifier 'DBMS_LOCK' must be declared
    CTXSYS SVCQ PL/SQL: Statement ignored
    APPS AD_DD PLS-00593: default value of parameter "P_DESCRIPTION" in
    body must match that of spec
    APPS AK_ATTRIBUTE_PVT PLS-00593: default value of parameter "P_DATA_TYPE" in b
    ody must match that of spec
    APPS AK_ATTRIBUTE_PVT PLS-00593: default value of parameter "P_PASS" in body m
    ust match that of spec
    APPS AK_OBJECT_GRP PLS-00593: default value of parameter "P_VALUE_VARCHAR2"
    in body must match that of spec
    APPS AS_OPPORTUNITY_PUB PLS-00593: default value of parameter "P_DEFAULT_FORECAS
    TING_INFO" in body must match that of spec
    APPS AS_OPPORTUNITY_PVT PLS-00593: default value of parameter "P_DEFAULT_FORECAS
    TING_INFO" in body must match that of spec
    APPS AS_QUOTE_PVT PLS-00593: default value of parameter "P_QUOTE_STATUS" i
    n body must match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_PERIOD" in body
    must match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_CCID" in body m
    ust match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_BALSEGL" in bod
    y must match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_BALSEGH" in bod
    y must match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_ACCSEGL" in bod
    y must match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_ACCSEGH" in bod
    y must match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_TPID" in body m
    ust match that of spec
    APPS AX_CALCULATE_BALANCES_PKG PLS-00593: default value of parameter "P_SUBID" in body
    must match that of spec
    Regards.
    e-mail : [email protected]

    thank you for your answer,
    i followed all documentation from oracle support, first document is
    Upgrading Oracle Applications
    Release 11i (11.5.10)
    Part No. B13584-01
    i used also "Installation Guide Using Rapid Install.pdf" chapter 4
    first thing is that i upgraded database from 8.0.5 under EBS 11.0.3/win 2000 to 8.1.7 on an intermediate machine. then, i prepared environnement on an other machine with EBS 11.5.10.2 under windows 2003 (for the database, i have now only software) then i copied upgraded 8.1.7 database from intermediate machine to 11i machine then i upgraded it to 9.2.0.6 like it recommeded in category3 database tasks in "Upgrading Oracle Applications" documentation.
    have u any idea, what's the probleme with these invalid objects?
    regards.

  • Invalid objects in APEX Schemas after import.

    Hi,
    After importing the APEX_040100 user in the database I got several invalid objects that are causing APEX not to work.
    I gave up to compile them. After using all kind of tricks such as compile one schema at a time or compile all of them using the utlprp.sql script
    or using EXEC DBMS_DDL.alter_compile('PACKAGE', 'MY_SCHEMA', 'MY_PACKAGE');
    or one object art a time using command sililar to:
    ALTER PACKAGE my_package COMPILE;
    ALTER PACKAGE my_package COMPILE BODY;
    ALTER PROCEDURE my_procedure COMPILE;
    ALTER FUNCTION my_function COMPILE;
    ALTER TRIGGER my_trigger COMPILE;
    ALTER VIEW my_view COMPILE;
    I can't find any documentation to show how to recompile them properly.
    So I am asking:
    1. How can we recompile all objects in APEX?
    2. How can we re-install APEX?
    3. How can we revert to previous version if both have problems?
    Thanks
    Yannis
    Here is the list of invalid objects:
    APEX_040100     PACKAGE     WWV_FLOW_DYNAMIC_EXEC     INVALID
    APEX_040100     PACKAGE     WWV_FLOW_LOAD_DATA     INVALID
    APEX_040100     PACKAGE     WWV_FLOW_SAMPLE_APP     INVALID
    APEX_040100     PACKAGE     WWV_FLOW_UTILITIES     INVALID
    APEX_040100     PACKAGE BODY     APEXWS     INVALID
    APEX_040100     PACKAGE BODY     HTMLDB_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_4000_UI     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ADMIN_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ADVISOR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AJAX     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_APPLICATION_INSTALL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ASFCOOKIE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUDIT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUTHENTICATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUTHENTICATION_ENGINE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_AUTHORIZATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_BUILDER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_BUTTON     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CALENDAR3     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CALENDAR_AJAX     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CHECK     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_COLLECTION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CONDITIONS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_COPY_PAGE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CREATE_APP_FROM_QUERY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CREATE_MODEL_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CSS_API_PRIVATE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CUSTOM_AUTH     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_CUSTOM_AUTH_STD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DATALOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DATA_QUICK_FLOW     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DATA_UPLOAD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DICTIONARY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DISP_PAGE_PLUGS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DML     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DOWNLOAD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DRAG_LAYOUT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_DYNAMIC_EXEC     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ERROR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_F4000_P4150     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_F4000_PLUGINS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_F4000_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FILE_MGR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART2     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART5     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART5_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FLASH_CHART_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FND_DEVELOPER_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FND_USER_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FORMS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_FORM_CONTROL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GENERATE_DDL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GENERATE_TABLE_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GENERIC_ATTR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_GEN_API2     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_HINT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_HTML_API_PRIVATE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_IMP_PARSER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_INSTALL_WIZARD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_INSTANCE_ADMIN     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_ITEM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_JAVASCRIPT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_JOB     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LANG     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LDAP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LIST     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LOAD_DATA     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LOAD_EXCEL_DATA     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_LOGIN     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_MAIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_META_DATA     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_META_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_MODEL_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_NATIVE_AUTHENTICATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_NATIVE_DYNAMIC_ACTION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_NATIVE_ITEM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PAGE_CACHE_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLSQL_EDITOR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLSQL_JOB     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLUGIN_ENGINE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLUGIN_F4000     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PLUGIN_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PPR_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PRINT_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROCESS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROCESS_UTILITY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROVISION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_PROVISIONING     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_QUERY_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_REGEXP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_REGION_LAYOUT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_RENDER_QUERY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_RENDER_SHORTCUT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_REST     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SAMPLE_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SC_TRANSACTIONS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SECURITY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SERIES_ATTR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SESSION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SESSION_MON     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SVG     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_PAGE_CALLS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_PARSER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_SCRIPT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_SW_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TABLE_DRILL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TAB_MGR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TEAM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TEAM_GEN_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TEMPLATES_UTIL     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_THEME_FILES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_THEME_MANAGER     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TREE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_TREE_REGION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_UPGRADE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_UPGRADE_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_UTILITIES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_VALIDATION     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WEBSERVICES_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WEB_SERVICES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WIZARD_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WIZ_CONFIRM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_AJAX     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_DIALOGUE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_EXPR     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_FORM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSHEET_STANDARD     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WORKSPACE_REPORTS     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_ATTACHMENT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_DIALOG     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_EXPORT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_FLASH_CHART     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_FORM     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_GEOCODE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_IMPORT     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_IMPORT_API     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_SECURITY     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_SETUP     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_STICKIES     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_UI     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_WS_WEBPAGE     INVALID
    APEX_040100     PACKAGE BODY     WWV_FLOW_XLIFF     INVALID
    APEX_040100     PACKAGE BODY     WWV_META_CLEANUP     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_ACC_LOAD     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRMMENU_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_OLB_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_UPDATE_APX_APP     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_FRM_UTILITIES     INVALID
    APEX_040100     PACKAGE BODY     WWV_MIG_RPT_LOAD_XML     INVALID
    APEX_040100     PACKAGE BODY     WWV_RENDER_CALENDAR2     INVALID
    APEX_040100     PACKAGE BODY     WWV_RENDER_CHART2     INVALID
    APEX_040100     PACKAGE BODY     WWV_RENDER_REPORT3     INVALID
    APEX_040100     PROCEDURE     APEX_ADMIN     INVALID
    APEX_040100     PROCEDURE     F     INVALID
    APEX_040100     PROCEDURE     HTMLDB_ADMIN     INVALID
    APEX_040100     PROCEDURE     WS     INVALID
    APEX_040100     SYNONYM     APEX_COLLECTIONS     INVALID
    APEX_040100     SYNONYM     HTMLDB_COLLECTIONS     INVALID
    APEX_040100     TRIGGER     WWV_FLOW_FEEDBACK_T1     INVALID
    APEX_040100     VIEW     WWV_FLOW_ADVISOR_RESULT     INVALID
    APEX_040100     VIEW     WWV_FLOW_COLLECTIONS     INVALID
    APEX_040100     VIEW     WWV_FLOW_SEARCH_RESULT     INVALID
    APEX_040100     VIEW     WWV_MULTI_COMPONENT_EXPORT     INVALID

    yannisr wrote:
    Hi,
    After importing the APEX_040100 user in the database I got several invalid objects that are causing APEX not to work.Hi,
    You mean you did export APEX_040100 schema from one database and import it to another database?
    There is also public synonyms and if I recall correct some objects are in SYS schema that belongs to Apex and are needed.
    Regards,
    Jari
    http://dbswh.webhop.net/dbswh/f?p=BLOG:HOME:0

  • Invalid objects showed up after import

    Hello,
    I wanted to migrate a lot of databases to 1 database, where I created schemas for every database. I imported each database to new schema and now I have one database with 30 schemas. When I try to export (full export) database like user "system", export is clear without any warnings, but when I try to import this database to another database a lot of warnings showed up. Warnings like:
    IMP-00061: Warning: Object type "SYSTEM". "Repco $ _OBJECT_NULL_VECTOR" already exists with a different identifier
    IMP-00019: row was rejected because of an error ORACLE 1
    IMP-00003: ORACLE error occurred 1
    ORA-00001: the unique constraints violation (SYSMAN.MGMT_ARU_FAM_PRD_PK)
    import was completed successfully with warnings. I try to recompile invalid objects which were created in this database, a lot of objects recompile ok but a few not
    SQL> select * from all_objects where status='INVALID';
    OWNER OBJECT_NAME
    SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
    CREATED LAST_DDL TIMESTAMP STATUS T G S
    SYS DEF$_AQCALL
    4943 SYNONYM
    17.04.07 17.04.07 2007-04-17:03:41:22 INVALID N N N
    SYS DEFTRAN
    4955 VIEW
    17.04.07 17.04.07 2007-04-17:03:41:23 INVALID N N N
    OWNER OBJECT_NAME
    SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
    CREATED LAST_DDL TIMESTAMP STATUS T G S
    PUBLIC DEFTRAN
    4956 SYNONYM
    17.04.07 17.04.07 2007-04-17:03:41:23 INVALID N N N
    SYS DEFTRANDEST
    4957 VIEW
    OWNER OBJECT_NAME
    SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
    CREATED LAST_DDL TIMESTAMP STATUS T G S
    17.04.07 17.04.07 2007-04-17:03:41:23 INVALID N N N
    PUBLIC DEFTRANDEST
    4958 SYNONYM
    17.04.07 17.04.07 2007-04-17:03:50:09 INVALID N N N
    SYS DBMS_DEFER_SYS
    OWNER OBJECT_NAME
    SUBOBJECT_NAME OBJECT_ID DATA_OBJECT_ID OBJECT_TYPE
    CREATED LAST_DDL TIMESTAMP STATUS T G S
    5054 PACKAGE BODY
    17.04.07 17.04.07 2007-04-17:03:50:35 INVALID N N N
    SYS DBMS_SNAPSHOT
    7493 PACKAGE BODY
    17.04.07 17.04.07 2007-04-17:03:50:56 INVALID N N N
    Please, I need your advice to solve this issues... Thank you for any help...

    thank you for your feedback...
    I am trying do it this on Windows Server 2008 R2 x64 + Oracle v. 10.2.0.3.0
    Export command:
    exp system/system@db01 file=C:\ICP\db01.DMP log=C:\ICP\db01.LOG FULL=Y
    Import commad:
    imp system/system@db01 FILE=C:\ICP\db01.DMP LOG=C:\ICP\db01.LOG FULL=Y IGNORE=Y
    "You should not be importing SYSTEM objects as these are seeded objects and are already present in the target database." so how to import whole database?
    Thank you...

  • Invalid objects found in Repository

    I am installing grid control 11.1 to redhat 5.2, with repository database of 11.2 locate on the same host. At step 7 of 13 connect to database, I provided the host, port, service and sys password and clicked Next, and I got a simple error messageInvalid objects found in Repository. Re-compile the objects using:
    $ORACLE_HOME/sysman/admin/emdrep/sql/core/latest/admin/admin_recompile_invalid.sql
    <EM_REPOS_USER>.Ther is no other clues given. I checked the script admin_recompile_invalid.sql, it is pretty simple, just goes though all_objects and dba_synonyms for any invalide obejct for the <EM_REPOS_USER> user. If find, recompile. I am not sure what user is <EM_REPOS_USER> but the two queries returns nothing in my database for any/all users. The script should just pass and doing nothing.
    What could be wrong?
    Where I can find more info?

    Did you try recompiling invalid objects using utlrp.sql
    Also check invalid objects using :
    select count(*) from dba_objects where status<>'VALID';
    Regards
    Rajesh

  • Catproc and Catalog Executed as non-sys user

    One of my friend executed the above packages from a non-sys user schema.
    That schema is also important.
    Now how to clean up these objects?
    Just re-running the above packages as sys schema is enough?
    Thanks

    Excerpts from the note 1015902.4:
    Shutdown your database with 'shutdown immediate'. If this hangs for an
    extended period of time, then use 'shutdown abort'. This must be done
    as 'internal'.
    Start up your database with 'startup', or 'startup restrict'.
    The following script should be run as 'sys' or 'internal' from SQL*Plus
    (this is important for formatting the script that it creates). This script
    will create another script called file.sql. If you do not run the following
    script from SQL*Plus, you will need to edit the resulting script to make sure
    file.sql will run properly.
    ----------------------------- <script start> --------------------------
    set echo off
    set pagesize 0
    set feedback off
    spool drop.sql
    SELECT 'drop '||OBJECT_TYPE||' '||OWNER||'.'||object_name||';'
    FROM all_objects
    WHERE OWNER != 'SYS' AND OBJECT_TYPE != 'SYNONYM'
    AND OBJECT_NAME IN
    (SELECT OBJECT_NAME FROM ALL_OBJECTS
    WHERE OWNER = 'SYS')
    ORDER BY object_type, object_name;
    spool off
    set feedback on
    set echo on
    ---------------------------- <script end> -----------------------------
    Run the script created from above script as either internal or sys.
    The script will contain sql commands like:
    DROP PACKAGE SYSTEM.DBMS_SHARED_POOL;
    DROP VIEW SYSTEM.DBA_OBJECTS;
    SQL> @drop.sql
    You may alternately find the user who owns 'sys' objects, and drop that
    user.
    SQL> drop user xxxx cascade;
    This may hang. If it does, use shutdown abort, and rerun script. When the
    script completes, 'shutdown immediate' your database. Startup and run
    catalog.sql and catproc.sql as either 'sys' or 'internal'. You may then
    run pupbld.sql as the 'system' user. If you have replication installed,
    you may also need to run catrep.sql as 'sys'.
    Hints for running the catalog, catproc and catrep scripts:
    1. Check for available freespace in system tablespace, you will probably
    want at least max(bytes) at least 4M, and sum(bytes) of 10M:
    SQL> select max(bytes) from dba_free_space where tablespace_name = 'SYSTEM';
    SQL> select sum(bytes) from dba_free_space where tablespace_name = 'SYSTEM';
    2. Make system tablespace datafile autoextend:
    SQL> alter database datafile 'path\filename' autoextend on
    next 5m maxsize 100m;
    View dba_data_files for file names
    SQL> select * From dba_data_files where tablespace_name = 'SYSTEM';
    3. Make rollback_data tablespace datafile autoextend:
    SQL> alter database datafile 'path\filename' autoextend on
    next 5m maxsize 200m;
    4. Prior to running data dictionary scripts, spool to file
    SQL> spool file.log
    5. Check file.log and alert<SID>.log after execution for errors.
    Solution Explanation:
    =====================
    When CATALOG.SQL or CATPROC.SQL were run as SYSTEM or another schema owner,
    this created some valid and invalid objects owned by SYSTEM (in view
    DBA_OBJECTS) that should be owned by SYS only. Comparing those object owned
    by SYS with objects owned by other schemas and deleting the duplicate
    objects removes the duplicate objects.

  • Security about SYSTEM and SYS users

    Guys,
    Just curiosity,
    1) What happens if I logged with a user that have DBA role or DROP USER privilege and to drop the SYSTEM or SYS user ? This is possible ? If yes, how can protect them ?
    2) I know that the SYS is owner of the dictionary and catalog, but what is the objective of the SYSTEM user to exists ?
    Tank you.

    Hi,
    As you say, SYS is the owner of the database and the owner of the data dictionary.
    But SYS has the SYSDBA privilege which SYSTEM doesn't. This makes it possible for SYS to become a very very powerful user. In addition, never ever create objects in the SYS schema. SYSTEM is a privileged administration user, and typically owns Oracle provided tables other than the dictionary.
    Making a test.
    oracle@linux:~> sqlplus
    SQL*Plus: Release 9.2.0.4.0 - Production on Thu Dec 7 08:55:51 2006
    Copyright (c) 1982, 2002, Oracle Corporation. All rights reserved.
    Enter user-name: / as sysdba
    Connected to an idle instance.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 126948772 bytes
    Fixed Size 452004 bytes
    Variable Size 104857600 bytes
    Database Buffers 20971520 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    As Frederic showed
    SQL> drop user sys cascade;
    drop user sys cascade
    ERROR at line 1:
    ORA-01031: insufficient privileges
    SQL> drop user system cascade;
    User dropped.
    SQL> shutdown immediate
    Database closed.
    Database dismounted.
    ORACLE instance shut down.
    SQL> startup
    ORACLE instance started.
    Total System Global Area 126948772 bytes
    Fixed Size 452004 bytes
    Variable Size 104857600 bytes
    Database Buffers 20971520 bytes
    Redo Buffers 667648 bytes
    Database mounted.
    Database opened.
    SQL>
    If you like to protect it, you can do this below:
    eg:
    create table secured_objects(object_name varchar2(30));
    Table created.
    SQL> insert into secured_objects values ('SYSTEM');
    1 row created.
    SQL> select * from secured_objects;
    OBJECT_NAME
    SYSTEM
    1 rows selected.
    create or replace trigger check_beforedrop
    before drop on database
    declare
    oname char(30);
    begin
    select object_name into oname from secured_objects
    where upper(object_name)=ora_dict_obj_name;
    if sql%found then
    RAISE_APPLICATION_ERROR(-20001,'You have not permission to drop this object.');
    end if;
    exception
    when no_data_found
    then dbms_output.put_line('This object was dropped.');
    end;
    SQL> drop user system cascade;
    drop user system
    ERROR at line 1:
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: You have not permission to drop this object.
    ORA-06512: at line 7
    Reference: http://www.adp-gmbh.ch/ora/misc/sys_system_internal.html
    Cheers

  • Reg: Error while connecting to a remote database as SYS user.

    Hello all,
    When i try to connect to a database as SYS user i'm getting the error as
    ora-01017 invalid username/password logon denied
    But it is logging from the local system where the oracle is installed.
    I created the password file and checked the contents in v$pwfile_users.
    The result is " no rows selected".
    so when i try to grant sysdba to sys user
    grant sysdba to sys;
    i'm getting error as,
    ORA-01994: GRANT failed: password file missing or disabled
    Please help me in resolving this.
    Regards,
    Konda

    I created the passwordfile using the command below,
    orapwd.exe file=E:\app\Administrator\product\11.2.0\dbhome_1\database\PWDfile.ora force=y entries=30 password=<sys_password>
    is this okay...??

  • Invalid Object error in Stored Procedure

    
    Royal Thomas

    It was a bit of a puzzler, but here is a repro that demonstrates Thomas's problem:
    CREATE USER svante WITHOUT LOGIN WITH DEFAULT_SCHEMA = guest
    ALTER ROLE db_owner ADD MEMBER svante
    go
    EXECUTE AS USER = 'svante'
    go
    CREATE PROCEDURE dbo.testis AS
    SELECT @@procid AS beata INTO sture
    SELECT * FROM sture
    go
    EXEC testis  -- Invalid object name 'sture'.
    go
    REVERT
    go
    EXEC testis -- Succede
    go
    DROP USER svante
    DROP TABLE guest.sture 
    DROP TABLE sture
    DROP PROCEDURE testis
    What is happening is this: In the statement
       SELECT @@procid AS beata INTO sture
    the table is created in the default schema of the current user, not in the default schema of the procedure owner (which is dbo, since the procedures was created in dbo). This was certainly unexpected, at least for me.
    But in
      SELECT * FROM sture
    the regular rules, and here sture resolves to dbo.sture, not guest.sture.
    Thomas should make sure that he uses dbo.xxxx in all his SELECT INTO statements.
    Erland Sommarskog, SQL Server MVP, [email protected]

Maybe you are looking for

  • Downloader

    As im new to this ( Yesterday ) just finding my feet just downloaded Skype its all working however how do i delete the files in Downloader? is it right click remove from list? douse this delete the file downloaded ? Thanks

  • Adobe Photoshop Incompatible with Windows 7 ?

    I typically do not have problems installing Microsoft products, Corel products, HP products, AV software, dozens of other companies products on my Windows 7 Home Premium computer. I have never had problems installing Adobe products on ME, XP, Vista.

  • How to force initial stage of a portal page?

    Hello, We have here the following situation: We have one portal with a desktop containing two pages. Page 1 has a pageflow portlet with a list of items each one with a link to a form to contact us. Page 2 has the pageflow portlet with contact us port

  • RFC_USER getting locked

    Hi, RFC_USER are frequently getting locked . How to find In which RFC RFC_USER password is wrogly maintain ? which background job locking RFC_USER why RFC_USER getting locked frequently ? REgards M

  • Adobe Patch Installer error "updates not applicable"

    i have photoshop cs6 and i am trying to get dynamic link update 1.0.1.  i am frustrated and am about to destroy my computer. what can i do to get thsi fixed ? this is how the error looks like: now am trying to get an update for photoshop cs6 because