473,569 Members | 2,480 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Dblink question


Hello all!

I am rather stuck and am hoping someone can help. I am working on a
project where users need to be able to send one query which will hit
databases on multiple hosts (the database structures are the same) and
tie the data back together again.

After doing lots of reading it looks like dblink might be a great
solution for this. After trying to insert dblink.sql into the database,
I just get a series of errors:

ERROR: stat failed on file '$libdir/dblink': No such file or directory

Does anyone know how I can get around this error? Or is dblink not
really a good solution for what I am trying to do? I am sure others out
there have had to do similar tasks before so any advice that can be
provided would be greatly appreciated!

TIA for your time and reply!

--Sam

---------------------------(end of broadcast)---------------------------
TIP 9: the planner will ignore your desire to choose an index scan if your
joining column's datatypes do not match

Nov 23 '05 #1
2 7656
"Sam Masiello" <sm*******@mxlo gic.com> writes:
After trying to insert dblink.sql into the database,
I just get a series of errors: ERROR: stat failed on file '$libdir/dblink': No such file or directory


Did you compile the dblink shared library and install it in the correct
place?

regards, tom lane

---------------------------(end of broadcast)---------------------------
TIP 8: explain analyze is your friend

Nov 23 '05 #2
Sam Masiello wrote:
After doing lots of reading it looks like dblink might be a great
solution for this. After trying to insert dblink.sql into the database,
I just get a series of errors:

ERROR: stat failed on file '$libdir/dblink': No such file or directory


This is not a dblink error per se, but rather a "dynamic library can't
be found" error. At a shell prompt, run the following:
pg_config --pkglibdir
That should output the $libdir path (e.g. /usr/local/pgsql/lib). Now go
look there for dblink.<dll-ext-for-yourOS> (e.g. dblink.so). If it isn't
there, do a "make clean" and show us the output of
make
make install
make installcheck

Joe

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/docs/faqs/FAQ.html

Nov 23 '05 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
8831
by: Clive Page | last post by:
What I'd like to do is use dblink to extract a few rows from a remote database and manipulate these within a function in pl/pgsql. Something like this: CREATE OR REPLACE FUNCTION find() RETURNS INTEGER AS ' DECLARE count INTEGER: myrec RECORD; BEGIN FOR myrec IN SELECT * FROM DBLINK(''select x,y from mytab'') as
1
10305
by: Brian Maguire | last post by:
What's the best way to create a connection with dblink with persisted connections for web applications? For example: I want to have a view that links to a table in another pg database so I can mask the connection and make it easier to query. so I would do this ...
1
4164
by: Oleg Lebedev | last post by:
Is there a way to rollback a dblink transaction? Say, I delete some data from the remote database, but I don't want this to be visible untill the data is inserted in the current database. And if the insertion of data in the current database throws an error, I want to rollback the dblink transaction, which should restore data in its original...
2
2323
by: Mark Gibson | last post by:
Hello, I've been experimenting with dblink recently, and have encountered some limitations I'd like to discuss. I've been trying to create views of remote tables, like so: CREATE VIEW stuff AS SELECT * FROM dblink(' ... remote connection info ... ', 'SELECT id, title, title_idx FROM stuff')
1
2694
by: Kreißl, Karsten | last post by:
Hello, we want use dblink to connect several databases in a client/server environment. Connection from local users to the remote databases should be possible only for privileged users. We tried a solution with dblink, embedding this command in a view, like this: create view inst as select * from dblink('host=pollux port=5432 dbname=cob_int...
2
2778
by: Jim Worke | last post by:
Hi list, My boss would like to convert from MySQL to PostgreSQL, but there are a few things that hold us back. We'd like to have the databases in several physical servers, with referential integrity between the tables. Reading from Oracle articles, their referential integrity can be done using their dblink and triggers. What I'd like...
1
5999
by: priyapatil | last post by:
hello everyone i want to use dblink functions to access a remote database bt i am not able to install those functions on my machine i am using postgresql 8.2 on windows XP machine can anyone tell me how to install those functions?? on internet i have found that you have to write a command like psql your_databse < dblink.sql
3
4921
by: stephcsh | last post by:
Hi, I wanted to copy a data from table1 in db1 to table2 in db2, which has the same structure, with the PosgreSQL dblink funtion. The fields for both the tables are: id, first_name, last_name. However, I would like to replace the id and first_name in table1 to: 3 and 'nil' to insert into table2. INSERT INTO table2 SELECT * FROM...
1
2184
by: dsslim | last post by:
Hi, Oracle instance A has a dblink to DB2 DB. Oracle instance B, which resides on the another machine wants to access the DB2 via Oracle instance A's dblink. Possible ? TIA !
0
7615
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7924
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8130
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7677
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
1
5514
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5219
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3653
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3643
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2115
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.