php-windows Digest 18 Mar 2004 02:10:06 -0000 Issue 2170
Topics (messages 23164 through 23175):
copying MS SQL tables
23164 by: Gerardo Rojas
23165 by: Svensson, B.A.T. (HKG)
23166 by: Frank M. Kromann
23167 by: Gerardo Rojas
23168 by: Svensson, B.A.T. (HKG)
23169 by: Svensson, B.A.T. (HKG)
23170 by: Svensson, B.A.T. (HKG)
23172 by: Robert Twitty
23173 by: Gerardo Rojas
PHP WINDOWS 2000 Testing Oracle DB with PHP
23171 by: Raj Gopal
Re: Windows 95
23174 by: Comex
Re: CGI Error Message
23175 by: WilliamLiu
Administrivia:
To subscribe to the digest, e-mail:
[EMAIL PROTECTED]
To unsubscribe from the digest, e-mail:
[EMAIL PROTECTED]
To post to the list, e-mail:
[EMAIL PROTECTED]
----------------------------------------------------------------------
--- Begin Message ---
Is there a quick way to copy an entire table from one MSSQL server to another using
PHP. These servers are accessed remotely. I have all required permissions.
--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
How many rows do you have in the tables?
If many use bcp.exe to bulk copy out data form source server,
ftp the file to the other server and then bulk copy data into the
target server. That should be the fastets way if you have a lot
of data to copy.
-----Original Message-----
From: Gerardo Rojas
To: [EMAIL PROTECTED]
Sent: 17-3-2004 19:45
Subject: [PHP-WIN] copying MS SQL tables
Is there a quick way to copy an entire table from one MSSQL server to
another using PHP. These servers are accessed remotely. I have all
required permissions.
--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]
--- End Message ---
--- Begin Message ---
If you install the MSSQL server Client tools on your PC you will be amle to
use the Data Transformation Service (import/export) to copy data and
structure from one SQL server to another. Thats the fastest way to do
this.
- Frank
> How many rows do you have in the tables?
>
> If many use bcp.exe to bulk copy out data form source server,
> ftp the file to the other server and then bulk copy data into the
> target server. That should be the fastets way if you have a lot
> of data to copy.
>
> -----Original Message-----
> From: Gerardo Rojas
> To: [EMAIL PROTECTED]
> Sent: 17-3-2004 19:45
> Subject: [PHP-WIN] copying MS SQL tables
>
> Is there a quick way to copy an entire table from one MSSQL server to
> another using PHP. These servers are accessed remotely. I have all
> required permissions.
>
>
> --
> Gerardo S. Rojas
> mailto: [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--- End Message ---
--- Begin Message ---
Yes, i realize this. (this requires, to many mouse clicks) But, what i want is to
have it all hidden. I select the remote server on a web page, give it a table and
presto! Table copied.
--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]
-----Original Message-----
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 1:14 PM
To: Svensson, B.A.T. (HKG)
Cc: '[EMAIL PROTECTED]'
Subject: RE: [PHP-WIN] copying MS SQL tables
If you install the MSSQL server Client tools on your PC you will be amle to
use the Data Transformation Service (import/export) to copy data and
structure from one SQL server to another. Thats the fastest way to do
this.
- Frank
> How many rows do you have in the tables?
>
> If many use bcp.exe to bulk copy out data form source server,
> ftp the file to the other server and then bulk copy data into the
> target server. That should be the fastets way if you have a lot
> of data to copy.
>
> -----Original Message-----
> From: Gerardo Rojas
> To: [EMAIL PROTECTED]
> Sent: 17-3-2004 19:45
> Subject: [PHP-WIN] copying MS SQL tables
>
> Is there a quick way to copy an entire table from one MSSQL server to
> another using PHP. These servers are accessed remotely. I have all
> required permissions.
>
>
> --
> Gerardo S. Rojas
> mailto: [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
In my exporeince the DTS is a worhtless pice of sh.t.
If you transfer larg data sets, then it drops data
with out telling you about it. Not mentining the
slow transaction speed that drives you cracy.
-----Original Message-----
From: Frank M. Kromann
To: Svensson, B.A.T. (HKG)
Cc: '[EMAIL PROTECTED]'
Sent: 17-3-2004 20:14
Subject: RE: [PHP-WIN] copying MS SQL tables
If you install the MSSQL server Client tools on your PC you will be amle
to
use the Data Transformation Service (import/export) to copy data and
structure from one SQL server to another. Thats the fastest way to do
this.
- Frank
> How many rows do you have in the tables?
>
> If many use bcp.exe to bulk copy out data form source server,
> ftp the file to the other server and then bulk copy data into the
> target server. That should be the fastets way if you have a lot
> of data to copy.
>
> -----Original Message-----
> From: Gerardo Rojas
> To: [EMAIL PROTECTED]
> Sent: 17-3-2004 19:45
> Subject: [PHP-WIN] copying MS SQL tables
>
> Is there a quick way to copy an entire table from one MSSQL server to
> another using PHP. These servers are accessed remotely. I have all
> required permissions.
>
>
> --
> Gerardo S. Rojas
> mailto: [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
My recommedation is: use bcp and ftp...
that is only thing that is fast and 100% reliable.
-----Original Message-----
From: Gerardo Rojas
To: Frank M. Kromann; Svensson, B.A.T. (HKG)
Cc: [EMAIL PROTECTED]
Sent: 17-3-2004 20:25
Subject: RE: [PHP-WIN] copying MS SQL tables
Yes, i realize this. (this requires, to many mouse clicks) But, what i
want is to have it all hidden. I select the remote server on a web
page, give it a table and presto! Table copied.
--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]
-----Original Message-----
From: Frank M. Kromann [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 1:14 PM
To: Svensson, B.A.T. (HKG)
Cc: '[EMAIL PROTECTED]'
Subject: RE: [PHP-WIN] copying MS SQL tables
If you install the MSSQL server Client tools on your PC you will be amle
to
use the Data Transformation Service (import/export) to copy data and
structure from one SQL server to another. Thats the fastest way to do
this.
- Frank
> How many rows do you have in the tables?
>
> If many use bcp.exe to bulk copy out data form source server,
> ftp the file to the other server and then bulk copy data into the
> target server. That should be the fastets way if you have a lot
> of data to copy.
>
> -----Original Message-----
> From: Gerardo Rojas
> To: [EMAIL PROTECTED]
> Sent: 17-3-2004 19:45
> Subject: [PHP-WIN] copying MS SQL tables
>
> Is there a quick way to copy an entire table from one MSSQL server to
> another using PHP. These servers are accessed remotely. I have all
> required permissions.
>
>
> --
> Gerardo S. Rojas
> mailto: [EMAIL PROTECTED]
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php
--- End Message ---
--- Begin Message ---
> use the Data Transformation Service (import/export)
[...]
> another. Thats the fastest way to do this.
How many rows is it in the tables you copy?
--- End Message ---
--- Begin Message ---
You can download the odbtp extension at http://odbtp.sourceforge.net, and
then do the something like the following:
<?php
$FromTable = $_REQUEST['FromTable'];
$ToTable = $_REQUEST['ToTable'];
$con1 = odbtp_connect( 'odbtp.somewhere.com',
'DRIVER={SQL
Server};SERVER=server1;UID=uid1;PWD=pwd1;DATABASE=database1;' ) or die;
$con2 = odbtp_connect( 'odbtp.somewhere.com',
'DRIVER={SQL
Server};SERVER=server2;UID=uid2;PWD=pwd2;DATABASE=database2;' ) or die;
$qry1 = odbtp_query( "SELECT * FROM $FromTable", $con1 ) or die;
$qry2 = odbtp_allocate_query( $con2 ) or die;
odbtp_set_cursor( $qry2, ODB_CURSOR_DYNAMIC ) or die;
odbtp_query( "SELECT * FROM $ToTable", $qry2 ) or die;
odbtp_fetch( $qry2 );
$n_fields = odbtp_num_fields( $qry1 );
while( $row = odbtp_fetch_row( $qry1 ) ) {
for( $f = 0; $f < $n_fields; $f++ )
odbtp_field( $qry2, $f, $row[$f] );
odbtp_row_add( $qry2 ) or die;
}
odbtp_close( $con1 );
odbtp_close( $con2 );
echo "DONE!";
?>
It may not be as efficient as bcp, but I think it is what you want.
-- bob
On Wed, 17 Mar 2004, Gerardo Rojas wrote:
> Yes, i realize this. (this requires, to many mouse clicks) But, what i want is to
> have it all hidden. I select the remote server on a web page, give it a table and
> presto! Table copied.
>
>
> --
> Gerardo S. Rojas
> mailto: [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 17, 2004 1:14 PM
> To: Svensson, B.A.T. (HKG)
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP-WIN] copying MS SQL tables
>
>
> If you install the MSSQL server Client tools on your PC you will be amle to
> use the Data Transformation Service (import/export) to copy data and
> structure from one SQL server to another. Thats the fastest way to do
> this.
>
> - Frank
>
> > How many rows do you have in the tables?
> >
> > If many use bcp.exe to bulk copy out data form source server,
> > ftp the file to the other server and then bulk copy data into the
> > target server. That should be the fastets way if you have a lot
> > of data to copy.
> >
> > -----Original Message-----
> > From: Gerardo Rojas
> > To: [EMAIL PROTECTED]
> > Sent: 17-3-2004 19:45
> > Subject: [PHP-WIN] copying MS SQL tables
> >
> > Is there a quick way to copy an entire table from one MSSQL server to
> > another using PHP. These servers are accessed remotely. I have all
> > required permissions.
> >
> >
> > --
> > Gerardo S. Rojas
> > mailto: [EMAIL PROTECTED]
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
yes, this is kind of what i want. Using a web interface. Thanks, i'll give it a shot.
--
Gerardo S. Rojas
mailto: [EMAIL PROTECTED]
-----Original Message-----
From: Robert Twitty [mailto:[EMAIL PROTECTED]
Sent: Wednesday, March 17, 2004 3:25 PM
To: Gerardo Rojas
Cc: [EMAIL PROTECTED]
Subject: RE: [PHP-WIN] copying MS SQL tables
You can download the odbtp extension at http://odbtp.sourceforge.net, and
then do the something like the following:
<?php
$FromTable = $_REQUEST['FromTable'];
$ToTable = $_REQUEST['ToTable'];
$con1 = odbtp_connect( 'odbtp.somewhere.com',
'DRIVER={SQL
Server};SERVER=server1;UID=uid1;PWD=pwd1;DATABASE=database1;' ) or die;
$con2 = odbtp_connect( 'odbtp.somewhere.com',
'DRIVER={SQL
Server};SERVER=server2;UID=uid2;PWD=pwd2;DATABASE=database2;' ) or die;
$qry1 = odbtp_query( "SELECT * FROM $FromTable", $con1 ) or die;
$qry2 = odbtp_allocate_query( $con2 ) or die;
odbtp_set_cursor( $qry2, ODB_CURSOR_DYNAMIC ) or die;
odbtp_query( "SELECT * FROM $ToTable", $qry2 ) or die;
odbtp_fetch( $qry2 );
$n_fields = odbtp_num_fields( $qry1 );
while( $row = odbtp_fetch_row( $qry1 ) ) {
for( $f = 0; $f < $n_fields; $f++ )
odbtp_field( $qry2, $f, $row[$f] );
odbtp_row_add( $qry2 ) or die;
}
odbtp_close( $con1 );
odbtp_close( $con2 );
echo "DONE!";
?>
It may not be as efficient as bcp, but I think it is what you want.
-- bob
On Wed, 17 Mar 2004, Gerardo Rojas wrote:
> Yes, i realize this. (this requires, to many mouse clicks) But, what i want is to
> have it all hidden. I select the remote server on a web page, give it a table and
> presto! Table copied.
>
>
> --
> Gerardo S. Rojas
> mailto: [EMAIL PROTECTED]
>
>
> -----Original Message-----
> From: Frank M. Kromann [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, March 17, 2004 1:14 PM
> To: Svensson, B.A.T. (HKG)
> Cc: '[EMAIL PROTECTED]'
> Subject: RE: [PHP-WIN] copying MS SQL tables
>
>
> If you install the MSSQL server Client tools on your PC you will be amle to
> use the Data Transformation Service (import/export) to copy data and
> structure from one SQL server to another. Thats the fastest way to do
> this.
>
> - Frank
>
> > How many rows do you have in the tables?
> >
> > If many use bcp.exe to bulk copy out data form source server,
> > ftp the file to the other server and then bulk copy data into the
> > target server. That should be the fastets way if you have a lot
> > of data to copy.
> >
> > -----Original Message-----
> > From: Gerardo Rojas
> > To: [EMAIL PROTECTED]
> > Sent: 17-3-2004 19:45
> > Subject: [PHP-WIN] copying MS SQL tables
> >
> > Is there a quick way to copy an entire table from one MSSQL server to
> > another using PHP. These servers are accessed remotely. I have all
> > required permissions.
> >
> >
> > --
> > Gerardo S. Rojas
> > mailto: [EMAIL PROTECTED]
> >
> > --
> > PHP Windows Mailing List (http://www.php.net/)
> > To unsubscribe, visit: http://www.php.net/unsub.php
> >
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>
>
--- End Message ---
--- Begin Message ---
Hi All,
I was trying to query Oracle from PHP.
The Environment: Windows 2000, Oracle 9i, IIS 5, PHP 4.3.4
Built a PHP file and it works from the command prompt like C:/PHP >php
-f c:\test\Hello.php
I have enabled the extension extension=php_oci8.dll
and also given r, rx permissions for the Internet Guest Account on
C:\PHP
And I still get the following error when I try from the Browser
Fatal error: Call to undefined function: ocilogon() in
C:\Test\hello.php on line 8
PHP Warning: Unknown(): Unable to load dynamic library
'c:\WinNt\System32\php_oci8.dll' - Access is denied. in Unknown on line
0
Appreciate U r Help!!
--- End Message ---
--- Begin Message ---
On Sun, 14 Mar 2004 13:56:01 +0100, Bobo Wieland <[EMAIL PROTECTED]>
wrote:
Hi! Is it possible to install apache/php/mysql under Windows 95?
.bobo
yes.
--- End Message ---
--- Begin Message ---
I got it! Thanks very mush !!!
"David Elliott" <[EMAIL PROTECTED]> ???
news:[EMAIL PROTECTED] ???...
Hi WilliamLiu
On 17 March 2004 at 18:48:22 +0800 (which was 10:48 where I live) WilliamLiu
emanated these words of wisdom
> I'm using PHP4 on Windows 2000 Server SP4 (with MSSQL).
> Here has one thing is very strange, I use
> header("Location:http://xxx.xxx.xxx.xx") to redirect address,
> when execute the same page with same operation processes and arguments,
> I will got CGI Error message sometimes.
> I can't found out what's happened and thanks for any advice!!
> Here is the CGI Error message source code:
> <head><title>Error in CGI Application</title></head>
> <body><h1>CGI Error</h1>The specified CGI application misbehaved by not
> returning a complete set of HTTP headers. The headers it did return
> are:<p><p><pre></pre>
Seen it, been there, got the T shirt.
Use ODBC connector and not the mssql dll.
PHP blame M$. M$ blame PHP
--
Thank you for your time, _______________________________________________
David | David Elliott | Software Engineer |
_________________________| [EMAIL PROTECTED] | PGP Key ID 0x650F4534 |
| Give file a blindfold and last cigarette before deletion (Y/N)? |
--- End Message ---