Remote procedures created on private Database links
How to grant access to the role on the private synonym created in a schema of the remote procedure with private database links.We converted the public database links to the private sector. Please suggest me how to access the remote procedure and
Grant access to the role.
Thank you very much in advance.
Its Urgent
Its Urgent
Why is it urgent for me to post the solution to your problem?
acquired through ROLE privileges are NOT applicable within the named PL/SQL procedures.
GRANT is the only way to gain privileges or ROLE
Tags: Database
Similar Questions
-
I read that it is possible to create a private database link and set up a public synonym to the private database link. But when I try it doesn't work. Is there another way to do this?
My goal is to have the private database link and private synonyms exist in a single schema and have only certain users have access to. Is there another way to solve this problem without setting a private database synonyms and additional link in several patterns?
Thank you
VioletViolet says:
I understand that this error occurs because the database connection is private. This suggests that this scenario is not possible after all?Views + grants:
SQL> connect scott@orcl Enter password: ***** Connected. SQL> create database link sol10_private connect to scott identified by tiger using 'sol10'; Database link created. SQL> create public synonym sol10_private for v$database@sol10_private; Synonym created. SQL> create user u1 identified by u1; User created. SQL> grant create session to u1; Grant succeeded. SQL> select name from v$database; NAME --------- ORCL SQL> select name from v$database@sol10_private; NAME --------- SOL10 SQL> select name from sol10_private; NAME --------- SOL10 SQL> connect u1@orcl Enter password: ** Connected. SQL> select name from sol10_private; select name from sol10_private * ERROR at line 1: ORA-02019: connection description for remote database not found SQL> connect scott@orcl Enter password: ***** Connected. SQL> drop public synonym sol10_private; Synonym dropped. SQL> create or replace 2 view sol10_private_vw 3 as 4 select * 5 from v$database@sol10_private; View created. SQL> grant select on sol10_private_vw to u1 2 / Grant succeeded. SQL> create public synonym sol10_private for sol10_private_vw; Synonym created. SQL> select name from sol10_private; NAME --------- SOL10 SQL> connect u1@orcl Enter password: ** Connected. SQL> select name from sol10_private; NAME --------- SOL10 SQL>
SY.
-
A question about the CREATE DATABASE LINK PUBLIC and ORA-12154 error
Hi all
I have a problem on the public database link creation and I would be grateful if you could kindly give me a helping hand. I have the following connection settings in my
tnsnames.ora file:
Having the above mentioned parameters, I can connect to this remote database directly in a SQL * more shell:... DGPAPROD.WORLD = (DESCRIPTION = (ADDRESS_LIST = (ADDRESS = (COMMUNITY=tcp.world) (PROTOCOL=TCP)(HOST=ORASR001)(PORT=1521) ) ) (CONNECT_DATA = (SID = DGPAPROD)) ) ...
It works pretty well and the connection is established without any problem.$ sqlplus username/[email protected]
Now, what I want to do is to create a public database of this remote database link to avoid the user/connection of switch for the visualization of the
the content of this database. I proceeded in line with the syntax indicated in the Oracle online documentation:
http://download.Oracle.com/docs/CD/B28359_01/server.111/b28286/statements_5005.htm#SQLRF01205
This is why I run the following to create a public database link
Apparently there is no error and the link is created successfully. However, it cannot resolve the remote host and every time I run this queryCREATE PUBLIC DATABASE LINK SR001_dblink CONNECT TO user IDENTIFIED BY password USING 'DGPAPROD.WORLD';
(myenterprise is the name of a table in the remote database)
What causes this problem?SELECT * FROM myenterprise@SR001_dblink ERROR at line 1: ORA-12154: TNS:could not resolve the connect identifier specified
Thanks in advance,
Kind regards
DariyooshYou must have defined DGPAPROD. WORLD in tnsnames.oar on the server where DB is runnig.
-
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.
-
Public connected user database link creation
Hello, DBA
I tried to create the user database link connected audience.
I have two databases (orcl, orcltest)
Orcltest database, I created dblink
SQL > grant create public database to u1 link;
Grant succeeded.
SQL > conn u1
Enter the password:
Connected.
SQL > create sequoia link of public database using "orcl".
Database link created.
In orcl, I tried to access
SQL > select * from u1.tab1@redwood;
Select * from u1.tab1@redwood
*
ERROR on line 1:
ORA-02019: description of the connection to the remote database not found
QUESTION: what is the error?
Note: tns, earphone works very well. No problems.
Prod: 1 0.2.0.4.0
OS: rhel 5.1
Thanks in adnvance...Hello
Orcltest database, I created dblink
SQL > grant create public database to u1 link;
Grant succeeded.SQL > conn u1
Enter the password:
Connected.SQL > create sequoia link of public database using "orcl".
Database link created.Here, you create a DBLINK on the ORCLTEST to the ORCL database, sort of source database is ORCLTEST and target is ORCL.
In orcl, I tried to access
SQL > select * from u1.tab1@redwood;
Select * from u1.tab1@redwood
*
ERROR on line 1:
ORA-02019: description of the connection to the remote database not foundIt will not work because you created the dblink on the source database, which is ORCLTEST.
DBLINKS give you a way to access resources (tables, indexes, packages, etc.) in a remote database.
What you do is:
1. create a dblink on ORCLTEST. This dblink will provide access to ORCL via the ORCLTEST.
2 instead of this, you you connect directly to ORCL. That won't work, your DBLINK is not here, you can create another one here pointing to the ORCLTEST.
DBLINKS act as a bridge, a connection between two databases. They are only available in the source database to create a link to a database remotely (target).
-
Using the database link in the applications
Hello
I just configured and created a PUBLIC database link on my oracle 10g. Can I use it with success of sqlplus do some like select simple:
"SQL > select * from table"@dblink ".
The query returns the result as expected.
Now, I would like to use this public link in my applications, but the problem is that the link seems to be only available in the SYS schema.
Ho can I access to a schema?
In other words, to do some select (and insert) of my applications APEX by using the link to the db. If I try to select said, all I get is
ORA-02019: description of the connection to the remote database not foundOK, thanks all for the help, I found the problem.
It seems that I created the link of database public and not public.I gave both of them and re - create public database link and now it works.
Thanks for the help.
-
try to reduce the database links
Hello. Thank you for helping.
I think my basic question is this:
I can connect and create database links that can be used by all other users (and tablespaces?) on the server?
I have a bad understanding of how the areas of storage, dblinks and users go together, so I'll briefly describe my setup process so you can see how I have things that can be part of the cause of my confusion, possibly in a subtle way.
For this example, I have 2 servers with Oracle 11 g Enterprise.
After you create a database, I then create tablespaces, users and links like this:
On server 1:
create storage my_app1
create the user my_app1
create storage my_app2
create the user my_app2
and so on for all areas of storage and users on the server.
Then log in as my_app1 and create a link of database on server2:
link_to_s2 fixed my_app3 user
Then log in as my_app2 and create a link of database on server2:
link_to_s2 fixed my_app3 user
Same process on server2:
create storage my_app3
create the user my_app3
create storage my_app4
create the user my_app4
and so on to server2.
Then log in as my_app3 and create a database link to server1:
link_to_s1 fixed my_app1 user
Then log in as my_app4 and create a database link to server1:
link_to_s1 fixed my_app1 user
It operates well for me, except that I have to create four dblinks.
Is everything I see how this can be simplified to create dblinks less?
Any suggestions are greatly appreciated.Hello..
Why not create a public database link.
Documents: -.
Specify the PUBLIC to create a public database link available to all users. If you omit this clause, the database link is private and is only available to you.
[http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_5005.htm#sthref6315]Anand
-
Public database link does not work
Hello
I want to create a link from public database between 2 server in a different physical location, but in an intranet. Once I created the public database link... I keep having this error
ORA-12154: TNS: could not resolve service name
12154 00000 - "TNS: could not resolve the connect identifier specified.
*(Server 1-German-11gR2) *.
TNS:
Server1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.45)(PORT = 15210))
)
(CONNECT_DATA =
(SID = server1)
(SERVER = DEDICATED)
)
)
* Server (2-Malaysia-9iR2). *
AMT:
Server2 =
(DESCRIPTION =
(FAILOVER = ON)
(LOAD_BALANCE = OFF)
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.35)(PORT = 1521))
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.81)(PORT = 1521))
)
(SDU = 32777)
(CONNECT_DATA =
(SERVICE_NAME = PROD_server2)
)
)
I just want to create a database link course where Server 2 can enter the data on server 1, so I create my link database to Server 2. However, I always saw the problem. The TNSi under here are sample test, but it is working very well in here when connect you using the sql and sql navigator developer. (I think that nothing wrong with the tns) but is somehow the error message given TNS: could not resolve service name. So I don't really know what has gone wrong... PLEASE HELP ~ ~
~ Vincent.Hello
If you create the link db on server 2 so you need a tnsnames.ora entry that points to the server 1.
You should have an entry in the file tnsnames.ora on server - 2Server1 =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP) (HOST = 178.44.44.45)(PORT = 15210))
)
(CONNECT_DATA =
(SID = server1)
(SERVER = DEDICATED)
)
)then create the database on server 2 - link
CREATE DATABASE LINK PUBLIC 'server1_schemaA '.
CONNECT to schemaA
IDENTIFIED BY password
Using "Server1."Kind regards
Mike -
Hi DBAs,
I have created a new schema and granted create database link and create databases of public link privileges.
After that I created the link private DB for which TNS entry is present in TNSNAMES.ora but everything by testing the link, I get the error:
' ORA-02019: Description of the connection to the remote database not found. '
Kind regards
Ritz
Try using:
CREATE the DATABASE LINK "VENUS.ritz.ac.uk".
CONNECT TO 'VENUSREADONLY' IDENTIFIED BY 'FLAMING0READ0NLY' WITH THE HELP OF "VENUS."
Your dblink seem to give the entry not TNS service name.
Kind regards
--
Bertrand
PS you have to hide people with disabilities before posting.
-
creating user using the database link
Hello
I have 11g installed on one of the server
I created the database BUGAU to bugau.us.oracle.com link
link works fine
"Select * from table@"Bugau "gives the expected result
I ran the Sub statement to my server using the dblink.but do not know how to use the dblink to that effect. Please sat down
CREATE USER ABC IDENTIFIED BY welcome TEMPORARY by DEFAULT TABLESPACE USERS_001 temp123 TABLESPACE;
GRANT DEFAULT TO abc;
ALTER USER abc PROFILE LEVEL_1;
Thank you
ArchanaBravid wrote:
You cannot create a user on a remote database using a database link.
You can, but it is not a good design:
SQL> exec dbms_utility.exec_ddl_statement@orcl('CREATE USER ABC IDENTIFIED BY ABC'); PL/SQL procedure successfully completed. SQL> exec dbms_utility.exec_ddl_statement@orcl('GRANT CREATE SESSION TO ABC'); PL/SQL procedure successfully completed. SQL> connect abc@orcl/ABC Connected. SQL>
Of course, the user in the database unite ORCL must have EXECUTE on DBMS_UTILITY privilege.
SY.
-
virtual private database / AUTHID DEFINE procedure
Hi all
quick question (11.2.0.3 EE): is the work of virtual private database (dbms_rls) as well as a procedure defined as AUTHID = DEFINE?
We have the following scenario:
The user is the owner of table AA (mandantid number, name varchar2 (20))
Data:
100, ABC
102, XYZ
User B has access to the table A.AA with RLS in place given the record of the 100, ABC only.
So far, this works fine.
There is now a procedure owned by b:
Running the BB by B procedure returns 1 (correct)create or replace procedure BB AUTHID DEFINER is num number; begin select count(*) into num from A.AA; dbms_output.put_line('num='||to_char(num)); end BB; /
Now, the part that problem:
There is another user X, calling the B.BB procedure. In fact, I thought, the procedure output would be 1, because it runs under DEFINE, but actually it's 0.
Why?
Thank you for any advice on this
Concerning
ChristophThe procedure runs with the privileges of B. But the SESSION_USER will always be X.
You could create an application with a package context to set this context, modify the political function to use the RUN_AS_USER (or whatever you want to call it) rather than the context USERENV SESSION_USER and have then your stored procedure fill the frame with a value of B.
Justin
-
Logon to an account on the Win8 Pro system. In the PC settings. Your account, try to create a PIN. You will be asked your password, and when I enter the password, the tracking error. "The remote procedure call failed."
In the application event log, we see:
The failing application name: CredentialUIBroker.exe, version: 6.2.9200.16384, time stamp: 0x5010a22d
The failed module name: nvwgf2umx.dll, version: 9.18.13.1070, time stamp: 0x50b976f6
Exception code: 0xc000041d
Offset: 0 x 0000000000135122
ID of the process failed: 0 x 1160
Start time of application vulnerabilities: 0x01cddfd4b4a988ef
The failing application path: C:\Windows\System32\CredentialUIBroker.exe
Path of the failing module: C:\Windows\System32\nvwgf2umx.dll
Report ID: fdf0d095-4bc7-11e2-be7a-e0cb4e8a55c5
Faulting full name of the package:
ID of the failed package-parent application:
I did a search of exhaust gases and am not finding that anything related.
Action taken:
ran sfc/scannow and no reported problems.
Need to stop the application to quit.
I found the problem for the updated NVidia driver. Once I disabled the display driver USB 3.0 that acts as a method to connect to a computer USB 3.0 (also tactile) monitor, the driver installed correctly and does not interfere with any of the Windows applications.
Also, try to remove all the accounts on your system that are not user accounts that some applications will add them without apparent reason. Applications still work correctly. It's just less sure there to access your system. -
How to create a database link to another workspace
Hi all
Run now, I'm two workspaces in apex.oraclecorp.com.
For example, one is one, the other is b. In the space of only one I need used data in the workspace b,.
So, how can I create a link of database for b in the workspace one?
Kind regards
Patricia
Database of links are created between the databases. In my case, the schema are the same database and I own both the schema.
Thus,.
workspace: one, scheme: (default)
workspace: b, diagram: b (by default)
Connect to the workspace of b -> SQL Workshop:
Grant select on b.table to aDB.
Connect to a -> SQL Workshop workspace:
Select * from b.table;
the precondition is that you must have grant privligle on workspace b.
Kind regards
Patricia
-
SP2-0640: not connected - create database link error Gateway
While trying to connect through the gateway SQL by using 'Create database link','m ' SP2-0640: not connected "error. Here are the details.
====================================================================
TNSNAMES.ora
dg4msql =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
(CONNECT_DATA =
(Service_name = dg4msql))
(HS = OK)
)
====================================================================
LISTENER.ora
SID_LIST_LISTENER =
(SID_LIST =
(SID_DESC =
(SID_NAME = dg4msql)
(ORACLE_HOME = C:\product\11.2.0\tg_1)
(PROGRAM = C:\product\11.2.0\tg_1\bin\dg4msql)
)
)
LISTENER =
(DESCRIPTION_LIST =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = localhost) (PORT = 1521))
)
)
ADR_BASE_LISTENER = C:\product\11.2.0\tg_1
====================================================================
SQLNET.ora
# This file is actually generated by netca. But if customers can opt for
# install 'Software Only', this file does not exist and without the native
authentication #, they will not be able to connect to the database on NT.
SQLNET. AUTHENTICATION_SERVICES = (NTS)
NAMES. DIRECTORY_PATH = (TNSNAMES)
====================================================================
initdg4msql.ora
HS_FDS_CONNECT_INFO = sqlserverip, port / / PMDB
HS_FDS_TRACE_LEVEL = OFF
HS_FDS_RECOVERY_ACCOUNT = RECOVERY
HS_FDS_RECOVERY_PWD = RECOVERY
====================================================================
lsnrctl start outupt
The State of the application "dg4msql" UNKNOWN, has 1 handler for this service...
The command has been executed
====================================================================
tnsping output
Settings file that is used:
C: \ Product------11.2.0------tg_1------network-admin------sqlnet.ora
has been used TNSNAMES adapter to resolve the alias
Try to contact (DESCRIPTION = (ADDRESS = (PROTOCOL = TCP) (HOST = localhost) (PORT = 1521)) (CONNECT_DATA = (SERVICE_NAME = dg4msql)) (HS = OK))
OK (20 ms)
====================================================================
creation of link db output
SQL * more: Production release 11.2.0.2.0 on Lun Ott 8 12:03:08 2012
Copyright (c) 1982, 2010, Oracle. All rights reserved.
SQL > CREATE DATABASE LINK dblink PUBLIC CONNECT WITH As IDENTIFIED BY Manager1 USI
NG 'dg4msql ';
SP2-0640: not connected.most of the foreign bases are case-sensitive and default Oracle moves all uppercase. To keep the name of an object you should always be surrounded by double quotes and make sure tzhat you write the name exactly as it is defined in the foreign database, for example:
Select 'id' from 'TEST"@ln; -
Error creating database link!
Dear all,
I'm in a strange problem to connect to the database between the RAC and single Instance database. The two databases are 11 GR 2 and on Linux platform.
On a database that is CARS, my settings are as follows:
view the global_names parameter.
Value = TRUE
Select Rename global_name;
RACDB. DOMAIN.COM
Although I ran the race:
ALTER DATABASE RENAME GLOBAL_NAME to RACDB and bounce the database after this command, but still it shows RACDB. DOMAIN.COM
When I see the db_domain parameter
Value = (NULL)
tnsnames.ora is
GGBKP =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.20.182)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = GGBKP))
)
On the other server, my settings are as follows:
view the global_names parameter.
Value = TRUE
Select Rename global_name;
GGBKP
When I see the db_domain parameter
Value = (NULL)
tnsnames.ora is
RACDB =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP) (HOST = 192.168.20.29)(PORT = 1521))
(CONNECT_DATA = (SERVICE_NAME = RACDB))
)
OK, now when I create the link DB from one server to another by using the command:
Server a
create database GGBKP link to connect to streamadmin identified by streamadmin using 'GGBKP ';
and run this query
Select sysdate dual@GGBKP it gives an error:
ORA-02085: database link GGBKP. DOMAIN.COM will connect to GGBKP
the second server
SQL > create database RACDB link to connect to streamadmin identified by streamadmin
2 using "RACDB;
Database link created.
SQL > select sysdate dual@RACDB;
Select sysdate from dual@RACDB
*
ERROR on line 1:
ORA-02085: database RACDB link connects to the RACDB. DOMAIN.COM
Where is the problem in the settings and how to get rid of this problem. I have to keep the overall name of TRUE because replication streams.
Kind regards
ImranProbably that does not help.
The problem is on the server 1, Server 2 is OK and works as expected.
For some strange reason, server 1 still picks up "domain.com".At this point, I would probably question sys.props$ (where it is stored) or consult the global_names view definition.
I would not immediately update sys.props$ with the correct value.I would also like to run lsnrctl services: if properly configured global_name and service_name in lsnrctl match.
------
Sybrand Bakker
Senior Oracle DBA
Maybe you are looking for
-
Re: Satellite A300 - second hard drive
Hello Perhaps some may say where I can buy hard disk for the motherboard conector?I have place for HDD and connections on the motherboard, but don't not have hard drive connector.Camputer are 1gn A300. Help, please!
-
HP 240 4: forget the BIOS password
I forgot the BIOS password. After the connection of 3 failures, he told "[I 51275424] '. (not sure if the first letter is 'I' or '1') Can someone help me to unlock it?
-
Hi, I had recently a problem with my PC laptop battery.What's happened is that someone fell by mistake an empty can of Insecticide on the PC, then stop any computer laptop. Now, the laptop will not charge and only works on current alternative. "plugg
-
HP 15-af114AU: Ram upgrade locations no.
I would buy this model. It comes with 4 GB of ram. There an extra slot so that later I can add more than 4 GB? Thank you & best regards
-
I write on behalf of a client. He is having some problems with turning on the automatic updates. He's trying to turn it on by selecting the option to activate it manually. However, after this, she does not yet. He says that the page is empty and it f