Re: datacopy syntax

Frediano Ziglio <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <CAHt6W4dEkCm_c_-3jG-Y3YmjLi4frcB_BH5ky+Nvv5PTska04Q@mail.gmail.com>
2011/8/16  <[email protected]>:
> 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
_______________________________________________
FreeTDS mailing list
[email protected]
http://lists.ibiblio.org/mailman/listinfo/freetds
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.