Tablespace after altering user
I altered a user that had originally been setup with SYSTEM as the default tablespace. I pointed it to the USERS tablespace. Do the objects originally created when using the SYSTEM tablespace move to the new tablespace or do they still reside in SYSTEM?
I can list the tablespaces that are the defaults for temporary and permanent. I can also list all objects for a user using user_objects but is there a way to list what tablespace they reside in? This would actually answer my original question.
Sorry if this seems like a simple task but I've been searching for this answer for almost 2 days now and am a beginner with oracle.
spysmily1 wrote:
I altered a user that had originally been setup with SYSTEM as the default tablespace. I pointed it to the USERS tablespace. Do the objects originally created when using the SYSTEM tablespace move to the new tablespace or do they still reside in SYSTEM?The existing objects will reside in SYSTEM. Only new objects created will have segments allocated in new tablespace.
>
I can list the tablespaces that are the defaults for temporary and permanent. I can also list all objects for a user using user_objects but is there a way to list what tablespace they reside in? This would actually answer my original question.Query user_segments/all_segments to find out segment-tablespace mapping.
Similar Messages
-
Database Crash after "alter user"
Hi,
I've a problem with oracle 8i databases on windows 2000 server, clustered (active-passive).
When I try to change sys password as sysdba the instance crashes without error messages in alterlog and without dump files.
ie:
sqlplus /nolog
SQL>conn sys/pwd@db as sysdba
SQL>alter user sys identified by pwd2;
this command works and the password file is updated, but the database cluster resource changed its status to "failed"
Is there a relationship with password file and microsoft cluster service or oralce fail safe?
this don't happens neither in standalone server nor clustered 10g databasesI think yes.
Check MOS FailSafe Database Goes Offline After Changing SYS Password - 167496.1
HTH
-Anantha -
To alter user TESTER's tablespace on 11g
BEFORE ALTER:
select username, tablespace_name from dba_ts_quotas where username = 'TESTER';
<u>USERNAME TABLESPACE_NAME</u>
TESTER test_ts
TESTER lob_ts
ALTER:
ALTER USER TESTER default tablespace USERS quota unlimited on USERS
AFTER ALTER:
select username, tablespace_name from dba_ts_quotas where username = 'TESTER';
<u>USERNAME TABLESPACE_NAME</u>
TESTER test_ts
TESTER lob_ts
TESTER USERS
QUESTIONS:
1) Why after the TESTER's tablespace is alterted, the old tablespace still showed up, i.e., test_ts and lob_ts?
2) How can I drop the TESTER from the test_ts and lob_ts?
3) After the TESTER is moved to the new tablespace, will the previously granted privileges still be effective? (such as resource, connect, and others)
Thanks(1) & (2): A user can create objects in any tablespace he has quotas on, not just the default tablespace.
If you want to prevent the users from creating anything in tablespaces which they already have existing quotas defined, you have to remove it by setting the quota to 0.
Existing objects already created by the user will stay where they are though, so if your need is otherwise you will have to move the objects over to the new default tablespace manually.
alter user tester quota 0 on test_ts;
alter user tester quota 0 on lob_ts;(3): As you have not instructed Oracle to revoke any privileges, all other settings are unchanged. -
Alter user default tablespace and temporary tablespace
Hi guru,
target : to ensure that users don't have the SYSTEM tablespace as their TEMPORARY or DEFAULT tablespace
scenario :
user default tablespace temporary tablespace
xxyym system system
Question: How to alter user ?
tqIn a scenario, let's say you want to make USERS the default tablespace for existing users and TEMP the default temporary tablespace, you can also create the alter statements as below into one script based on the output and run it.
select 'ALTER USER '||username||' DEFAULT TABLESPACE USERS;' FROM DBA_USERS WHERE DEFAULT_TABLESPACE IN('SYSTEM')
and username not in('SYS','SYSTEM');
select 'ALTER USER '||username||' TEMPORARY TABLESPACE TEMP;' FROM DBA_USERS WHERE TEMPORARY_TABLESPACE IN('SYSTEM');As magnus mentioned, don't forget to do this(if USERS and TEMP is what you want to go with) :
ALTER DATABASE DEFAULT TABLESPACE USERS;
ALTER DATABASE DEFAULT TEMPORARY TABLESPACE TEMP; -
Oracle Security - Controlling the 'alter user' privilege
Hi,
1. DB 10.1.0.5 and 10.2.0.3
2. "Admin User" needs to be able to change some users passwords in database.
3. Create user adminuser - grant alter user to adminuser.
4. DBAs will grant "approle" role to list of required users. DBAs will maintain control of who gets this role.
4. Create system trigger on alter database - will prevent "adminuser" from changing passwords for accounts not authorized - Script does not fire for DBAs and anyone changing their own password.
The trigger works as intended - the "adminuser" account can only change the specific set of users.
Question: We've discovered that the "adminuser" can also use the "alter user" privilege to change default tablespace and tablespace quota. User should only be able to change password.
Anyone have ideas on adding to the trigger to make sure the "adminuser" is only altering the password?
I am playing with the ora_is_alter_column system event, thinking that maybe the password column in user$ would be changed but so far I can't get this to work: Here is my trigger --
CREATE OR REPLACE TRIGGER SYS.PASSWORD_CONTROL AFTER ALTER ON DATABASE
DECLARE
DBACHK varchar2(50);
USRCHK varchar2(50);
BEGIN
BEGIN
-- Ensure users can change their own passwords --
IF
ora_login_user = ora_dict_obj_name
THEN
RETURN;
ELSE
-- Do not apply trigger to DBA group --
select grantee into DBACHK from dba_role_privs where granted_role='DBA'
and grantee = ora_login_user;
IF
DBACHK = ora_login_user
THEN
RETURN;
END IF;
END IF;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
NULL;
END;
BEGIN
select grantee into USRCHK from dba_role_privs where
granted_role='DISCUSR' and grantee = ora_dict_obj_name;
IF
ora_dict_obj_type = 'USER'
and ora_dict_obj_name = USRCHK
---- Need to check that only the password is being change -- the line below does not work
and ora_is_alter_column('PASSWORD') = TRUE
THEN
RETURN;
ELSE
RAISE_APPLICATION_ERROR(-20003,
'You are not allowed to alter user.');
END IF;
EXCEPTION
WHEN NO_DATA_FOUND
THEN
RAISE_APPLICATION_ERROR(-20003,
'You are not allowed to alter user.');
END;
END;user602453 wrote:
Ed, thank you for your reply. But, let me explain in more detail.
More detail is always helpful. ;-)
>
A specific user has been assigned as the application administrator. This admininstrator is responsible for reseting application user passwords. The DBA (me) recognizes the DB security issues so I am trying to craft a solution that will allow the application administrator the ability to change only the password of the application users.
I see that this may be out your hands, but I'd still question the wisdom of having an apps administrator being the one to change user passwords. Especially if that were a model where the users couldn't change their own passwords. I might accept it if the app admin were acting more of a helper to a clueless user.
Since the only way to change user passwords is to grant the 'alter user' privilege I need a system trigger to keep the user from changing non-application user passwords. Also, because I support nearly 100 production databases that support about 35 different applications I need a solution that can apply to multiple databases. I've been assured that there will only be one administrator charged with resetting passwords.
So,
Given those requirements, I have this trigger that will allow the the specific administrator to change the password of a specific set of user while not impacting DBAs or people wanting to change their own password. The way I've implemented this is to create a "dummy" role and assigning the role to the application user. The trigger will allow the administrator to change the password only if the user has the role assigned. The role has no privileges, it is just a way to "mark" the user as an application user. The administrator cannot grant this "dummy" role, only the DBA can.
Hope that clears things up.I still see another problem in that it still comes back to the dba to create the apps user in the first place, and to assign that dummy role to the user. Also, I'd hope that this proposed apps admin user is a role assigned to a real user. If not, as I mentioned before, you have no real accountability to who is using that account. Simply saying "it shall not be shared", even if written in corporate policy, won't secure it, and you won't be able to trace it. Well, you could turn on auditing and capture the OS userid in the audit log. -
AFTER ALTER ON DATABASE gives the old password value in Oracle
I am writing a trigger to fetch the 'password' value when 'sys.users$' table gets updated.
CREATE OR REPLACE
TRIGGER Sys_User_Nm_Trg AFTER ALTER ON DATABASE
WHEN (ora_dict_obj_type = 'USER')
DECLARE
CURSOR get_pw IS
SELECT password
FROM sys.user$
WHERE name = ora_dict_obj_name;
user_pw_ VARCHAR2(100);
BEGIN
IF (ora_dict_obj_name != 'SYS' AND ora_dict_obj_name != 'SYSTEM') THEN
IF (ora_des_encrypted_password IS NOT NULL) THEN
OPEN get_pw;
FETCH get_pw INTO user_pw_;
CLOSE get_pw;
END IF;
END IF;
END;
But this cursor gives the old 'password' not the changed 'password' value. But if I run
SELECT password
FROM sys.user$
WHERE name = ora_dict_obj_name;
in a separate transaction it gives the correct changed value. Is there something that I should change in the trigger to fetch the updated value for the password?
Thanks in advance!
Edited by: 986412 on Feb 7, 2013 12:11 AM
Edited by: 986412 on Feb 7, 2013 3:17 AMWhat is the purpose of the trigger ?
-
Can't reclaim space in tablespace after deleting records
Oracle 11gR1 RHEL5 64bit
Hi.
I am having trouble reclaiming space from a tablespace after having deleted all (thousands) of the records from a table (which resides in that tablespace). I have tried the following options to no avail:
- Alter table <table_name> shrink
- purge tablespace
- purge recyclebin
This table has several LOB columns and is using securefiles. I don't know if that has something to do with it or not. The tablespace is locally Managed and Segment space management is set to AUTO. Below is the create table command:
CREATE TABLE IIQ.DICOM_OBJECT
DICOM_OBJECT_RID NUMBER CONSTRAINT NN_DICOM_OBJECT_DICOM_OBJ_RID NOT NULL,
SUBMISSION_RID NUMBER,
SUBMISSION_ITEM_RID NUMBER,
DICOM ORDSYS.ORDDICOM,
IMAGETHUMB ORDSYS.ORDIMAGE,
ANONDICOM ORDSYS.ORDDICOM,
ACTIVE_FLAG VARCHAR2(1 CHAR) DEFAULT 'Y' CONSTRAINT NN_DICOM_OBJECT_ACTIVE_FLAG NOT NULL,
CREATED_TIMESTAMP TIMESTAMP(6) WITH LOCAL TIME ZONE DEFAULT SYSTIMESTAMP CONSTRAINT NN_DICOM_OBJECT_TIMESTAMP NOT NULL,
SOURCE_DESCRIPTION VARCHAR2(100 CHAR) CONSTRAINT NN_DICOM_OBJECT_SOURCE NOT NULL,
OP_CONFORMANCE_FLAG VARCHAR2(1 CHAR)
COLUMN IMAGETHUMB NOT SUBSTITUTABLE AT ALL LEVELS
TABLESPACE IIQDCMDAT01
PCTUSED 0
PCTFREE 10
INITRANS 1
MAXTRANS 255
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOGGING
NOCOMPRESS
LOB ("DICOM"."EXTENSION") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB (SYS_NC00050$) STORE AS
( TABLESPACE IIQDCMDAT01
ENABLE STORAGE IN ROW
CHUNK 16384
PCTVERSION 10
NOCACHE
INDEX (
TABLESPACE IIQDCMDAT01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 80K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("DICOM"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("ANONDICOM"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
XMLTYPE SYS_NC00017$ STORE AS CLOB
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
CACHE READS
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("IMAGETHUMB"."SOURCE"."LOCALDATA") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
LOB ("ANONDICOM"."EXTENSION") STORE AS SECUREFILE
( TABLESPACE IIQDCMLOB01
DISABLE STORAGE IN ROW
CHUNK 16384
RETENTION
NOCACHE
INDEX (
TABLESPACE IIQDCMLOB01
STORAGE (
INITIAL 80K
NEXT 1
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
STORAGE (
INITIAL 208K
NEXT 1M
MINEXTENTS 1
MAXEXTENTS UNLIMITED
PCTINCREASE 0
BUFFER_POOL DEFAULT
NOCACHE
NOPARALLEL
MONITORING
ENABLE ROW MOVEMENT;
Thank you all.Justin Cave wrote:
OK, so you did a SHRINK SPACE CASCADE? Not just a SHRINK SPACE?That is correct.
What makes you believe that there is more space that can be reclaimed? Well, what I don't understand is that when a table (and only that table) was assigned to a specific tablespace whose data was completely removed is showing as if the data is still there...at least when you look at the tablespace. If all the rows of a table are removed, then shouldn't the tablespace size go down? There was 95 GB of data in that tablespace and all from that one table, which was completely emptied. However, it still shows the tablespace as being 95GB full.
Can you post the size of the table segment and the LOB segments as well as the size of the actual data in the table and the LOBs?Can you tell me which views you would like to the see the data from ? dba_lobs, dba_segments, etc... I want to make sure i have the right query for you.
Here is some info...not sure if this is what you want (formatiing is off):
select owner, segment_name, segment_type, tablespace_name, bytes
from dba_segments
where owner = 'IIQ'
and tablespace_name = 'IIQDCMLOB01'
and segment_type = 'LOBSEGMENT';
OWNER SEGMENT_NAME SEGMENT_TYPE TABLESPACE_NAME BYTES
IIQ SYS_LOB0000651630C00012$$ LOBSEGMENT IIQDCMLOB01 9.8416E+10
IIQ SYS_LOB0000651630C00018$$ LOBSEGMENT IIQDCMLOB01 755236864
IIQ SYS_LOB0000651630C00021$$ LOBSEGMENT IIQDCMLOB01 755236864
IIQ SYS_LOB0000651630C00023$$ LOBSEGMENT IIQDCMLOB01 262144
IIQ SYS_LOB0000651630C00044$$ LOBSEGMENT IIQDCMLOB01 262144
IIQ SYS_LOB0000651630C00053$$ LOBSEGMENT IIQDCMLOB01 262144
OWNER TABLE_NAME
COLUMN_NAME
----------------------------------- SEGMENT_NAME TABLESPACE_NAME INDEX_NAME CHUNK PCTVERSION RETENTION FREEPOOLS CACHE LOGGING ENCR COMPRE DEDUPLICATION IN_ FORMAT PAR SEC
IIQ DICOM_OBJECT
"DICOM"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00012$$ IIQDCMLOB01 SYS_IL0000651630C00012$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
SYS_NC00018$
SYS_LOB0000651630C00018$$ IIQDCMLOB01 SYS_IL0000651630C00018$$ 16384 10800 CACHEREADS YES NO NO NO NO ENDIAN NEUTRAL NO YES
IIQ DICOM_OBJECT
"DICOM"."EXTENSION"
SYS_LOB0000651630C00021$$ IIQDCMLOB01 SYS_IL0000651630C00021$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"IMAGETHUMB"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00023$$ IIQDCMLOB01 SYS_IL0000651630C00023$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"ANONDICOM"."SOURCE"."LOCALDATA"
SYS_LOB0000651630C00044$$ IIQDCMLOB01 SYS_IL0000651630C00044$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
IIQ DICOM_OBJECT
"ANONDICOM"."EXTENSION"
SYS_LOB0000651630C00053$$ IIQDCMLOB01 SYS_IL0000651630C00053$$ 16384 10800 NO YES NO NO NO NO NOT APPLICABLE NO YES
Thanks. -
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 ??
Thankshi,
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 -
ALTER USER를 실행한 사용자를 확인하는 방법(SYSTEM EVENT TRIGGER)
제품 : ORACLE SERVER
작성날짜 : 2002-11-07
ALTER USER를 실행한 사용자를 확인하는 방법(SYSTEM EVENT TRIGGER)
================================================================
PURPOSE
자신이나 또는 다른 user들의 password를 바꾸는 등의 alter user command를
사용한 사용자를 확인하는 방법을 알아보자.
Explanation & Example
1. 사용자 정보를 저장할 event table을 생성한다.
Create event table and users to store the alterations made:
SQL> connect / as sysdba;
create table event_table
ora_sysevent varchar2(20),
ora_login_user varchar2(30),
ora_instance_num number,
ora_database_name varchar2(50),
ora_dict_obj_name varchar2(30),
ora_dict_obj_type varchar2(20),
ora_dict_obj_owner varchar2(30),
timestamp date
create user test1 identified by test1;
grant create session, alter user to test1;
create user test2 identified by test2;
grant create session to test2;
2. SYS user에서 AFTER ALTER Client Event Trigger 를 생성한다.
Note: This step creates a trigger and it is fired whenever the user "test1"
issues ALTER command (It can be ALTER USER or ALTER TABLE)
SQL> CREATE or REPLACE TRIGGER after_alter AFTER ALTER on database
BEGIN
IF (ora_dict_obj_type='USER') THEN
insert into event_table
values (ora_sysevent,
ora_login_user,
ora_instance_num,
ora_database_name,
ora_dict_obj_name,
ora_dict_obj_type,
ora_dict_obj_owner,
sysdate);
END IF;
END;
3. test1 user로 접속한 후 test2 user의 password를 변경하는 작업을 실행한다.
SQL> connect test1/test1
SQL> alter user test2 identified by foo;
4. test2 user의 password가 test1 user에 의해 변경되면 그런 내용을
event_table 에서 확인할 수 있다.
Now that we have altered the "test2" user password from user "test1", the
event_table should have captured this details.
Now Login in as sys and Query on event_table:
SQL> connect / as sysdba;
SQL> select * from event_table;
ORA_SYSEVENT ORA_LOGIN_USER ORA_INSTANCE_NUM
ORA_DATABASE_NAME
ORA_DICT_OBJ_NAME ORA_DICT_OBJ_TYPE
ORA_DICT_OBJ_OWNER TIMESTAMP
ALTER TEST1 1
T901.IDC.ORACLE.COM
TEST2 USER
13-JUN-02
event_table의 내용을 조회하여 LOGIN_USER와 ALTERED USER 는
ORA_LOGIN_USER와 ORA_DICT_OBJ_NAME column을 통해 확인할 수 있다.
비슷한 방법으로 아래의 event에서 trigger를 생성하여 확인할 수 있다.
1) BEFORE DROP
2) AFTER DROP
3) BEFORE ANALYZE
4) AFTER ANALYZE
5) BEFORE DDL
6) AFTER DDL
7) BEFORE TRUNCATE
8) AFTER TRUNCATE
Related Documents
Oracle Application Developer's Guide -
Hi All,
Does Alter User MAXL work for an external user?
We use Alter User to add users to groups. This works fine for native users, say
Alter user user1 add to group1 ;
From the above statement it is not sure if user1 is a native or an external user. I think the default is native.
Is there any special way to specify that the user is an external user?
Appreciate your thoughts.
Thanks,
-Ethan.Hi Cameron,
Thank you for the link.
I think LCM works only when both the source & destination are in Shared services mode.
In my case, source is not in Shared services.
All I want to know is, Is there any utility to assign "Server access" to external LDAP users?
Here is the problem.
I need to assign filter access to many users & groups.
I can create native groups & assign filters using MAXLS
I can Alter external LDAP users to assign them to groups using MAXL, ONLY after I give them server access & refersh security, because users will not be recognized in MAXL if they don't have server access privelege.
The complete process cannot be executed in one flow.
I have to manually assign server access to each user or manually include each user to a group & then assign server access to the group.
I am wondering if there is any thing in MAXL or any other utility to assign server access to the users.
This would be very helpful.
Thanks,
-Ethan. -
Changing default tablespace of SYSTEM user
Hi all,
What impact it wouuld have on database if i change the default tablespace of SYSTEM user?? actually i have got a strange env where th default tablespace for system user is tools and that for OUTLN is system
please share your view and experiences
Thanks and Regards
VDhi thanks,
i know there is no performance issue using non system tablespace for system user, but we do follow some nomenclature structure thats why i am asking the question..so i am going to change its tablespace of user system from TOOLS to system with
SQL> alter user system default tablespace system;
command, and not expecting any complications..
Thanks and Regards
VD -
Trying to create trigger for some action to take place after a user logs on
Hello,
I want to create a trigger to fire after a user logs on. How to write this trigger.
I am getting an error with syntax below. Thank you.
create or replace trigger after_logon_xxtestuser
after logon
on xxtestuser.xxtestuser
begin
alter session set nls_territory = France;
end;
/I figured it out...
create or replace trigger after_logon_xxtestuser
after logon
on xxtestuser.schema
begin
execute immediate 'alter session set nls_territory = France';
end;
/ -
Revert tablespace acess from user
Hi Can any one give a solution, i have reverted the acess of a user to a tablespace using following command
"**alter user abi quota 0k on tools**;" but still the user abi is able to create a table and insert values on that tablespace . i have given the following commands
create table yyyy tablespace tools as select * from xxx;
insert into yyyy values('app');
i have to revert the acess of user abi to tablespace tools.If the account needs to "access" (by this I expect you to mean "create objects in") multiple tablespaces, grant quotas on each of the tablespaces (or QUOTA UNLIMITED) as you revoke RESOURCE.
As for the ability to create tables etc : Instead of RESOURCE, you should be granting the individual privileges
CREATE TABLE
CREATE CLUSTER
CREATE SEQUENCE
etc
which you can identify by querying
SELECT PRIVILEGE FROM DBA_SYS_PRIVS WHERE GRANTEE='RESOURCE';
so that you can revoke the RESOURCE Role. -
Refreshing Entity Objects after Altering the table
Hi,
My Entity Object is based on a table... and View Objects on the Entity Objects. Now if I alter the table (just changing the width of the column), that change is not visible on the Entity Object. Is there any way I can automatically refresh the Entity Objects after altering the table(only column width is changed).
(Changes made to Entity Objects manually are reflected in the View Object correctly.)
Regards
Faiyaz'changing the width of the column' means changing the size of the column in the table description in the database. For e.g.. In the original table I had a column OIL_KEY NUMBER(6). Now I change the column to be of size 12 i.e. OIL_KEY NUMBER(12). This does not get refreshed in the Entity Object.
-
Using alter user to change oracle password for logged in web user on XE
Hi All
I'm building an app using the pl/sql web toolkit on XE (installed on Win XP Pro SP2). (I'm not using the APEX front-end).
I'm using basic authentication and oracle database user accounts, and when a user registers for the first time I create them an oracle user account with dynamic sql, followed by some initial setup stuff, and they then log in with it.
All fine so far.
However I want to allow the user to change their oracle password as part of maintaining their user details. I've done this in the past using the web toolkit and Oracle 9i and it has worked fine using dynamic sql.
Unfortunately I can't get the same thing to work in XE.
For example, if I create the following procedure in the schema aligned to the DAD which holds my application and then run it from a browser (IE or Firefox) then the
Browser and the db just hangs - not even an error message:
CREATE OR REPLACE PROCEDURE ut
AS
v_stmt varchar2(300);
BEGIN
HTP.htmlOpen;
HTP.headOpen;
HTP.title ('User Test');
HTP.headClose;
HTP.bodyOpen;
v_stmt := 'alter user "'||user||'" identified by "BERT"';
htp.print(v_stmt);
EXECUTE IMMEDIATE v_stmt;
htp.print('Done');
HTP.bodyClose;
HTP.htmlClose;
END;
If I run the same statement in SQL*plus it's fine, and if I run the same proc for a different user then it's fine too.
I'm sure it's something to do with trying to change the credentials of the currently logged in user, but I would at least have expected an error message.
I'd be grateful for any ideas.
Thanks
SteveHi g.myers
Thanks for your response.
Sorry, yes, bad turn of phrase there. It's not the entire db that hangs. The web browser (either IE or FF) hangs, and if I look at v$session at this point, I can see that the user STATUS=ACTIVE and the STATE=WAITING.
I should also point out that I am using standard Oracle users as users of the application, (e.g. create a new user account called TESTER1). These users are then granted the appropriate privileges on the owning schema in order to run the app, access the tables etc.
Therefore it is the user account (e.g. TESTER1) that is running the password change procedure that is owned by the SYS schema. (However again, this is the exact code and method that I've used in the past and it has worked fine).
If I leave the browser hanging long enough, it will eventually return with the following error:
Proxy Error
The proxy server received an invalid response from an upstream server.
The proxy server could not handle the request POST /h/hopapp.pwdmaint_do.
Reason: Error reading from remote server
cheers
Steve
Maybe you are looking for
-
Can we use If condition in so10?
Hi Experts, I want to have different text descriptions for different release code in PR workflow can I dynamically change the task description keepin the task as same . can we put if condition in task description ? Thanks & Regards Dharmesh Sharma
-
How to design a Java-basedNetworkLayoutTool for specifying networktopology?
hi, i had given a project which is a webbased project where the user can design their whole network topolgy. the technolgy is ultimately java only because it is web based. technologies are java,swing,xml. The GUI or front end should be designed in su
-
I remember accidently pressing the import all photos button instead of the 10 photos that i wanted, so i clicked delete. Another thing i always just pull camera card from computer slot & then get a error when it do it saying i shouldnt do it that way
-
Hi, I've been learning java at Uni using the Elements Package. I've started learning JSP on my own and was wondering if i can use the package with JSP. For example if i wanted to use this code import element.*; import java.awt.Color; public class tes
-
Hi all, My requirement is create a one ZRFC, inside RFC call BAPI sales order creation. How to call BAPI in side RFC. please give step by step. Thanks,