dbTalk Databases Forums  

Copy data between server

comp.databases.btrieve comp.databases.btrieve


Discuss Copy data between server in the comp.databases.btrieve forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Bre-x
 
Posts: n/a

Default Copy data between server - 12-14-2007 , 04:10 PM






I know that Pervasive.SQL does support running a single query against
multiple
databases as well as multiple tables, as long as they are on the same
server.

But what about two different servers?

I have pervasive 2000 running on a windows NT and Pervasive 8 running
on Ubuntu.
Both server can be access via PCC.

I would like to copy data using a sql script.

Regards,

Bre-x


Reply With Quote
  #2  
Old   
Bill Bach
 
Posts: n/a

Default Re: Copy data between server - 12-17-2007 , 08:43 AM






This will "mostly" work. I say "mostly" because of the version
differences, you may have issues with syntax or using one client
against the other. (May want to try both clients to see which is
better.)

While you probably cannot copy data using a SINGLE SQL statement,
running a script via a regular language (e.g. perl) is certainly
possible, as it can open a connection to each, read from one, and write
to the other.

In fact, this very same concept is what Extract/Transform/Load (ETL)
applications (like Informatica, JasperSoft, Pentaho, and Pervasive Data
Integrator) do every day. If you are really trying to integrate data
between two different databases, I would really recommend going wiht
one of these tools.
Goldstar Software Inc.
Pervasive-based Products, Training & Services
Bill Bach
BillBach (AT) goldstarsoftware (DOT) com
http://www.goldstarsoftware.com
*** Chicago: Pervasive Service & Support Class - March 2008 ***


Bre-x wrote:

Quote:
I know that Pervasive.SQL does support running a single query against
multiple
databases as well as multiple tables, as long as they are on the same
server.

But what about two different servers?

I have pervasive 2000 running on a windows NT and Pervasive 8 running
on Ubuntu.
Both server can be access via PCC.

I would like to copy data using a sql script.

Regards,

Bre-x


--



Reply With Quote
  #3  
Old   
Bre-x
 
Posts: n/a

Default Re: Copy data between server - 12-17-2007 , 09:23 AM



Bill,

I cannt justify the purchase of another tool. I just want it to run a
very simple query:

INSERT INTO LINUXSERVER.MYDB.MYTABLE
SELECT *
FORM WINSERVER.MYDBA.MYTABLE
WHERE WINSERVER.MYDBA.MYTABLE.MYDATE = NOW()

Anyways, thnks for you time.

Bre-x


Reply With Quote
  #4  
Old   
Rok Debeljak
 
Posts: n/a

Default Re: Copy data between server - 12-18-2007 , 01:32 AM



[At WINSERVER PCC or some SQL exec tool from Pervasive Component Zone]
create table mydba.onedaytable (..the same layout as mytable..);
insert into mydba.onedaytable (select * from mydba.mytable where
mydba.mytable.mydate = now());

[At WINSERVER DOS prompt OR LINUXSERVER bash shell]
butil -copy btrv://winserver/mydba?table=onedaytable
btrv://linuxserver/mydb?table=mytable

Rokson

Bre-x pravi:
Quote:
Bill,

I cannt justify the purchase of another tool. I just want it to run a
very simple query:

INSERT INTO LINUXSERVER.MYDB.MYTABLE
SELECT *
FORM WINSERVER.MYDBA.MYTABLE
WHERE WINSERVER.MYDBA.MYTABLE.MYDATE = NOW()

Anyways, thnks for you time.

Bre-x


Reply With Quote
  #5  
Old   
Neil Brownlee
 
Posts: n/a

Default Re: Copy data between server - 12-19-2007 , 04:36 AM



Hi,

How did you get Pervasive running on Ubuntu? I've tried numerous times, but
the Pervasive install scripts are not designed for the Ubuntu file layout

--
Neil Brownlee
Technical Director
PC Control Systems
"Bre-x" <cholotron (AT) hotmail (DOT) com> wrote

Bill,

I cannt justify the purchase of another tool. I just want it to run a
very simple query:

INSERT INTO LINUXSERVER.MYDB.MYTABLE
SELECT *
FORM WINSERVER.MYDBA.MYTABLE
WHERE WINSERVER.MYDBA.MYTABLE.MYDATE = NOW()

Anyways, thnks for you time.

Bre-x



Reply With Quote
  #6  
Old   
Rok Debeljak
 
Posts: n/a

Default Re: Copy data between server - 12-19-2007 , 02:09 PM



Quote:
How did you get Pervasive running on Ubuntu?
When un-tared psql folder is put into /usr/local :
(on my 64-bit Ubuntu) I had to find 32-bit libuuid.so.1 on internet (I
do not remember the exact location right now) and put it into /usr/lib32
# ln -s /usr/lib32/libuuid.so.1 /usr/local/psql/lib/libuuid.so.1
# ln -s /etc /etc/init.d
And then /usr/local/psql/etc/preinstall.sh and postinstall.sh

Does it work for you or did I forget to write down some step in my
Pervasive+Ubuntu howto?

Rokson

Neil Brownlee pravi:
Quote:
Hi,

How did you get Pervasive running on Ubuntu? I've tried numerous times, but
the Pervasive install scripts are not designed for the Ubuntu file layout


Reply With Quote
  #7  
Old   
Bre-x
 
Posts: n/a

Default Re: Copy data between server - 12-31-2007 , 11:24 AM



I use Pervasive.SQL-8.70-014.000.i486.tar.gz (server) and
Pervasive.SQL-Client-8.70-014.000.i486.tar.gz (client)
I install the client first.

copy the untar files to /usr/local/psql

I edit the ./etc/clientpostinstall.sh
I change all entries that have wrong directories
Example:
/etc/rc.d/init.d/psql to /etc/init.d/psql

Create symlinks for all the odbc drivers from psql to /usr/lib
cd /usr/lib/
ln -s /usr/local/psql/lib/* ./

then I installed the server.
Make sure to edit the postinstall.sh

Bre-x


Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.