Skip to Content.
Sympa Menu

freetds - Re: [freetds] Here's something any/everyone could help me with...

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "James K. Lowden" <jklowden AT schemamania.org>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Here's something any/everyone could help me with...
  • Date: Fri, 11 Jun 2004 18:50:27 -0400

On Fri, 11 Jun 2004, "Thompson, Bill D (London)" <bill_d_thompson AT ml.com>
wrote:
>
> source server name
> source user id
> source password
> source database
> source table name
>
> target server name
> target user id
> target password
> target database
> target table name (may not be the same as source)
>
> Apart from the fact that I don't like the idea of putting
> userid/passwords on the command line,
> I'm running out of meaningful flag letters...

Many ftp clients read ~/.netrc. With mine (lukem ftp) it must be chmod
600 or it won't be honored. That would handle mapping username+password
to hosts, and you could substitute servernames for hosts.

No one says that's a secure solution. It's definitely not. But secure
solutions will require an order of magnitude more work, only to transmit
the password in plaintext.

One set of flags might be:

-s source server name
-u source user id
-p source password
-d source database
-t source table name

-S target server name
-U target user id
-P target password
-D target database
-T target table name

I can't think of anything but T/t for "table", and suggest Z (zero) to
mean "truncate target table). E (erase) might be as good, unless you're
going to support Explicit IDENTITY values, cf. bcp.exe.

Another scheme suggests itself (so I don't have to?):

-S source_server:target_server
-U source_user:target_user
-P source_password:target_password
-D source_database:target_database
-T source_table:target_table

If the colon is missing, the value applies to both servers.

You could also use ODBC-style connection strings. But I wouldn't suggest
that; it's too much like ODBC.

I would definitely not prompt for anything. No one will use that feature.
Command line options naturally supersede configuration file setting.

HTH.

--jkl




Archive powered by MHonArc 2.6.24.

Top of Page