Drop a user/schema
Under a user/schema (such as tester), I created tables, indexes, packages, stored procedures, functions, etc.
1)Now If I issue a statement for dropping the user/schema, in order to delete the user/schema from the system, will those said tables, indexes, packages, stored procedures, functions, etc, be all deleted from the database system, too?
2)My understanding that the user and the schema are actually the same thing. So to drop the user tester will also drop the schema tester, or vice versa. --Is this statement correct?
Thanks
scott,
It's an eternal question : difference between schema and user.
You create a user to connect in your db.
This user, if granted, can read objects from others users;
If this user, if granted, create any objects (tables, views, etc...), he create a schema. A schema is a set of object for which the user is the owner.
Also, if you drop a user, you drop all his objects... and so his schema. We don't say that you drop schema, but you drop user, it is a little nuance...
Nicolas.
Similar Messages
-
Hi All,
I am unable to drop database user and getting the folllowing error:
" must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables "
I find 3 table with AQ prefix in the schema but unable to drop these table even by using "sys" user.
Any idea how can I do that ?
Regards,Hi,
select object_name,object_type from dba_objects where owner='USERNAME' and object_name like '%AQ%';TO drop the queue table, login as the owner and
exec DBMS_AQADM.DROP_QUEUE_TABLE(queue_table=>'PASTE_THE_OBJECT_NAME_FROM_ABOVE',force =>TRUE);Anand -
Error when dropping a user/tablespace
Hi
I am trying to drop user/tablespaces, but I got the following error
SQL> drop user SM92 cascade;
drop user SM92 cascade
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-00942: table or view does not exist
Currently this user has not tables or view, the statement select * from all_tables where owner='SM92' return no row
ANyone knows why I can't drop this user? What should I check?
Thanks
LiHi, probably the user has dependency with other schemas, please review the Note:361576.1 into metalink site.
Good luck.
Regards. -
Search script generator for all objects and data (!) from a user/schema ?
Is there a way to create a script which (when run) creates all the existing
TABLES; INDEXES, KEYS and DATA for a specified user/schema ?
This (PL-)SQL script should contain all INSERTS for the currently existing rows of
all the TABLEs.
When I use e.g. export to Dumpfile I have at first find all TABLEs and components
which I want to dump. This is rather uncomfortable.
I just want to specify the user name similar to
createscript user=karl@XE outfile=D:\mydata\myscript.sql
Is this somehow possible ?So that I understand your requirements exactly, are you asking for your script to ...
1/ export from database A the entire schema of a specified user
2/ drop all objects owned by that user in database B
3/ import the objects from database A into database B
If so, it sounds to me that a shell script that does a schema level export as Nicholas suggested, and then drops the user from database B using the cascade keyword (e.g. drop user username cascade), recreates the user and then imports the export file into B should do the trick.
I don't think searching for individual tables and creating the statements to recreate them is the best idea.
Hope that helps
Graham -
How to drop my goldengate user? When I drop the user ogg ,occured ORA 14452
HI
When I drop the user ogg ,occured ORA 14452 ,and i can not kill the session belongs to the user!
SQL> drop user ogg cascade;
drop user ogg cascade
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-14452: attempt to create, alter or drop an index on temporary table already in use
SQL> select sid,serial#,username from v$session where username='OGG';
SID SERIAL# USERNAME
227 13581 OGG
1082 6 OGG
SQL> alter system kill session '1082,6';
System altered.
SQL> select sid,serial#,username from v$session where username='OGG';
SID SERIAL# USERNAME
227 13581 OGG
1082 6 OGGif you want to drop goldengate user then u need to run ddl_remove and marker_remove script then u can remove your user
1. Navigate to directory (D:\Goldenagte\)where we unzip the Oracle GoldenGate.
2. Write below command to connect with oracle database as sysdba.
D:\GoldenGate> sqlplus username/password@connection_string as sysdba
[Note: provide the user name and password according to system credentials.]
SQL> @ddl_disable
Trigger altered.
SQL> @ddl_remove
DDL replication removal script.
WARNING: this script removes all DDL replication objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:gguser
Working, please wait ...
Spooling to file ddl_remove_spool.txt
Script complete.
SQL> @marker_remove
Marker removal script.
WARNING: this script removes all marker objects and data.
You will be prompted for the name of a schema for the Oracle GoldenGate database objects.
NOTE: The schema must be created prior to running this script.
Enter Oracle GoldenGate schema name:gguser
PL/SQL procedure successfully completed.
Sequence dropped.
Table dropped.
Script complete.
SQL> drop user gguser cascade
Regards
Sanchit Gupta -
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 -
Hi,
I have a accidentally create a user schema test1; (with the semicolon) using impdp ... remap-schema=orig:test1;
Is there anyway i can drop of this user?
I have tried the following, but no use.
set escape \
drop test1\; cascade;
Thanks in advance.Get the exact user name from DBA_USERS and do
DROP USER "<<exact case-sensitive user name from DBA_USERS>>" CASCADE;Justin
Distributed Database Consulting, Inc.
http://www.ddbcinc.com/askDDBC -
Error occurred when try to drop an Oracle schema
Hello,
I try to drop an oracle schema but an error was generated:
SQL> drop user birjac cascade;
drop user birjac cascade
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables
I try to find the queue table, but no table was found:
SQL> select QUEUE_TABLE from dba_queue_tables where owner='BIRJAC';
no rows selected
There is other method to find this table?
The version of database is:
SQL> select banner from v$version;
BANNER
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
PL/SQL Release 8.1.7.0.0 - Production
CORE 8.1.7.0.0 Production
TNS for Linux: Version 8.1.7.0.0 - Development
NLSRTL Version 3.4.1.0.0 - Productionuser8747078 wrote:
Hello,
I try to drop an oracle schema but an error was generated:
SQL> drop user birjac cascade;
drop user birjac cascade
ERROR at line 1:
ORA-00604: error occurred at recursive SQL level 1
ORA-24005: must use DBMS_AQADM.DROP_QUEUE_TABLE to drop queue tables
I try to find the queue table, but no table was found:
SQL> select QUEUE_TABLE from dba_queue_tables where owner='BIRJAC';
no rows selected
There is other method to find this table?
The version of database is:
SQL> select banner from v$version;
BANNER
Oracle8i Enterprise Edition Release 8.1.7.0.1 - Production
PL/SQL Release 8.1.7.0.0 - Production
CORE 8.1.7.0.0 Production
TNS for Linux: Version 8.1.7.0.0 - Development
NLSRTL Version 3.4.1.0.0 - Productionhttp://tinyurl.com/ndh7ml -
How to import a user schema to its original state
Hi,
I had a task to export user schema 'USER01' with all the objects of the user, export was successful when I executed this statement.
$expdp USER1/PASS1@PD01 DIRECTORY=user1exp DUMPFILE=USR01.dmp SCHEMAS=USER1 LOGFILE=USR01.LOG
After which I dropped USER01 and tablespace USER01.
how can I import usr01.dmp so that I can have all objects of user as it was before export and dropping the user.
$impdp USER1/PASS1@PD01 DIRECTORY=user1exp DUMPFILE=USR01.dmp FULL=y LOGFILE=impfullusr01.log
will this statemnet work to import.
Thanks,
VenHi,
Just two notes I'd like to share:
1 - If the user that is running the export job is prived, then the export dump file will contain the statement to recreate the schema, if it is not prived, then this statement will be missing.
2 - you ran a schema mode export which never includes the create tablespace statement.
So, you said that you dropped the schema and the tablespace. Minimally, you will have to create the tablespace where the objects existed. You may also have to create the schema if the export dump file does not contain that information. So, based on now the export was done, you will have a slightly different import command:
1. if export was from a prived account, you don't have to create the schema. If you want the data pump do create the schema, you need to run the impdp from another schema that is prived. This import job will create the original schema and all of the objects in the dumpfile.
2. If export was from a non-prived account, you will have to create the schema and then you can run the import from either the schema you just created, or from a prived schema.
Hope this helps.
Please let me know if you have other questions or if this was not clear.
Dean -
Hi,
I want to kill all the sessions connected to the database. And I want to put it on a script so I can run it at night and drop the user and import the schema .
Thanksanother option is not to drop the user.
if the user you will import has same name and password, you may drop just all objects of the user: tables, views, procs....
you can generate the 'drop objects ' script with sql
select 'drop '||object_type||' MYUSER."'||object_name||';' from dba_objects where owner='MYUSER'
and object_type not in ('PACKAGE BODY','INDEX');
{code}
something like that... -
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
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
M Fri Jun 10 19:25:19 2011
M calling db_connect ...
C
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
C
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
M Info for wp 0
M
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 *
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
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 youThere 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. -
hello,
i try to create view from 2 users schema , but i get :
SQL Command: CREATE OR REPLACE FORCE
Failed: Warning: הביצוע הושלם עם אזהרה
if i run the select statement without the first line ( create or replace... ) i see the data i ask for...
how i define the first line to create the view from two users schema ?
here is my query :
CREATE OR REPLACE FORCE VIEW "DBPROJECT"."CI_BE_LIST" ("BE_ID", "BE_NAME", "BE_TYPE_ID", "BE_TYPE_NAME", "FE_ID", "FE_NAME", "FE_TYPE_ID", "FE_TYPE_NAME", "MCPT_ADDRESS", "MCPT_ADDRESS_TEXT", "PLC_ADDRESS", "PLC_ADDRESS_TEXT", "OPC_ITEM", "BE_GROUP_ID") AS
SELECT B.BE_ID AS BE_ID,
NB.TEXT AS BE_NAME,
B.BE_TYPE_ID AS BE_TYPE_ID,
BT.NAME AS BE_TYPE_NAME,
F.FE_ID AS FE_ID,
NF.TEXT AS FE_NAME,
F.FE_TYPE_ID AS FE_TYPE_ID,
FT.FE_TYPE_NAME AS FE_TYPE_NAME,
NVL( (SELECT BC.CHARACTERISTIC_TYPE_ID
FROM BE_CHARS BC
WHERE BC.BE_ID = B.BE_ID AND
BC.CHARACTERISTIC_TYPE_ID = 113) , 0 ) MCPT_ADDRESS,
(SELECT S.TEXT
FROM BE_CHARS BC
LEFT JOIN STRINGS S ON S.STRING_ID = BC.CHARACTERISTIC_VALUE
WHERE BC.BE_ID = B.BE_ID AND
BC.CHARACTERISTIC_TYPE_ID = 113) MCPT_ADDRESS_TEXT,
NVL( (SELECT BC.CHARACTERISTIC_TYPE_ID
FROM BE_CHARS BC
WHERE BC.BE_ID = B.BE_ID AND
BC.CHARACTERISTIC_TYPE_ID = 93) , 0 ) PLC_ADDRESS,
(SELECT S.TEXT
FROM BE_CHARS BC
LEFT JOIN STRINGS S ON S.STRING_ID = BC.CHARACTERISTIC_VALUE
WHERE BC.BE_ID = B.BE_ID AND
BC.CHARACTERISTIC_TYPE_ID = 93) PLC_ADDRESS_TEXT,
(SELECT S.TEXT
FROM BE_CHARS BC
LEFT JOIN STRINGS S ON S.STRING_ID = BC.CHARACTERISTIC_VALUE
WHERE BC.BE_ID = B.BE_ID AND
BC.CHARACTERISTIC_TYPE_ID = 105) OPC_ITEM,
BT.GROUP_ID AS BE_GROUP_ID
FROM BE B
INNER JOIN FE F ON F.FE_ID = B.FE_ID
INNER JOIN "DBCONSTANTS".BE_TYPES BT ON BT.ID = B.BE_TYPE_ID
INNER JOIN "DBCONSTANTS".FE_TYPES FT ON FT.FE_TYPE_ID = F.FE_TYPE_ID
LEFT JOIN NAMES NB ON NB.NAME_ID = B.BE_NAME_ID
LEFT JOIN NAMES NF ON NF.NAME_ID = F.FE_DISPLAY_NAME_ID
ORDER BY BE_ID;
thank u,
adi damtyHi, Adi,
Welcome to the forum!
As you may have noticed, this site compresses whitespace. Whenever you post formatted text on this site, type these 6 characters:
\(all small letters, inside curly brackets) before and after each section of formatted text.
To create a view involving tables from other schemas, you need to have SELECT privileges on those tables granted directly to you; privileges granted through roles aren't good enough to create a view, even though they are good enough for you to run the exact same query.
Make sure the view owner (or PUBLIC), and not merely some role given to the view owner, has privileges on all the tables. -
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!
JanThere 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.
Maybe you are looking for
-
When I turned on my ipad the itunes logo is on it. I cant get to my home screen. I plugged it to my computer and went to the itunes and it states that the ipad is in recovery mode and that I have to do a restore. I have some important photos on it th
-
How do I make Adobe program files accessible to virus scan?
Following Jeff's advice, I am reposting my original question in this forum with the screen shots. (I have posted too many questions and have gotten several useful answers. However my main question has gotten only one answer, notably that I should not
-
How to associate tips with controls?
Hi All, Is there any way to associate tips with control? When my application is running,when the user drags over his mouse on the control,is there any way to s[ecify the purpose of the control. ie,if i have a button called "plot",whenever the user dr
-
i downloaded this program from disk that was part 1 of 5 programs that came with my purchase of the"Wacom Bamboo Create Pen & Touch i tried to update the Photoshop in the last 3 days but recieve message "Patch cannot be applied,contact product suppo
-
Is my Oracle install 32 bit or 64 bit
Quick question (to which i've forgotten the answer) On my Solaris server i have multiple Oracle installations. How can i tell which are 32 bit and which are 64 bit. I seem to remember a simple unix command put can't put me finger on it at the moment.