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
Tags: Database
Similar Questions
-
Using the database links in a process of page plsql
I try to use a database link in a process of pl/sql page.
It works fine when I use the link name in the plsql like this:
BEGIN SELECT CARD_ID into :P12_HDR_CARD_NUMBER from [email protected];
But the name of the link will come an element of page (P12_DBLINK) filled as follows:
select db_link d, db_link r from user_db_links;
I tried the following and it doesn't work:
DECLARE l_link VARCHAR2(30); BEGIN l_link := :P12_DBLINK; SELECT CARD_ID into :P12_HDR_CARD_NUMBER from fusion.EXM_CC_COMPANY_ACCOUNTS@l_link;
It gives me:
- ORA-04052: error occurred when searching to the top of the remote object MERGER. EXM_CC_COMPANY_ACCOUNTS@L_LINK. WORLD ORA-00604: error occurred at recursive SQL level 3 ORA-02019: description of the connection to the remote database not found
I thought that perhaps the name of the link was joined with. WORLD automatically but already has the name of the link. WORLD at the end I tried stripping first but the error is the same.
Is there some synatx for what will work? Can I use dynamic sql statements?
Any suggestions are most appreciated.
Thank you
John
Hi John,.
see the following example to use the execute immediate for your purpose
SQL - Variable for the name of the database link - Stack Overflow
Let me know if that answers your query in the active thread
-
LabVIEW 2013 close when I try to read the database table.
LabVIEW 2013 close when I try to read the database table.
I get the error message, Labview falls just crashes. I use Labview x 32 and connective Toolkit of connectivity of database on Windows 7 x 64. I connect to PostgreSQL with ODBC driver, the connection is stable.
In my database, I have a lot of tables, I read all those without one.
When I try to read table bad I get data then labview crash. When I restart Labview, I have no message on the error.
Also I try to use LabSQL-1. 1a. But it has the same result.I found the solution.
I think the problem was that I have very large table in my database.
At the beginning I received data from table with next quiry:
SELECT column1, column2 FROM 'table ';
But when I write then:
SELECT column1, (column2, ',') array_to_string FROM 'table ';
all worked!
-
I use TDE tablespace encriptación and backup is performed (no encriptación rman). I deleted the database and try to restore the backup. I get the error when you try to restore the database with rman restore database.
ORA-19870: error when restoring backup piece + FRA_DG, oratst, backupset, 2015_03_2
ORA-19913: could not decrypt the backup
ORA-28365: portfolio is not open
About what I know, you should be able to RESTORE the data, but no RECOVERY without portfolio being opened.
Check the value of the variable environment - ORACLE_UNQNAME
It has everything first a correct value and try to open the wallet.
HTH,
Pradeep
-
How s/n know when and what account perform a function using the database link?
Dear,
My application of the CIM team asked DBA to create new function and run it. Function must use the database link for remote database data. So I need to create a new database to their licensing link. Cause we guess we'll experience the performance issue after the user performs this function, or another question and errors may occur. So we want to know when and who use this feature that connects to a remote database through the new database connection in advance. And I also need to know when and which connect to the remote database using this new database link. We have no idea to get this information? Can anyone recommend how do? Thank you very much.
Best reqards, Otis.
Check what business purpose, it will solve. If the function is so safe, why everyone will use. Only admin people should access.
All of these additional controls of this kind must be avoided as much as possible to improve the overall performance of the application.
Still if you need, see the database audit mechanism, specifically designed for this type of activity.
Kind regards
Harman
-
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.
-
strange problem with the database link
Hello world
I have a strange problem with the link of database in Oracle 11 g Express Edition;
There are two computers: computer-server and the client computer. Tnsnames.ora are the same on both computers IE.
CT =
(DESCRIPTION =
(ADDRESS_LIST =
(ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
)
(CONNECT_DATA = (SERVICE_NAME = XE)
)
)
I created the database link:
Create database link zdalny
Connect to < user_id > identified by < password >
using "CT".
Customer cannot connect with server when I do not use above the command. But when I change 'use' for using "krzysztof:1521" or by using "krzysztof" or "server IP:1521" - everything is ok.
Why I ask. Because in all the materials that I read about Oracle command with the help of "CT" should work correct. But there is no. Do you know why?
Thanks in advance and apologize me for my English.
Rgds
KrzysztofHere's the tnsnames of your server, but to connect to the oracle server db (any client or to another instance of db oracle), you must install oracle client.
However, in your condition, you want to connect the DB1 Oracle OracleDB2 using a link db, I'm right? In this case you should always set the entry in the tnsnames.ora
To verify that you can connect to Oracle DB2 from DB1 Oracle, you can use tnsping in the command line.
In your casec:\tnsping CT
Krzysztof Szymaniak wrote: CT =
(DESCRIPTION =
(ADDRESS = (PROTOCOL = TCP)(HOST = krzysztof) (PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = XE)
)
)Check your tnsnames entry in the machine, you are trying to connect to. And check if the tnsping is successful.
Sometimes the error message says not everything, which means that you need to troubleshoot yourself and learn from the experience.
Always in the opposite case, refer to the documentation.See you soon.
Published by: Spongebob December 14, 2011 09:30
-
Hi all
I use 10.2.0.1.0 oracle.
I had 2 databases named ( ora1, ora2 ).
in fact, I have to connect to ora1 and to use tables, procedures exist in ora2.
So, I've created database ora2 as database link:
CREATE DATABASE LINK ora2_test
CONNECT to ora1_user
IDENTIFIED BY ora1_password
Using of "ora1";
Here is ora2_test name of the database link.
Am I wrong?
I am connected to ora1 as
connect ora1_user/ora1_password@ora1;
Select * from redg@ora2_test;
but I get the error message.
Any help please.
Thank youPlease post the answer as correct/useful.
Asif kabir
-
I try to import tables from one database to another via a database link. But faced with a weird error. Help, please.
Operating system: Server Linux Oracle release 6.4
Database of the source: Oracle 12.1.0.2
Target databases: Oracle 12.1.0.2
Measures
- Created a TNS entry for the source on the target server database.
- Create a link from public database to the schema of the source by using the tns name.
- Created a database in the target database directory and the permissions granted to the user target.
Run the command below
Impdp directory with name of user and password = dirname tables = network_link = linkname schema.tablename
Get the below output
Import: Release 12.1.0.2.0 - Production on Fri 9 Oct 14:51:32 2015
Copyright (c) 1982, 2014, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle 12 c Enterprise Edition Release 12.1.0.2.0 - 64 bit Production database
With the options of partitioning, OLAP, advanced analytics and Real Application Testing
ORA-39004: invalid state
ORA-39091: unable to determine the State of standby and logical flow
ORA-06550: line 1, column 47:
PLS-00103: encountered the symbol "IN" when the expected in the following way:
< an ID > < a between double quote delimited identifiers of >
Hello
Run the command below
Impdp directory with name of user and password = dirname tables = network_link = linkname schema.tablename
can you show real impdp statement executed...
I guss here is the problem network_link 'name '.
Rajesh
-
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.
-
error "invalid character" using the database link
Hello!
I use db 9.2 and trying to connect to a 10g database.
I created the db link... when I use it (select * from table@dblink), an error occurred: ORA-00911 invalid character. It does not accept the '@'!
I tried to use it on sql * plus, worked well...
Any ideas?
Thank you!Can you try to set America/America in preferences - Database - NLS?
Hope that helps,
K. -
image uploaded to the database link
Hello
I downloaded the images in my server so now I want to show on different pages using php and mysql, so can someone tell me how I can do this in dreamweaver php codes or manual?
Please begin your answer of the way to start step I have to do after the download of the image, I also know a database table also be require for images should this complete tutorial please. Therefore, please answer thank you.
tanveerh86603130 wrote:
I mean if I have uploaed images manually on the server and now when I create a new page in php with the mysql database and want to inlucde one of these uploaded image dynamcally, so how I can do, how can I create table for these images and then use this table for u place links to this image?
If youre doing this manually - you should now have all your images in a folder on your server.
To get dynamically on a page, you must include the name of the image in the database table.
Create another field in your database table called - model_image
Then insert the name of the image in this area, associated with the mobile _name - nokia_1100.jpg, samsung_2300.jpg etc.
Back in your page model_details.php use a query as I pointed out in the other thread:
$model_details = mysql_query ("" SELECT * FROM mobile_phones WHERE model_id = ' $model_id ' ' ") or die (mysql_error ());
$model_details = mysql_fetch_array ($model_details);
Then echo the image of the page according to the model_id adopted in the link to the model_details.php page. (replace "folder_name' by the name of the folder in which images are stored)
as well as its other fields:
All this can be done through server Dreamweavers behaviors if you do want to write your own code. Don't forget the code that Dreamweaver now uses dynamic development is outdated.
-
ONLY INSERT OR DELETE THE PRIVILEGE TO THE DATABASE LINK
Hi all
Version of DB 11.2.0.1
RedHat 5.5 operating system
I created a link to private database by following the path
create database link test_link
connect to Scott identified by tiger
using
'(DESCRIPTION =)
(ADDRESS = (PROTOCOL = TCP) (HOST = 10.194.180.45)(PORT = 1521))
(CONNECT_DATA =
(SERVER = DEDICATED)
(SERVICE_NAME = prod)
)
)'
The link is created successfully and I am able to perform all the DML operations on it.
The Question is there a way by which we can give only insert or delete or privilege is not to remove from the table at this link.
For operations select only, I know that by creating a view I can restrict the remote user, but is there a way by which I can give only insert or remove remove link of database.
You can not grant any privilege to a link. Can you and your team identify a location in the documentation, if required?
By default, a remote session will get the same privilege as the user to which it connects.
BTW:
- do not use a database link tnsnames.ora makes your hard to maintain link
- using addresses IP hard in a database link makes your link even more difficult to maintain
- by specifying a hardcoded password in a database link is a breach of security.
-------------
Sybrand Bakker
Senior Oracle DBA
-
ORA-03113 while using the database link
From our database, we use a database link to query on a different database tables: they are the two 10.2.0.4
It is not always occur, but often. You have an idea? Thank youTake a look at this note:
ORA-03113 UNIX - what information collect [ID 17613.1] -
Hi guys!
I'm having problems creating a data link...
I enter something like < IP >: < PORT > / < SID > in the SERVICE NAME field and the Assistant returns me error message.
This structure for THE SERVICE NAME is correct?
Thank you.Hello
I think the nomenclature might be a little better. During create/edit the entry box is marked but the Service name in outdoor, HOMEtab, and in fact both are misleading.
Looks like you want to use the format EZConnect [host: port / service name].
http://www.orafaq.com/wiki/EZCONNECTService_name is generally SID.domain, but you can get away with only SID since many products add the local domain name. It can work if you leave off of the area, but local and remote domain names are the same.
It's really much easier to use a TNS alias if you have a local listener running with the appropriate entry in the tnsnames.ora file. Thus, for example, in my environment my sqlnet.ora file contains this line:
NAMES. DIRECTORY_PATH = (TNSNAMES, EZCONNECT)
My remote database THAT SID is ora1122 on, say, xyz1234567 to the remote computer and I have a TNS alias entry of the xyz1122 in my local tnsnames.ora file. Given these parameters, I am able to create the database to help link
xyz1122
or
xyz1234567:1521/ora1122.us.Oracle.com
Thus the first case depends on all: the local listener running, the tnsnames.ora and sqlnet.ora parameters. The second case only on rethinking the host, port, and service. And, in my environment, I actually couldn't give up the domain name. us.Oracle.com.
I hope that this more detailed example is aid,
Gary
Maybe you are looking for
-
Satellite 2450-201: USB 1.1 instead of 2.0 controller
I formatted the hard drive on my Satellite 2450-201 and loaded Windows XP SP2. I loaded all the drivers from the disk utilities and everything works well except the USB ports work only in 1.1 instead of 2. There is a yellow exclamation point in devic
-
Satellite A200-1MD: how to install drivers XP
Hello! I recently bought a Satellite A200-1MD. He had installed Vista. Switched to XP, but there's a little mixup with the drivers. Can someone please make me a list of necessary drivers and their installation order? Have known this Modem drivers mus
-
Ultiboard 14 project files are compatible with Ultiboard 13?
A colleague brought by a project file, it creates 14 Ultiboard for me to watch, and I was unable to load with Ultiboard 13. These are totally incompatible?
-
I've implemented all the information for an email from the Charter and then when I click on get mail, it says there is a connection to the server error... Why?
-
HP 5740 all-in-one: computer recognizes the printer, but not to scan
My computer HP Envy Phoenix 810-470pc will print and fax, but not to analyze my HP 5740, I can scan from the printer and send it to the computer, but cannot scan to the computer, I reinstalled the software and it hooked up via usb, but it still does