Skip to Content.
Sympa Menu

freetds - Re: [freetds] datacopy syntax

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] datacopy syntax
  • Date: Wed, 17 Aug 2011 09:26:50 +0200

2011/8/16 <jklowden AT schemamania.org>:
> I would like to let our "datacopy" utility use Kerberos, but the parameter
> syntax makes it awkward.  I propose to change the syntax.  I'd like
> feedback.
>
> Also, datacopy connects to two different servers.  I don't know of a way to
> use two Kerberos accounts, should that be needed.  Suggestions?
>
> The current parameters are:
>
>        [-S server/username/password/database/table_or_view]
>        [-D server/username/password/database/table]
>
> You see the problem immediately: how to omit the username & password?
>

Use strsep instead of strtok and pass empty strings like

-S my_server///my_db/my_table

> I propose to change the syntax to emulate a URL:
>
>        -S [username[:passwd]@][dbname.][schema.]tablename
>
> This would be more similar to our other utilities, and would permit
> everything
> except the tablename to be omitted.  It would, however break existing
> scripts.
>

why not using another parameter like --source to avoid clash?

> I don't want to do what someone will inevitably suggest: allow both.  If
> you want both and want to implement both, OK, we can discuss it.  Otherwise,
> the complexity would be hard to document and harder to understand.
>
> Would this change negatively affect your organization?  Would a little Perl
> script transforming the above be of any use?  Do you think the proposal
> is a step in the right direction?
>
> --jkl
>

Frediano




Archive powered by MHonArc 2.6.24.

Top of Page