freetds AT lists.ibiblio.org
Subject: FreeTDS Development Group
List archive
- From: Konrad J Hambrick <konrad AT payplus.com>
- Cc: FreeTDS Development Group <freetds AT lists.ibiblio.org>
- Subject: Re: [freetds] Using DBLIB With Azure
- Date: Fri, 11 Mar 2011 05:21:23 -0600
Ken Collins wrote, On 03/09/2011 04:28 PM:
This? http://www.sqsh.org/
Can you give me some context? How will this help me?
Ken --
The default DB can be set in the per-user .sqshrc config file.
Here's mine:
##################################################
[konrad@kjhlt5 utl]$ cat ~/.sqshrc
\set DSQUERY='Win2k3'
\set datetime='%Y-%m-%d %H:%M:%S'
\set date='%Y-%m-%d'
\set time='%H:%M:%S'
\set database='ppdf'
\set username="$TarUser"
\set password="$TarPass"
\set style='bcp'
\set bcp_rowsep=''
\set banner=0
####################################################
I set the Host, Default DB as well as the username and password
in my ~/.sqshrc file.
Sounded similar to setting a default DB in freetds.conf.
You might also see how it works in the sqsh code.
-- kjh
On Mar 9, 2011, at 3:02 PM, Konrad J Hambrick wrote:
Ken Collins wrote, On 03/09/2011 12:26 PM:
So I am testing TinyTDS with Azure and I am close. I have 0.83.dev installed
with OpenSSL and can connect with tsql.
$ tsql -S azure -U tinytds@abc -P password -D tinytdstest
But I am having an issue with figuring out a way to use a database setting. I know that
Azure does not have a notion of "USE ..." or has a way to specify a default
database with the user account, so I was let with reverse engineering how tsql
accomplishes a connection using the -D option and I am left stumped as to how I can get
TDSCONNECTION's database string in there. FYI, TinyTDS only uses sybdb.h and
sqlfront.h, so some things that tsql is doing is not a public API. Perhaps there is
something that can be done for this?
I had hoped that putting a database in my freetds.conf would help. For
instance.
[azure]
host = abc.database.windows.net
port = 1433
tds version = 8.0
database = tinytdstest
Since I assumed that this would populate the struct for me. It may just be doing that,
but because of login.c (around line 430) never has db_selected to false for high TDS
versions? Maybe this is not the right spot too since it ultimately does a "USE
" too. I guess the question is, how does tsql work and how can I help make DBLIB
work too?
Ken --
Have you looked at sqsh ?
-
[freetds] Using DBLIB With Azure,
Ken Collins, 03/09/2011
-
Re: [freetds] Using DBLIB With Azure,
Konrad J Hambrick, 03/09/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/09/2011
-
Re: [freetds] Using DBLIB With Azure,
Konrad J Hambrick, 03/11/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/11/2011
-
Re: [freetds] Using DBLIB With Azure,
Konrad J Hambrick, 03/11/2011
- Re: [freetds] Using DBLIB With Azure, Ken Collins, 03/11/2011
-
Re: [freetds] Using DBLIB With Azure,
Konrad J Hambrick, 03/11/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/11/2011
-
Re: [freetds] Using DBLIB With Azure,
Konrad J Hambrick, 03/11/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/09/2011
-
Re: [freetds] Using DBLIB With Azure,
jklowden, 03/10/2011
- Re: [freetds] Using DBLIB With Azure, Ken Collins, 03/10/2011
-
Re: [freetds] Using DBLIB With Azure,
James K. Lowden, 03/12/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/22/2011
-
Re: [freetds] Using DBLIB With Azure,
James K. Lowden, 03/22/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/23/2011
- Re: [freetds] Using DBLIB With Azure, James K. Lowden, 03/24/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/23/2011
-
Re: [freetds] Using DBLIB With Azure,
James K. Lowden, 03/22/2011
-
Re: [freetds] Using DBLIB With Azure,
Ken Collins, 03/22/2011
-
Re: [freetds] Using DBLIB With Azure,
Konrad J Hambrick, 03/09/2011
Archive powered by MHonArc 2.6.24.