ALTER USER on read-only database link db
Oracle 11.2.0.3.6
Solaris 10
I have a primary database and one Active Data Guard standby database physical. My read-only database users must be able to change their password for read-only standby. I tried to create a stored procedure with an ALTER USER inside statement and then to have my user call the stored procedure of the unalterable standby by: MIMI EXEC. CHGPWD@PRIM ();
This translates into:
ERROR on line 1:
ORA-16000: database opened for read-only access
ORA-06512: at "MIMI. CHGPWD', line 27
ORA-06512: at line 1
How can I allow a user who cannot access the read-only database to change their password for read-only standby?
Here my stored procedure:
CREATE OR REPLACE PROCEDURE MIMI. CHGPWD IS
-CREATE OR REPLACE PROCEDURE CHGPWD IS
sql_stmt VARCHAR2 (200);
BEGIN
sql_stmt: = 'ALTER USER MIMITEST IDENTIFIED BY 111111';
EXECUTE IMMEDIATE sql_stmt;
END CHGPWD;
/
Ah, I got it! I had to create a public synonym for my stored procedure, and then create another stored procedure and use the synonym. This is explained in the documentation of Oracle packages and PL/SQL procedures coding under the section 'referring to remote objects. Here is what I have from the beginning to the end (My SID is MIMI and the unique name on the primary is MIMI_A):
Read-only mode ensures:
ALTER SYSTEM SET GLOBAL_NAMES IS FALSE SCOPE = BOTH;.
Elementary school:
ALTER SYSTEM SET GLOBAL_NAMES IS FALSE SCOPE = BOTH;.
CREATE THE PUBLIC DATABASE LINK MIMI_A.WORLD WITH THE HELP OF "MIMI_A";
ALTER SYSTEM SET GLOBAL_NAMES IS TRUE SCOPE = BOTH;. (I need to have this true on my primary game)
CREATE OR REPLACE PROCEDURE MIMI. CHGPWD IS
Working directory;
BEGIN
dbms_job. Submit (job,' BEGIN EXECUTE IMMEDIATE "ALTER USER MIMITEST IDENTIFIED BY 666666";) END ;') ;
END;
/
CREATE CHGPASS SYNONYM PUBLIC FOR MIMI. CHGPWD@MIMI_A.WORLD;
CREATE OR REPLACE PROCEDURE MIMI. LOCAL_PROCEDURE IS
BEGIN
CHGPASS;
END;
/
GRANT EXECUTE MIMI. CHGPWD TO MIMITEST;
GRANT EXECUTE MIMI. LOCAL_PROCEDURE TO MIMITEST;
Read-only mode ensures:
Mimi/oracle/1120308 > sqlplus mimitest
SQL * more: Production of the 11.2.0.3.0 version Fri Sep 19 15:55:56 2014
Copyright (c) 1982, 2011, Oracle. All rights reserved.
Enter the password:
Connected to:
Oracle Database 11 g Enterprise Edition Release 11.2.0.3.0 - 64 bit Production
With partitioning, OLAP, Data Mining and Real Application Testing options
SQL > exec MIMI. LOCAL_PROCEDURE;
PL/SQL procedure successfully completed.
Tags: Database
Similar Questions
-
create the user with READ only grant
Hello
10 g R2 on AIX.
How to create users with READ only grant on all tables (or all tables in a schema with 70000 tables)?
Thank you.Please refer to: http://www.ulfet.info/index.php?view=oracle.docs_grant.with.loop
-
Possible to make an element editable for some users and read-only for others
Is it possible to make an element editable for some users and read only for others?
I was able to achieve by catches of the select statement that I used to define an authorization scheme, placing in the State of read-only element. However, I would simply refer to the authorization scheme to use caching and to help keep things cleaner for future maintenance.
Is it possible for a system of authorisation under a condition similar to the way point another element can be referenced by preceding with two reference points (e.g.: P1_First_Name)?I accomplished this in one of my applications by setting the value of a hidden Page 0 item on connect, for example P0_ACCESS_PRIVILIGES, and then use the feature 'Read only' integrated into the APEX for each article that I don't read for some users check the value of this element.
-
Dear all,
I have a database of unique user.now if someone wants to access my database and I want him to pick up my database in read only format only.
How can I do this?
Thanks in advance.
Ashish SharmaIt means i have to create new user for him. but the problem is this my database update records frequently. so i will have to update other user as well. or is there any other technique
LON
There is only one object and user who have access to update/insert/delete would keep doing it and the user who do not have these access but select access would be able to select and would be able to see the data what another user update/insertion/deletion.Concerning
Anurag Tibrewal -
change a user password through a database link
Hello
I need to change a user password in plsql for a remote database.
I have a db link Setup, but cannot see how to run the command Alter user so it willl run in the remote database.
I was hoping to do USER@dblink1 ALTER user IDENTIFIED BY newpasssword, but Oracle doesn't like the @dblink in the alter command.
Does anyone know a way around this?
Thank youYou can try something like
declare job binary_integer; begin dbms_job.submit@dblink1(job,'begin execute immediate ''alter user xy identified by ..... ''; end;'); end;
-
Hello and thank you in advance for your help!
I have the full version of Acrobat 9 Standard, but I also have the trial version of Acrobat X Pro, in the hope that she would do what I need it to do.
In my business, I have a 30 page document in PDF with form in all fields. I send this form to my clients, and they fill it in, sign it and send it back. I wish they were able to save the document so that they do not have to fill out the 30 pages together in one sitting, they can work on the forms for a bit, then reopen later. So far, many of my clients have complained that they are unable to save the document at all.
In addition, even if I'm here, I would also mention that I would like for these customers to put digital signatures on these documents rather than having to print, sign and scan or fax for me to hide. I have white signature on the PDF in question, but I want to be sure that my customers end users having ONLY the reader can this sign digitally.
Help? Suggestions? Thanks in advance!
-BTM
You must enable Extended Reader rights in Acrobat X Pro (file - save
ACE - Reader Extended PDF - enable additional rights...) before sending the
files of the users.
-
need to create a user with read-only access only two tables
I am trying to create a user who has access to only two tables in a table space. Please tell me what privileges required and I need to go read on this two tables
Best regards
AtiqGRANT SELECT ON SCHEMA.TABLENAME TO USERNAME;
-
Grant read only to a user only with the role
Legends of dear,
Req: create user selection/read-only join specific 3-5 tables in a specific schema and no selection/read only access to the sys/system schema.
After surfing and tried to grant the "read-only" access for a user as follows.
create user readonly identified by readonly123;
create read_only_role role identified by read_only_access;
Grant connect, read-only resources.
Grant select on applications. FND_PRODUCT_GROUPS read-only;
Grant select on applications. FND_USER read-only;
grant read_only_role read-only;
The above statements
1. created user, role
2. granted to connect/create user session and I am able to run the following query
logged in as readonly
Select * from APPS. FND_PRODUCT_GROUPS;
Where I am able to select even sys or system tables.
But I'm not able to make the same read only access provided to a role and assign the role to the user subsequently,.
create user readonly identified by readonly123;
create the role of read_only_role identified by read_only_access;
Grant connect to read_only_role;
Grant select on applications. FND_PRODUCT_GROUPS to read_only_role;
Grant select on applications. FND_USER to read_only_role;
grant read_only_role read-only;
Let me know your suggestions,
Ref:roles and privileges of user management
https://forums.Oracle.com/thread/2223362
Thank you
Knockaert
Hi, Karthik,
If a role has a password (as in this case), then the user must activate this role during its current session in order to to use, like this:
ROLE of the read_only_role IDENTIFIED BY read_only_access VALUE.
If the role does not have a password, then it is enabled by default as soon as the user opens a session.
Remember, the roles do not count inside procedures AUTHID DEFINE stored (which is the default type). If you need to use the table inside an AUTHID DEFINER stored procedure, then the privileges must be granted directly to the user and not just a role.
I hope that answers your question.
If this isn't the case, after a complete test script that people can run to recreate the problem and test their ideas. You started great: CREATE instructions you posted were perfect, but you need to add the CONNECTIONS and SELECT statements (and the SETTINGS, if necessary) to show how the error occurs.
-
Restict read only users in some columns
Hi guys,.
I want to restrict read-only users to read only some of the columns on the table. How can I go on the limitation?Always include the following information when you ask a question:
- Full version of APEX
- Complete operating system DB, version, edition, host
- Architecture of Web server (EPG, SST or APEX listener/host operating system)
- Browser (s) and version (s) used
- Theme
- Model (s)
- Region/item (s)
935462 wrote:
Hi guys,.I want to restrict read-only users to read only some of the columns on the table. How can I go on the limitation?
Who are the users of readonly? How are they determined?
What exactly are you talking about?
Is this a report, if so which report interactive or classic?
In one of them, you can make a conditional display of column with the same login
Look at this for options http://docs.oracle.com/cd/E23903_01/doc/doc.41/e21674/bldapp_rpt_att.htm#BCEBDIFA
-
Hello
I have USR_TEST user in my database:
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
OPEN USR_TEST
and this user is to have these privileges:
HOLDER OF PRIVILEGE
------------------------------ ----------------------------------------
USR_TEST UNLIMITED TABLESPACE
USR_TEST CREATE SESSION
CREATE TABLE USR_TEST
I have another user in my database named TEST :
USERNAME ACCOUNT_STATUS
------------------------------ --------------------------------
OPEN TEST
now, I want to TEST user to read only user USR_TEST privileges, means TEST user must have read access only to items of the user USR_TEST . Please let me know how I can do this. And please correct me if I am wrong somewhere.
Kind regards
MIchel.
sqlplus usr_test
coil capture.sql
Select "grant select on USR_TEST." | table_name | "at the TRIAL;" FROM USER_TABLES;
SPOOL OFF
now take capture.sql to the new DB & do as below
sqlplus system @capture.sql
-
Authentication of database through the database link
Is it posible to use database authentication in the APEX by link of database and how?
Also is it posible to reading user roles through the database link?
Database links to establish the connection, so you lose the context regarding which is recorded in a single user.
Custom authentication can do some PL/SQL you need, but I would say that replicate your tables locally through something as materialized views.
You could also potentially be used dba_role_privs, but do not forget roles can be turned on/off.
-
Reading only question backup Tablespace
HII!
I tried to read-only Table backup space. So, first change the tablespace to aid
SQL > alter tablespace users read-only;
Tablespace altered.
2. then taken backup of all the data files by using the copy of the OS command.
Now, the issue I'm facing is that can I change the read_write mode table space? If Yes, then how? Help, please...I tried to read-only Table backup space. So, first change the tablespace to aid
SQL > alter tablespace users read-only;
Tablespace altered.2. then taken backup of all the data files by using the copy of the OS command.
Now, the issue I'm facing is that can I change the read_write mode table space? If Yes, then how? Help, please...
Yes you can do it,
SQL > alter tablespace users read write;
After the successful restoration.
sys@11GDEMO > select tablespace_name, status of dba_tablespaces where nom_tablespace = "CKPT"
STATUS TABLESPACE_NAME
------------------------------ ---------
CKPT ONLINEsys@11GDEMO > alter tablespace ckpt read-only;
Tablespace altered.
sys@11GDEMO > select tablespace_name, status of dba_tablespaces where nom_tablespace = "CKPT"
STATUS TABLESPACE_NAME
------------------------------ ---------
CKPT READ ONLY+.sys@11GDEMO > alter tablespace ckpt read write; +
Tablespace altered.
sys@11GDEMO > select tablespace_name, status of dba_tablespaces where nom_tablespace = "CKPT"
STATUS TABLESPACE_NAME
------------------------------ ---------
CKPT online+.sys@11GDEMO >
Published by: CKPT July 6, 2011 11:22 -
Address book 'Read only' blackBerry Smartphones?
Hello
really hoping that someone can help, because I'm afraid I'm losing the plot. Unfortunately I'm not the most tech savvy person. I got an iPhone, and then when that broke got a Curve 8520 as a working phone. One of the moments where I plugged into my laptop, copied all my contacts old iPhone, which was awesome.
But last week I dropped my phone in the toilet, and long story short, I have a new (same model). When I tried to restore my settings where I backed up my curve v1, my address book copy as it is "read only". It is light grey writing.
I have no idea what to do - I tried for days copy contacts on, but nothing helped. I can't say it it work because, in truth, they'll laugh right in my face.
Help, please! I just want my contacts back!
Thank you
Kate
OK, unplugged the USB, look on your BlackBerry at the request of your Messages > Options > Email Reconcialation and turn off (Devil) Wireless reconcile.
Now, try again.
See more details here:
KB04461 Cannot restore read only databases when you use the advanced backup and restore of the BlackBerry Desktop Manager
-
Hi all
I have much dblinks on my database, how can I determine what private dblinks and what audience?
views dba_db_links and all_db_links is have any information about this.
A quick Google search gave the following link,.
http://docs.Oracle.com/CD/B28359_01/server.111/b28310/ds_admin005.htm#ADMIN12173
He, citing
OWNER
All except USER_*
The user who created the database link. If the link is public, the user is listed as PUBLIC
.HTH
Aman...
-
SOA Suite read only the console in 11g
Hi all
Is it possible to create a user with read only role on EM 11g? We want to create a user to monitor the production environment to have options to deploy/undeploy.
Thank you.By assigning a role to a user, you can restrict its access-
http://download.Oracle.com/docs/CD/E17904_01/integration.1111/e10226/appx_roles_privs.htm#BABIHDFJ
http://download.Oracle.com/docs/CD/E17904_01/Web.1111/e13747/secroles.htm#i1206135
Kind regards
AnujPublished by: Anuj Dwivedi on February 22, 2011 21:12
Maybe you are looking for
-
What is the hole behind the Apple brand on the iMac 21 "?
What is the hole behind the Apple brand on the iMac 21 "?
-
Hi, I'm trying to put a song as my ringtone but I can't find the option "show in finder". Instead, it's show "show in windows Explorer..." Help, please... I use the latest version of itunes on windows 12.3 8...
-
Cannot print. How to enable the print spooler?
Original title - the printer printing How can I activate my print spooler? I restarted my computer and you cannot print. It says that my printer is working properly
-
Hi all! We have a set of student books 34, model ProBook s 4710 (SKU VC322EA #AK8). Now that the warranty for these computers are expired, is it possible to get a manual of maintenance, preferably in pdf format, so that we can exchange for spare part
-
RC WARNING errors in event pc Viewer perform my pc (advanced tools)
In the tool tip for the performance; Event Viewer shows over a thousand critical error of warning; is it serious?