Tablespaces used in user schema

guys,
I want to find all tablespaces used in user schema - scott. I tried using views like v$tablespace, v$datafile.. but doesnt seem to help.
any suggestions/inputs ??
Thanks

hi,
SQL> alter user test default tablespace users quota unlimited on users;
User altered.
SQL> create table test.tab1 as select * from all_objects;
Table created.
SQL> alter user test default tablespace example quota unlimited on example;
User altered.
SQL> create table test.tab2 as select * from all_objects;
Table created.
SQL> column segment_name format a25
SQL> column tablespace_name format a25
SQL> column owner format a25
SQL> select tablespace_name, segment_name,owner
  2  from dba_segments
  3  where owner = 'TEST' and segment_name in ('TAB1','TAB2');
TABLESPACE_NAME           SEGMENT_NAME              OWNER
USERS                     TAB1                      TEST
EXAMPLE                   TAB2                      TEST
SQL> select default_tablespace, temporary_tablespace
  2  from dba_users
  3  where username = 'TEST';
DEFAULT_TABLESPACE             TEMPORARY_TABLESPACE
EXAMPLE                        TEMP
SQL>At a time user have default tablespace. but you can see there object create on any another tablespace .
hope this helps
Taj
Message was edited by:
User 52

Similar Messages

  • Schema not imported to the default tablespace of the user

    I exported a schema. Then when I tried to import it in an existing schema, all the objects are successfully imported. But they are not imported in the default tablespace of that particular user. Why? How can I force the import to the default tablespace of that user?

    Did you attempt to import the objects into a new schema or into the existing one? If you are attempting to migrate the objects to a new schema you need to use the parameters:
    fromuser=<old_schema> touser=<new_schema>
    Or if you are attempting to migrate the objects to a new tablespace pre-create them as described above and import with the ignore=y.
    Message was edited by:
    klichten

  • Connect to a specific schema ('foo') using a user ('fee')

    Hi,
    Is it possible to connect a schema (foo for example) using an other user than foo (fee for example) using a specific dsn connection string ?
    or is there another way ?
    Thanks

    Hi Justin,
    I've created a database TEST containing two schemas. let's call us LOCAL and CENTRAL. so respectively owned by LOCAL and CENTRAL user.
    I've also created an other user called SFRADE who have a role which give select, insert, delete and update privileges to all objects of LOCAL and CENTRAL.
    I'd like to be able to use SFRADE user to connect to TEST and be able to directly fetch data coming from both LOCAL and CENTRAL schema without using 'alter session set current_schema' statement or using the schema name as prefix of schema object in a sql statement.
    I've read that I can use a database trigger logon to change the default schema. I've tried it but it partially solved my problem. I can directly retrieve data from one of the two schemas, not both.
    I'm wondering if there is a parameter in ODBC in the DSN string to specify what is the default schema. I could use this parameter into the db logon trigger.

  • When to set iwtUser-role and other per user schema using custom athentication?

    I have written my own authentication module and would like to set per user schema on login. Can I write iwtUser-role, iwtCalendarProvider-calendarUserPassword, etc from the authentication class?

    Yes you can, after the authentication is complete you get the profile object and then set whatever value you want to set for particular attributes you want to set ..

  • EVT_, SM and SMP_ tables in a user schema

    I found some tables and indexes in a user schema that this user hasn't created. 15 tables have a prefix EVT_, about 35 start with SM and about 30 have the prefix SMP_ . It seems they are some type of tables created by Oracle. What are they for and can they be deleted?
    Thanks in advance!
    Best regards,
    Tzonka
    Please see the list of some of them:
    TABLE TABLESPACE
    EVT_CARRIER_CONFIGURATION USERS
    EVT_DEST_PROFILE USERS
    EVT_HISTORY USERS
    EVT_INSTANCE USERS
    EVT_MAIL_CONFIGURATION USERS
    EVT_MONITOR_NODE USERS
    EVT_NOTIFY_STATUS USERS
    EVT_OPERATORS USERS
    EVT_OPERATORS_ADDITIONAL USERS
    EVT_OPERATORS_SYSTEMS USERS
    EVT_OUTSTANDING USERS
    EVT_PROFILE USERS
    EVT_PROFILE_EVENTS USERS
    EVT_REGISTRY USERS
    EVT_REGISTRY_BACKLOG USERS
    PLAN_TABLE USERS
    SMACTUALPARAMETER_S USERS
    SMAGENTJOB_S USERS
    SMARCHIVE_S USERS
    SMBREAKABLELINKS USERS
    SMCLIQUE USERS
    SMCONFIGURATION USERS
    SMCONSOLESOSETTING_S USERS
    SMDATABASE_S USERS
    SMP_AD_ADDRESSES_ USERS
    SMP_AD_DISCOVERED_NODES_ USERS
    SMP_AD_NODES_ USERS
    SMP_AD_PARMS_ USERS
    SMP_AUTO_DISCOVERY_ITEM_ USERS
    SMP_AUTO_DISCOVERY_PARMS_ USERS
    SMP_BLOB_ USERS
    SMP_BRM_ACTIVE_JOB_ USERS
    SMP_BRM_CHANNEL_DEVICE_ USERS
    SMP_BRM_DEFAULT_CHANNEL_ USERS
    SMP_BRM_RC_CONNECT_STRING_ USERS
    SMP_BRM_SAVED_JOB_ USERS
    SMP_BRM_TEMP_SCRIPTS_ USERS
    And some indexes:
    TABLE INDEX TABLESPACE
    EVT_CARRIER_CONFIGURATION SYS_C006660 USERS
    EVT_MONITOR_NODE SYS_C006662 USERS
    EVT_OPERATORS SYS_C006664 USERS
    EVT_PROFILE SYS_C006668 USERS
    ... etc.

    Hi,
    >>What are they for
    As I know SMP_ and EVT_ tables are used by Enterprise Manager, and comprise the Enterprise Manager Repository. When logging into Enterprise Manager, always log in as the repository owner.
    >>can they be deleted?
    if your oem repository owner is different from the user in which these tables are listed then the objects can be dropped
    Cheers

  • Query slow in  user schema but fast in sys schema

    Hi,
    DB :10.2.
    OS :Aix
    Tool : Toad
    We executed a query which fast(20 seconds) in sys schema.
    But it's taking slow in user schema(it is taken 10 minutes).
    Yesterday we gathered dictionary stats also.
    Any suggestions.
    Thanks & Regards,
    VN

    You're querying a bunch of USER_<<x>> data dictionary views. Since those views show the objects owned by the current user, the script you generate will be completely different depending on the identity of the current user and the set of objects owned by the current user. If you create a new user and run this script as the new user, it will be even faster because USER_TABLES, USER_SEGMENTS, USER_INDEXES, etc. will all be empty.
    I don't understand why you would issue a MOVE on a table without specifying a new tablespace-- that seems like a pointless exercise. And I would seriously question the architect that wants to use ANALYZE to gather statistics rather than using DBMS_STATS.
    Justin

  • Dispatcher getting stopped due to possible user/schema mismatch.Plz help

    Hello All,
    I have SAP Netweaver 7.01 ABAP AS installed on windows 2003. Was working fine but I had to have a bug fixed in win 2003 and restarted my SAP machine. Now, dispatcher is not running. Stops after a while. I have tried restarting SAP and the machine but dispatcher is not running. I looked at the dispatcher trace and dev_w0 but could not figure out the reason as I am new to SAP, please provide any pointers to solve this issue. Any general tips is also welcome. Timely help is greatly appreciated!
    I have pasted parts of dev_disp and dev_w0 below. If you require more details, please let me know. Thank you very much!
    -Arvind
    dev_disp:
    =========
    trc file: "dev_disp", trc level: 1, release: "701"
    sysno      00
    sid        NSP
    systemid   560 (PC with Windows NT)
    relno      7010
    patchlevel 0
    patchno    29
    intno      20020600
    make:      multithreaded, Unicode, optimized
    pid        3784
    Fri Jun 10 19:25:12 2011
    kernel runs with dp version 241000(ext=110000) (@(#) DPLIB-INT-VERSION-241000-UC)
    length of sys_adm_ext is 576 bytes
    *** SWITCH TRC-HIDE on ***
    ***LOG Q00=> DpSapEnvInit, DPStart (00 3784) [dpxxdisp.c   1261]
         shared lib "dw_xml.dll" version 29 successfully loaded
         shared lib "dw_xtc.dll" version 29 successfully loaded
         shared lib "dw_stl.dll" version 29 successfully loaded
         shared lib "dw_gui.dll" version 29 successfully loaded
         shared lib "dw_mdm.dll" version 29 successfully loaded
    rdisp/softcancel_sequence :  -> 0,5,-1
    use internal message server connection to port 3900
    Fri Jun 10 19:25:18 2011
    *** WARNING => DpNetCheck: NiAddrToHost(1.0.0.0) took 5 seconds
    ***LOG GZZ=> 1 possible network problems detected - check tracefile and adjust the DNS settings [dpxxtool2.c  5529]
    MtxInit: 30000 0 0
    DpSysAdmExtInit: ABAP is active
    DpSysAdmExtInit: VMC (JAVA VM in WP) is not active
    DpIPCInit2: start server >egsap701_NSP_00                         <
    DpShMCreate: sizeof(wp_adm)          13632     (1704)
    DpShMCreate: sizeof(tm_adm)          4415616     (21968)
    DpShMCreate: sizeof(wp_ca_adm)          1664     (80)
    DpShMCreate: sizeof(appc_ca_adm)     1600     (80)
    DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    DpShMCreate: sizeof(comm_adm)          528064     (1048)
    DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    DpShMCreate: sizeof(slock_adm)          0     (96)
    DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    DpShMCreate: sizeof(file_adm)          0     (72)
    DpShMCreate: sizeof(vmc_adm)          0     (1544)
    DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    DpShMCreate: sizeof(gw_adm)     48
    DpShMCreate: SHM_DP_ADM_KEY          (addr: 07050040, size: 5042120)
    DpShMCreate: allocated sys_adm at 07050040
    DpShMCreate: allocated wp_adm at 07052170
    DpShMCreate: allocated tm_adm_list at 070556B0
    DpShMCreate: allocated tm_adm at 070556E0
    DpShMCreate: allocated wp_ca_adm at 0748B760
    DpShMCreate: allocated appc_ca_adm at 0748BDE0
    DpShMCreate: allocated comm_adm at 0748C420
    DpShMCreate: system runs without slock table
    DpShMCreate: system runs without file table
    DpShMCreate: allocated vmc_adm_list at 0750D2E0
    DpShMCreate: allocated gw_adm at 0750D320
    DpShMCreate: system runs without vmc_adm
    DpShMCreate: allocated ca_info at 0750D350
    DpShMCreate: allocated wall_adm at 0750D358
    MBUF state OFF
    DpCommInitTable: init table for 500 entries
    rdisp/queue_size_check_value :  -> off
    ThTaskStatus: rdisp/reset_online_during_debug 0
    *** ERROR => ztta/cua_area is 180000. [sapinit.c    975]
    *** ERROR => ztta/cua_area adjusted to 500000. [sapinit.c    979]
    EmInit: MmSetImplementation( 2 ).
    MM global diagnostic options set: 0
    <ES> client 0 initializing ....
    <ES> InitFreeList
    <ES> block size is 1024 kByte.
    Using implementation view
    <EsNT> Using memory model view.
    <EsNT> Memory Reset disabled as NT default
    <ES> 1023 blocks reserved for free list.
    ES initialized.
    rdisp/http_min_wait_dia_wp : 1 -> 1
    ***LOG CPS=> DpLoopInit, ICU ( 3.0 3.0 4.0.1) [dpxxdisp.c   1656]
    ***LOG Q0K=> DpMsAttach, mscon ( egsap701) [dpxxdisp.c   12362]
    DpStartStopMsg: send start message (myname is >egsap701_NSP_00                         <)
    DpStartStopMsg: start msg sent
    CCMS: alert/MONI_SEGM_SIZE = 0   monitoring and alerting switched off.
    DpMsgAdmin: Set release to 7010, patchlevel 0
    MBUF state PREPARED
    MBUF component UP
    DpMBufHwIdSet: set Hardware-ID
    ***LOG Q1C=> DpMBufHwIdSet [dpxxmbuf.c   1048]
    DpMsgAdmin: Set patchno for this platform to 29
    Release check o.K.
    Fri Jun 10 19:25:58 2011
    my types changed after wp death/restart 0xbf --> 0xbe
    my types changed after wp death/restart 0xbe --> 0xbc
    my types changed after wp death/restart 0xbc --> 0xb8
    my types changed after wp death/restart 0xb8 --> 0xb0
    my types changed after wp death/restart 0xb0 --> 0xa0
    my types changed after wp death/restart 0xa0 --> 0x80
    *** DP_FATAL_ERROR => DpWPCheck: no more work processes
    *** DISPATCHER EMERGENCY SHUTDOWN ***
    increase tracelevel of WPs
    NiWait: sleep (10000ms) ...
    NiISelect: timeout 10000ms
    NiISelect: maximum fd=1565
    NiISelect: read-mask is NULL
    NiISelect: write-mask is NULL
    Fri Jun 10 19:26:08 2011
    NiISelect: TIMEOUT occured (10000ms)
    dump system status
    max_rq_id          11
    wake_evt_udp_now     0
    wake events           total     7,  udp     7 (100%),  shm     0 (  0%)
    since last update     total     7,  udp     7 (100%),  shm     0 (  0%)
    Workprocess Comm. Area Blocks               Fri Jun 10 13:56:08 2011
    =============================
    Slots: 20, Used: 1, Max: 0
    +------+--------------+----------+-------------+
    |   id | owner        |   pid    | eyecatcher  |
    +------+--------------+----------+-------------+
    |    0 | DISPATCHER   |       -1 | *WPCAAD000* |
    <SNIP>
    [DpProcDied] Process died  (PID:3492  HANDLE:1540)
    DpStartStopMsg: send stop message (myname is >egsap701_NSP_00                         <)
    DpStartStopMsg: Write AD_STARTSTOP message with type=  0, name=egsap701_NSP_00     , sapsysnr= 0, hostname=egsap701                                                       
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 4 (AD_STARTSTOP), ser 0, ex 0, errno 0
    DpConvertRequest: net size = 189 bytes
    <SNIP>
    AdGetSelfIdentRecord: >                                                                           <
    AdCvtRecToExt: opcode 60 (AD_SELFIDENT), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    AdCvtRecToExt: opcode 40 (AD_MSBUF), ser 0, ex 0, errno 0
    blks_in_queue/wp_ca_blk_no/wp_max_no = 1/20/8
    LOCK WP ca_blk 1
    make DISP owner of wp_ca_blk 1
    DpRqPutIntoQueue: put request into queue (reqtype 1, prio LOW, rq_id 14)
    MBUF component DOWN
    NiICloseHandle: shutdown and close hdl 2 / sock 1496
    NiBufIClose: clear extension for hdl 2
    MsIDetach: detach MS-system
    cleanup EM
    EsCleanup ....
    EmCleanup() -> 0
    Es2Cleanup: Cleanup ES2
    ***LOG Q05=> DpHalt, DPStop ( 3784) [dpxxdisp.c   10924]
    Good Bye .....
    dev_w0
    ========
    trc file: "dev_w0", trc level: 1, release: "701"
    *  ACTIVE TRACE LEVEL           1
    *  ACTIVE TRACE COMPONENTS      all, MJ

    B Fri Jun 10 19:25:18 2011
    B  create_con (con_name=R/3)
    B  Loading DB library 'C:\usr\sap\NSP\DVEBMGS00\exe\dbsdbslib.dll' ...
    B  Library 'C:\usr\sap\NSP\DVEBMGS00\exe\dbsdbslib.dll' loaded
    B  Version of 'C:\usr\sap\NSP\DVEBMGS00\exe\dbsdbslib.dll' is "700.08", patchlevel (0.24)
    B  New connection 0 created
    M sysno      00
    M sid        NSP
    M systemid   560 (PC with Windows NT)
    M relno      7010
    M patchlevel 0
    M patchno    29
    M intno      20020600
    M make:      multithreaded, Unicode, optimized
    M pid        2768
    M
    M  kernel runs with dp version 241000(ext=110000) (@(#) DPLIB-INT-VERSION-241000-UC)
    M  length of sys_adm_ext is 576 bytes
    M  ***LOG Q0Q=> tskh_init, WPStart (Workproc 0 2768) [dpxxdisp.c   1323]
    I  MtxInit: 30000 0 0
    M  DpSysAdmExtCreate: ABAP is active
    M  DpSysAdmExtCreate: VMC (JAVA VM in WP) is not active
    M  DpShMCreate: sizeof(wp_adm)          13632     (1704)
    M  DpShMCreate: sizeof(tm_adm)          4415616     (21968)
    M  DpShMCreate: sizeof(wp_ca_adm)          1664     (80)
    M  DpShMCreate: sizeof(appc_ca_adm)     1600     (80)
    M  DpCommTableSize: max/headSize/ftSize/tableSize=500/8/528056/528064
    M  DpShMCreate: sizeof(comm_adm)          528064     (1048)
    M  DpSlockTableSize: max/headSize/ftSize/fiSize/tableSize=0/0/0/0/0
    M  DpShMCreate: sizeof(slock_adm)          0     (96)
    M  DpFileTableSize: max/headSize/ftSize/tableSize=0/0/0/0
    M  DpShMCreate: sizeof(file_adm)          0     (72)
    M  DpShMCreate: sizeof(vmc_adm)          0     (1544)
    M  DpShMCreate: sizeof(wall_adm)          (38456/34360/64/184)
    M  DpShMCreate: sizeof(gw_adm)     48
    M  DpShMCreate: SHM_DP_ADM_KEY          (addr: 07050040, size: 5042120)
    M  DpShMCreate: allocated sys_adm at 07050040
    M  DpShMCreate: allocated wp_adm at 07052170
    M  DpShMCreate: allocated tm_adm_list at 070556B0
    M  DpShMCreate: allocated tm_adm at 070556E0
    M  DpShMCreate: allocated wp_ca_adm at 0748B760
    M  DpShMCreate: allocated appc_ca_adm at 0748BDE0
    M  DpShMCreate: allocated comm_adm at 0748C420
    M  DpShMCreate: system runs without slock table
    M  DpShMCreate: system runs without file table
    M  DpShMCreate: allocated vmc_adm_list at 0750D2E0
    M  DpShMCreate: allocated gw_adm at 0750D320
    M  DpShMCreate: system runs without vmc_adm
    M  DpShMCreate: allocated ca_info at 0750D350
    M  DpShMCreate: allocated wall_adm at 0750D358
    M  rdisp/queue_size_check_value :  -> off
    M  ThTaskStatus: rdisp/reset_online_during_debug 0
    Y  *** ERROR => ztta/cua_area is 180000. [sapinit.c    975]
    Y  *** ERROR => ztta/cua_area adjusted to 500000. [sapinit.c    979]
    X  EmInit: MmSetImplementation( 2 ).
    X  MM global diagnostic options set: 0
    X  <ES> client 0 initializing ....
    X  Using implementation view
    X  <EsNT> Using memory model view.
    M  <EsNT> Memory Reset disabled as NT default
    X  ES initialized.
    M  ThInit: running on host egsap701

    M Fri Jun 10 19:25:19 2011
    M  calling db_connect ...

    C  DBSDBSLIB : version 700.08, patch 0.024 (Make PL 0.29)
    C  MAXDB shared library (dbsdbslib) patchlevels (last 10)
    C    (0.024) Default value for max. input variables is 2000 (note 655018)
    C    (0.024) Profile parameter to define max. input variables (note 655018)
    C    (0.024) Switch SQLMODE after CREATE INDEX SERIAL (note 1267841)
    C    (0.024) Input parameters for SQL statements increased (note 655018)
    C    (0.018) Create index serial for MaxDB 7.6 (note 1267841)
    C    (0.018) More trace in case of packed to string conversion error (note 1262799)
    C    (0.016) R3trans export aborts with signal 6 (note 1262245)
    C    (0.009) IA64 alignment errors (note 1245982)
    C    (0.007) Support DB-Type 'SAP DB' by UPDSTAT (note 1225668)


    C  Loading SQLDBC client runtime ...
    C  SQLDBC SDK Version : SQLDBC.H  7.6.0    BUILD 002-121-083-965
    C  SQLDBC Library Version : libSQLDBC 7.6.5    BUILD 011-123-196-300
    C  SQLDBC client runtime is MaxDB 7.6.5.011 CL 196300
    C  SQLDBC supports new DECIMAL interface : 0
    C  SQLDBC supports VARIABLE INPUT data   : 1
    C  SQLDBC supports keepAlive indicator   : 0
    C  INFO : SQLOPT= -I 0 -t 0 -S SAPR3
    C  Try to connect (DEFAULT) on connection 0 ...
    C  Attach to SAP DB : Kernel    7.7.06   Build 007-123-197-046
    C  Database release is SAP DB 7.7.06.007
    C  INFO : Database 'NSP' instance is running on 'egsap701'
    C  DB max. input host variables  : 2000
    C  INFO : SAP DB Packet_Size = 131072
    C  INFO : SAP DB Min_Reply_Size = 4096
    C  INFO : SAP DB Comm_Size = 126976
    C  INFO : DBSL buffer size = 126976
    C  INFO : SAP DB MaxLocks = 300000
    C  INFO : Connect to DB as 'SAPNSP'
    C  *** ERROR => the connected user (SAPNSP) does not work with the right user/schema
    [dbslsdb.cpp  4818]
    C  *** ERROR => application has to work with schema SAPR3 (dbs/ada/schema)
    [dbslsdb.cpp  4820]
    M  ***LOG R19=> ThInit, db_connect ( DB-Connect 000256) [thxxhead.c   1449]
    M  in_ThErrHandle: 1
    M  *** ERROR => ThInit: db_connect (step 1, th_errno 13, action 3, level 1) [thxxhead.c   10563]

    M  Info for wp 0

    M    pid = 2768
    M    severity = 0
    M    status = 0
    M    stat = WP_RUN
    M    waiting_for = NO_WAITING
    M    reqtype = DP_RQ_DIAWP
    M    act_reqtype = NO_REQTYPE
    M    rq_info = 0
    M    tid = -1
    M    mode = 255
    M    len = -1
    M    rq_id = 65535
    M    rq_source =
    M    last_tid = 0
    M    last_mode = 0
    M    semaphore = 0
    M    act_cs_count = 0
    M    csTrack = 0
    M    csTrackRwExcl = 0
    M    csTrackRwShrd = 0
    M    mode_cleaned_counter = 0
    M    control_flag = 0
    M    int_checked_resource(RFC) = 0
    M    ext_checked_resource(RFC) = 0
    M    int_checked_resource(HTTP) = 0
    M    ext_checked_resource(HTTP) = 0
    M    report = >                                        <
    M    action = 0
    M    tab_name = >                              <
    M    attachedVm = no VM

    M  *****************************************************************************
    M  *
    M  *  LOCATION    SAP-Server egsap701_NSP_00 on host egsap701 (wp 0)
    M  *  ERROR       ThInit: db_connect
    M  *
    M  *  TIME        Fri Jun 10 19:25:19 2011
    M  *  RELEASE     701
    M  *  COMPONENT   Taskhandler
    M  *  VERSION     1
    M  *  RC          13
    M  *  MODULE      thxxhead.c
    M  *  LINE        10783
    M  *  COUNTER     1
    M  *
    M  *****************************************************************************

    M  PfStatDisconnect: disconnect statistics
    M  Entering TH_CALLHOOKS
    M  ThCallHooks: call hook >BtcCallLgCl< for event BEFORE_DUMP
    M  ThCallHooks: call hook >ThrSaveSPAFields< for event BEFORE_DUMP
    M  *** ERROR => ThrSaveSPAFields: no valid thr_wpadm [thxxrun1.c   723]
    M  *** ERROR => ThCallHooks: event handler ThrSaveSPAFields for event BEFORE_DUMP failed [thxxtool3.c  261]
    M  Entering ThSetStatError
    M  ThIErrHandle: do not call ThrCoreInfo (no_core_info=0, in_dynp_env=0)
    M  Entering ThReadDetachMode
    M  call ThrShutDown (1)...
    M  ***LOG Q02=> wp_halt, WPStop (Workproc 0 2768) [dpnttool.c   334]

    Hello Rattandeep and Markus,
    Thanks for explaining the error to me. I'm still facing the issue though!
    My start profile is START_DVEBMGS00_egsap701 and instance profile is NSP_DVEBMGS00_egsap701 (they are included below).
    In both profiles, the dbs/ada/schema has been currently deactivated. I get the same errors even after deactivating the parameter in both profiles. I also tried your suggestions by setting parameter values to SAPNSP and then to SAPR3 in both profiles but I'm still getting the same errors.
    > the above log shows that you have to change the parameter with schema user SAPR3 instead of SAPNSP
    You mean that the SAP system is started by SAPNSP user and since the profile is executed by SAPNSP user, we are getting the error? I don't know about the SAPR3 user or the user's credential. I only use bcuser/ddic RFC user to logon to SAP.
    I don't know how to check the table space for SAPR3 database. As far as I know, BRTools is only for Oracle backends. So, I used Max DB database manager tool instead and found that the default NSP database has utilized about 50% data area (disk space). Overwrite mode is on and I have about 100% free log area (also determined through database manager tool). Still have not clue as to how to solve this. Please help. Thanks for your tips so far!
    The start profile is as follows :
    #.*       Start profile START_DVEBMGS00_EGSAP701                                                                               *
    #.*       Version                 = 000004                                                                                *
    #.*       Generated by user = DDIC                                                                                *
    #.*       Generated on = 27.04.2011 , 11:02:57                                                                                *
    SAPSYSTEMNAME = NSP
    SAPGLOBALHOST = egsap701
    SAPSYSTEM = 00
    INSTANCE_NAME = DVEBMGS00
    DIR_CT_RUN = $(DIR_EXE_ROOT)\$(OS_UNICODE)\NTI386
    DIR_EXECUTABLE = $(DIR_INSTANCE)\exe
    DIR_PROFILE = $(DIR_INSTALL)\profile
    _PF = $(DIR_PROFILE)\NSP_DVEBMGS00_egsap701
    # Copy SAP Executables
    Start_Program_00 = immediate $(DIR_CT_RUN)\sapcpe$(FT_EXE) pf=$(_PF)
    # Start ABAP database
    _DB = $(DIR_CT_RUN)\strdbs.cmd
    Start_Program_01 = immediate $(_DB) NSP
    # Start SAP message server
    _MS = $(DIR_EXECUTABLE)\msg_server$(FT_EXE)
    Start_Program_02 = local $(_MS) pf=$(_PF)
    # Start application server
    _DW = $(DIR_EXECUTABLE)\disp+work$(FT_EXE)
    Start_Program_03 = local $(_DW) pf=$(_PF)
    rsdb/dbid = NSP
    #dbs/ada/schema = SAPNSP
    Instance profile is as follows:
    #.*       Instance profile NSP_DVEBMGS00_EGSAP701                                                                              *
    #.*       Version                 = 000006                                                                                *
    #.*       Generated by user = DDIC                                                                                *
    #.*       Generated on = 27.05.2011 , 11:30:39                                                                                *
    SAPSYSTEMNAME = NSP
    SAPGLOBALHOST = egsap701
    SAPSYSTEM = 00
    INSTANCE_NAME = DVEBMGS00
    DIR_CT_RUN = $(DIR_EXE_ROOT)\$(OS_UNICODE)\NTI386
    DIR_EXECUTABLE = $(DIR_INSTANCE)\exe
    rdisp/wp_no_dia = 3
    rdisp/wp_no_btc = 1
    icm/server_port_0 = PROT=HTTP,PORT=80$$
    # SAP Message Server parameters are set in the DEFAULT.PFL
    ms/server_port_0 = PROT=HTTP,PORT=81$$
    rdisp/wp_no_enq = 1
    rdisp/wp_no_vb = 1
    rdisp/wp_no_vb2 = 1
    rdisp/wp_no_spo = 1
    PHYS_MEMSIZE = 128
    em/initial_size_MB = 10240
    em/max_size_MB = 1024
    abap/buffersize = 100000
    #old_value: 0                                                                                changed: DDIC 27.04.2011 11:04:52
    #old_value: 60000000                                                                           changed: DDIC 27.05.2011 11:29:55
    alert/MONI_SEGM_SIZE = 0
    enque/table_size = 2000
    #parameter deactivated                      by: DDIC         27.05.2011 11:11:00
    #rspo/local_print/method = 2
    rsdb/ntab/entrycount = 5000
    rsdb/ntab/ftabsize = 3000
    rsdb/ntab/sntabsize = 100
    rsdb/ntab/irbdsize = 1000
    rsdb/cua/buffersize = 500
    rsdb/obj/buffersize = 2048
    rsdb/obj/max_objects = 500
    rsdb/otr/buffersize_kb = 1000
    rsts/ccc/cachesize = 6000000
    rtbb/buffer_length = 500
    rtbb/max_tables = 50
    sap/bufdir_entries = 200
    zcsa/presentation_buffer_area = 350000
    zcsa/calendar_area = 300000
    zcsa/table_buffer_area = 3000000
    zcsa/db_max_buftab = 500
    ztta/roll_area = 1000000
    ztta/diag_area = 128000
    ztta/dynpro_area = 150000
    ztta/cua_area = 180000
    rdisp/PG_SHM = 100
    rdisp/PG_MAXFS = 256
    rdisp/ROLL_SHM = 100
    rdisp/ROLL_MAXFS = 2048
    #old_value: 0                                                                                changed: DDIC 27.04.2011 11:04:52
    #old_value: 300                                                                                changed: DDIC 27.05.2011 11:29:38
    rdisp/autoabaptime = 0
    rdisp/wp_ca_blk_no = 20
    rdisp/appc_ca_blk_no = 20
    rdisp/max_wprun_time = 30000
    icm/min_threads = 5
    icm/max_threads = 10
    icm/max_conn = 20
    mpi/total_size_MB = 10
    rsdb/dbid = NSP
    #parameter deactivated                      by: DDIC         27.05.2011 11:11:22
    #dbs/ada/schema = SAPNSP

  • How many users/ schemas can we create in an oracle database?

    How many users can we create in an oracle database? Or how many users can oracle handle?
    Problem-
    I have to store information of ontologies (I will use countries instead) in db.
    I have to store information regarding countries.
    I have 13 tables in all to maintain for each country.
    Now there are two approaches:
    1) keep only 13 tables. Have an extra column in each table to indicate that a particular
    row stores information for which country.
    2) create a new user/ schema for each country. So we can get rid of the extra column
    needed in 1st approach.
    I have used the second approach. This is because number of entries in each table for a
    given country will be large.
    So initially when the s/w is installed I create a central-user. Each time data for new
    country has to be entered central-user creates a user/ schema, and creates tables for
    this user/ schema. The central user can access the tables of all the countries by
    country_name.table_name. By this approach I believe searching would be easy.
    If there is any flaw in my approach kindly mention it.
    Thank you

    There is no (practical at least) limit to the number of users & schemas you can have in Oracle.
    Your approach, however, is not going to scale nearly as well as the first option you outlined (adding a column). You are going to end up caching every possible variation of the various queries you're going to be executing because you will be referring to so many different tables, which is going to mean that you are doing a lot more work to parsing statements and generally churning through the shared pool. If you create enough users, you're liable to start hitting ORA-04030 errors because your shared pool is so fragmented.
    Additionally, you're likely going to end up with a whole lot of dynamically generated SQL to accommodate new schemas getting added over time which is going to cause you even more pain. Figuring out dynamically what table to join in is a heck of a lot more difficult for the programmer to write and for the database to handle than simply passing in a different country code.
    If you're concerned about having too much data, you can have your cake and eat it to by adding the country column and partitioning the tables based on country.
    Justin
    One other item I forgot to mention is maintainability. Having dozens or hundreds of "identical" schemas makes maintenance a huge pain because something like adding a new column now requires dozens or hundreds of separate DDL statements. You're almost guaranteed that some schema isn't going to be in sync-- it's going to miss a column or miss an index, etc.
    Message was edited by:
    Justin Cave

  • How to restrict the user(Schema) from deleting the data from a table

    Hi All,
    I have scenario here.
    I want to know how to restrict a user(Schema) from deleting the values from a table created in the same schema.
    Below is the example.
    I have created a table employee in abc schema which has two values.
    EMPLOYEE
    ABC
    XYZ
    In the above scenario the abc user can only fire select query on the EMPLOYEE table.
    SELECT * FROM EMPLOYEE;
    He should not be able to use any other DML commands on that table.
    If he uses then Insufficient privileges error should be thrown.
    Can anyone please help me out on this.

    Hi,
    kumar0828 wrote:
    Hi Frank,
    Thanks for the reply.
    Can you please elaborate on how to add policies for a table for just firing a select DML statement on table.See the SQL Packages and Types manual first. It has examples. You can also search the web for examples. This is sometimes called "Virtual Private Database" or VPD.
    If you have problems, post a specific question here. Include CREATE TABLE and INSERT statements to create a table as it exists before the policies go into effect, the PL/SQL code to create the policies, and additonal DML statements that will be affected by the policies. Show what the table should contain after each of those DML statements.
    Always say which version of Oracle you're using. Confirm that you have Enterprise Edition.
    See the forum FAQ {message:id=9360002}
    The basic idea behind row-level security is that it generates a string that is automatically added to SELECT and/or DML statement WHERE clauses. For example, if user ABC is only allowed to query a table on Sunday, then you might write a function that returns the string
    USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'So whenever any user says
    SELECT  *
    FROM    table_x
    ;what actually runs is:
    SELECT  *
    FROM    table_x
    WHERE   USER  != 'ABC'
    OR      TO_CHAR (SYSDATE, 'DY', 'NLS_DATE_LANGUAGE=ENGLISH') = 'SUN'
    ;If you want to prevent any user from deleting rows, then the policy function can return just this string
    0 = 1Then, if somone says
    DELETE  employee
    ;what actually gets run is
    DELETE  employee
    WHERE   0 = 1
    ;No error will be raised, but no rows will be deleted.
    Once again, it would be simpler, more efficient, more robust and easier to maintain if you just created the table in a different schema, and not give DELETE privileges.
    Edited by: Frank Kulash on Nov 2, 2012 10:26 AM
    I just saw the previous response, which makes some additional good points (e.g., a user can always TRUNCATE his own tables). ALso, if user ABC applies a security policy to the table, then user ABC can also remove the policy, so if you really want to prevent user ABC from deleting rows, no matter how hard the user tries, then you need to create the policies in a different schema. If you're creating things in a different schema, then you might as well create the table in a different schema.

  • How to copy all tables, triggers, etc from one user schema to another

    Hello everybody!
    I am searching for a QUERY or Stored Procedure to copy the tables of one user schema to another schema.
    Should look kind of: Copy (Select * from all_objects where owner = 'UserIwantToCopyFrom') to user = 'UserIwantToCopyTO'
    I am sure that my example is rubbish but I tried to explain what I want to do.
    So is there a chance to do that within sql-code? I have to build a template of a user schema with hundreds of tables, triggers, etc and copy it to several other user schemas.
    Thanks for your advice!
    Jan

    There are numerous examples available.
    What you typically will want to do is:
    For the export use the job_mode => 'SCHEMA' option
    Export example
    http://www.oracle-base.com/articles/10g/OracleDataPump10g.php
    DECLARE
      l_dp_handle       NUMBER;
      l_last_job_state  VARCHAR2(30) := 'UNDEFINED';
      l_job_state       VARCHAR2(30) := 'UNDEFINED';
      l_sts             KU$_STATUS;
    BEGIN
      l_dp_handle := DBMS_DATAPUMP.open(
        operation   => 'EXPORT',
        job_mode    => 'SCHEMA',
        remote_link => NULL,
        job_name    => 'EMP_EXPORT',
        version     => 'LATEST');
      DBMS_DATAPUMP.add_file(
        handle    => l_dp_handle,
        filename  => 'SCOTT.dmp',
        directory => 'TEST_DIR');
      DBMS_DATAPUMP.add_file(
        handle    => l_dp_handle,
        filename  => 'SCOTT.log',
        directory => 'TEST_DIR',
        filetype  => DBMS_DATAPUMP.KU$_FILE_TYPE_LOG_FILE);
      DBMS_DATAPUMP.metadata_filter(
        handle => l_dp_handle,
        name   => 'SCHEMA_EXPR',
        value  => '= ''SCOTT''');
      DBMS_DATAPUMP.start_job(l_dp_handle);
      DBMS_DATAPUMP.detach(l_dp_handle);
    END;
    /for the import you will have to use the remap_schema option with:
    DBMS_DATAPUMP.METADATA_REMAP (
       handle      IN NUMBER,
       name        IN VARCHAR2,
       old_value   IN VARCHAR2,
       value       IN VARCHAR2,
       object_type IN VARCHAR2 DEFAULT NULL);There are much more details in the document that Thierry provided.

  • Completion Insight not working correctly when using Enterprise User Security (EUS) logon

    This is a pre existing issue we've experienced with SQL Developer, though I've only just worked out what is causing the issue it is present in previous versions of the tool, up to the current 4.0.EA2.
    We experience issues with the Completion Insight functionality of SQL Developer.
    When we log into a database using Enterprise User Security i,e authenticating against OID, the schema of the database account is prefixed to any reference to public synonyms, ie all user_%, all_%, dba_% and v$% views.
    When I change the authentication of the database account back to normal database authentication the schema prefix correctly isn't shown. It simply suggests the synonym name of the views.
    An example of this is as follows when attempting to query the DBA_TABLES view:
    The database account is ORADBA and has DBA privs.
    The EUS user that is mapped to the ORADBA schema is dbutler.
    The ORADBA user is configured to authenticate externally (against OID).
    I login with my dbutler directory credentials:
    If I start typing:
    select * from dba_tabl
    The object name is suggested as ORADBA.dba_tables
    If I change the authentication of the ORADBA account back to database authentication, the prefix is no longer present.
    i.e If I start typing:
    select * from dba_tabl
    The object name is suggested as dba_tables

    If you're not using DB 10.2 this is the "expected" behavior for the DB. See also metalink note 351170.1 "Enterprise Users Can Connect to a Database when the OID Account is Disabled"
    regards,
    --Olaf                                                                                                                                                                                                                                                                                                                                                                                                                   

  • Impdp does not create user/schema

    I'm an Oracle noob. I'm trying to copy (expdp/impdp) schema (no data) from one machine to another. I do not want any remapping. I just want empty table structure created on targetHOST.
    Error I get is:
        ORA-39083: Object type PROCACT_SCHEMA failed to create with error:
        ORA-31625: Schema ZABBIX is needed to import this object, but is unaccessible
        ORA-01435: user does not exist
    My understanding is that if the user performing import has 'IMPORT FULL DATABASE' privilege, it'll create the users/schemas in the targetHOST. I granted it to 'scott' and tried with that too, same error.
    - DB version: SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 24 14:27:41 2013
    - If it matters the DB version on sourceHOST is 11.2.0.***3***
    - OS: Linux targetHOST 2.6.18-308.el5 #1 SMP Fri Jan 27 17:17:51 EST 2012 x86_64 x86_64 x86_64 GNU/Linux
    Import errors:
        (0)oracle@targetHOST$  sqlplus system/manager
        SQL*Plus: Release 11.2.0.1.0 Production on Thu Oct 24 14:27:41 2013
        Copyright (c) 1982, 2009, Oracle.  All rights reserved.
        SQL> select * from session_privs;
        PRIVILEGE
        IMPORT FULL DATABASE
        CREATE SESSION
        .......200 other privileges.......
        202 rows selected.
        SQL> ^D
        (0)oracle@targetHOST$
        (0)oracle@targetHOST$ impdp system/oracle123 directory=TEST_DIR dumpfile=ZABBIX.dmp logfile=impdpZabbix.log
        Import: Release 11.2.0.1.0 - Production on Thu Oct 24 14:14:51 2013
        Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
        Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production
        With the Partitioning, OLAP, Data Mining and Real Application Testing options
        Master table "SYSTEM"."SYS_IMPORT_FULL_01" successfully loaded/unloaded
        Starting "SYSTEM"."SYS_IMPORT_FULL_01":  system/******** directory=TEST_DIR dumpfile=ZABBIX.dmp logfile=impdpZabbix.log
        Processing object type SCHEMA_EXPORT/PRE_SCHEMA/PROCACT_SCHEMA
        ORA-39083: Object type PROCACT_SCHEMA failed to create with error:
        ORA-31625: Schema ZABBIX is needed to import this object, but is unaccessible
        ORA-01435: user does not exist
        Failing sql is:
        BEGIN
        sys.dbms_logrep_imp.instantiate_schema(schema_name=>SYS_CONTEXT('USERENV','CURRENT_SCHEMA'), export_db_name=>'XXX.YYY.COM', inst_scn=>'7788478540892');COMMIT; END;
        Processing object type SCHEMA_EXPORT/TABLE/TABLE
        ORA-39083: Object type TABLE:"ZABBIX"."TABLE1" failed to create with error:
        ORA-01918: user 'ZABBIX' does not exist
        Failing sql is:
        CREATE TABLE "ZABBIX"."TABLE1" ("COLUMN1" VARCHAR2(20 BYTE) NOT NULL ENABLE, "COLUMN2" VARCHAR2(20 BYTE), "COLUMN3" VARCHAR2(20 BYTE)) SEGMENT CREATION IMMEDIATE PCTFREE 10 PCTUSED 40 INITRANS 1 MAXTRANS 255 NOCOMPRESS LOGGING STORAGE(INITIAL 65536 NEXT 1048576 MINEXTENTS 1 MAXEXTENTS 2147483645 PCTINCREASE 0 FREELISTS 1 FREELIST GROUPS 1 BUFFER_POOL DEFAULT FLASH_CACHE DEFAU
        Processing object type SCHEMA_EXPORT/TABLE/INDEX/INDEX
        Processing object type SCHEMA_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
        Job "SYSTEM"."SYS_IMPORT_FULL_01" completed with 2 error(s) at 14:14:53
        (5)oracle@targetHOST$
    Export was done using following command (on a different machine)
    (0)oracle@sourceHOST$ expdp zabbix/zabbix schemas=ZABBIX content=METADATA_ONLY directory=TEST_DIR dumpfile=ZABBIX.dmp logfile=expdpZABBIX.log
    Complete export log available here.:

    I figured it out on my own. Required privilege is 'CREATE USER'. I don't have system's password so I granted CREATE USER to zabbix, made it DBA and it seems to be exporting more than it did last time:
    Processing object type SCHEMA_EXPORT/USER
    Processing object type SCHEMA_EXPORT/SYSTEM_GRANT
    Processing object type SCHEMA_EXPORT/ROLE_GRANT
    Processing object type SCHEMA_EXPORT/DEFAULT_ROLE
    Yet to import but looks good so far..
    Appreciate you taking the time..
    Thanks...

  • Urgnt help in import user schema

    Dear all,
    when i make import from user schema , i faced the problem of __arabic__ data corrupted ( ????????????)
    this warning is appeared in the log file of import
    can any one help me to solve this problem .
    import done in AR8MSWIN1256 character set and AL16UTF16 NCHAR character set
    import server uses AL32UTF8 character set (possible charset conversion)
    export client uses WE8MSWIN1252 character set (possible charset conversion)
    IMP-00008: unrecognized statement in the export file:
    -----------------------

    i made the configuration for the import server as export server
    the nls_lang=AMERICAN_AMERICA.WE8MSWIN1252
    and chachter set AL16UTF16
    the message different with some changes
    which is
    ( import done in WE8MSWIN1252 character set and AL16UTF16 NCHAR character set )
    and the data also corrupted for arabic fonts ...

  • Using xmlns in schemas that reference Oracle registered schema

    I have two schemas: a.xsd and b.xsd. b.xsd uses an xmlns to reference a.xsd. But when I call dbms_xmlschema.registerSchema, the a.xsd schema works ok, but the b.xsd schema fails with the following error:
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://xmlns/a"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    I've tried with and without an xsi:schemaLocation in b.xsd and both fail with the same error.
    Has anyone had any luck using this multiple schema reference functionality? I'm on the latest Oracle 9i (9.2.0.3.0) 64-bit on Solaris 2.8.
    Thanks,
    -Darren
    Here's the output of my sqlplus session:
    SQL*Plus: Release 8.1.6.0.0 - Production on Wed May 14 13:43:56 2003
    (c) Copyright 1999 Oracle Corporation. All rights reserved.
    Connected to:
    Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production
    SQL> set long 10000
    SQL> SELECT user FROM dual
    2 /
    USER
    XDB
    SQL> SELECT getDocument('xsd/a.xsd') FROM dual
    2 /
    GETDOCUMENT('XSD/A.XSD')
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://xmlns/a" xmlns="http://xmlns/a" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="a">
    <xs:simpleType>
    <xs:restriction base="xs:string">
         <xs:maxLength value="100"/>
    </xs:restriction>
    </xs:simpleType>
    </xs:element>
    </xs:schema>
    GETDOCUMENT('XSD/A.XSD')
    SQL> BEGIN
    2 dbms_xmlschema.registerSchema(
    3      schemaURL => 'http://xmlns/a',
    4      schemaDoc => getDocument('xsd/a.xsd'),
    5      local => false);
    6 END;
    7 /
    PL/SQL procedure successfully completed.
    SQL> COMMIT
    2 /
    Commit complete.
    SQL> SELECT owner, schema_url FROM all_xml_schemas WHERE schema_url = 'http://xmlns/a'
    2 /
    OWNER
    SCHEMA_URL
    XDB
    http://xmlns/a
    SQL> SELECT getDocument('xsd/b.xsd') FROM dual
    2 /
    GETDOCUMENT('XSD/B.XSD')
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema targetNamespace="http://xmlns/b" xmlns="http://xmlns/b" xmlns:a="http://xmlns/a" xmlns:xs="http://www.w3.org/2001/XMLSchema">
    <xs:element name="b">
    <xs:complexType>
    <xs:sequence>
         <xs:element name="c">
         <xs:simpleType>
         <xs:restriction base="xs:string">
         <xs:maxLength value="200"/>
         </xs:restriction>
         </xs:simpleType>
         </xs:element>
         <xs:element ref="a:a"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    SQL> BEGIN
    2 dbms_xmlschema.registerSchema(
    3      schemaURL => 'http://xmlns/b',
    4      schemaDoc => getDocument('xsd/b.xsd'),
    5      local => false);
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://xmlns/a"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    SQL> SELECT getDocument('xsd/b-with-location.xsd') FROM dual
    2 /
    GETDOCUMENT('XSD/B-WITH-LOCATION.XSD')
    <?xml version="1.0" encoding="UTF-8"?>
    <xs:schema
         targetNamespace="http://xmlns/b"
         xmlns="http://xmlns/b"
         xmlns:a="http://xmlns/a"
         xmlns:xs="http://www.w3.org/2001/XMLSchema"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://xmlns/a http://xmlns/a">
    <xs:element name="b">
    <xs:complexType>
    <xs:sequence>
         <xs:element name="c">
         <xs:simpleType>
         <xs:restriction base="xs:string">
         <xs:maxLength value="200"/>
         </xs:restriction>
         </xs:simpleType>
         </xs:element>
         <xs:element ref="a:a"/>
    </xs:sequence>
    </xs:complexType>
    </xs:element>
    </xs:schema>
    SQL> BEGIN
    2 dbms_xmlschema.registerSchema(
    3      schemaURL => 'http://xmlns/b',
    4      schemaDoc => getDocument('xsd/b-with-location.xsd'),
    5      local => false);
    6 END;
    7 /
    BEGIN
    ERROR at line 1:
    ORA-31154: invalid XML document
    ORA-19202: Error occurred in XML processing
    LSX-00023: unknown namespace URI "http://xmlns/a"
    ORA-06512: at "XDB.DBMS_XMLSCHEMA_INT", line 0
    ORA-06512: at "XDB.DBMS_XMLSCHEMA", line 26
    ORA-06512: at line 2
    SQL> COMMIT
    2 /
    Commit complete.
    SQL> SELECT owner, schema_url FROM all_xml_schemas
    2 WHERE schema_url = 'http://xmlns/a' OR schema_url = 'http://xmlns/b'
    3 /
    OWNER
    SCHEMA_URL
    XDB
    http://xmlns/a
    SQL> QUIT
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.3.0 - 64bit Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.3.0 - Production

    This is resolved.

  • Materialized view refresh using connected user db links

    I have a general question. I have a materialized view that more or less joins tables from 2 databases.
    For example I have a table X in database A, and a table Y in database B. I create the materialized view in the schema owning table X in database A. Tables A & B from both database are in the same schema with a synchronized password. My materialized view is created to join tables A & B using connected user DB links, and everything works when I create the view, however, it appears that the refresh is failing. I suspect this is because of the connected user link and there is no "logged" in user when the refresh occurs.
    Does anyone know if it is possible to create a materialized view between 2 tables in different databases to refresh using a connected user DB link?
    Thanks.

    sybrandb
    Why does it not make sense to have materialized views accross databases?
    If a materialized view is essentially a remote copy, then wouldn't that imply accross databases? The only thing I did was to take it a step further and join it with a local table in the owning database.
    About not being right about not having a connected user., that may be right, but I have a thought/question..... I equated this as using connected user links in jobs scheduled via dbms_job or dbms_scheduler, as when this runs there is no user connected to the database to provide remote credentials for the link... Essentially this seems to be like a cron job that fires on some schedule (whether a user is connected or not), it would seem to me that it might need to have credentials defined in order to be able to connect to the remote database.
    Thanks

Maybe you are looking for