Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

DBI, Sql Server, and Windows Security

25 views
Skip to first unread message

Brian Takita

unread,
May 2, 2005, 1:14:20 PM5/2/05
to
Hello,

Is is possible to use windows integrated security with the Sql Server
version of DBI?

I'd like to use an existing ORM such as ActiveRecord or Kansas with a
client application.
I'd rather not store the database login on the client machine.

If DBI does not support integrated security, is there another way to
keep the login hidden?

Thank you,
Brian Takita

Brian Takita

unread,
May 2, 2005, 3:36:51 PM5/2/05
to
> If DBI does not support integrated security, is there another way to
keep the login hidden?

There is a package named dbi-dbrc that obfusticates the login data.

I would still feel safer using Windows Authentication.

Would it be feasible for DBI to allow a way to accept custom connection
strings?
This would allow DBI to use database features that are not immediately
generated by DBI.

Michael Neumann

unread,
May 2, 2005, 4:49:22 PM5/2/05
to
Am Monday 02 May 2005 21:39 schrieb Brian Takita:
> > If DBI does not support integrated security, is there another way to
>
> keep the login hidden?
>
> There is a package named dbi-dbrc that obfusticates the login data.
>
> I would still feel safer using Windows Authentication.
>
> Would it be feasible for DBI to allow a way to accept custom connection
> strings?

I don't understand this. Can you explain?

> This would allow DBI to use database features that are not immediately
> generated by DBI.

Regards,

Michael


Brian Takita

unread,
May 2, 2005, 5:45:38 PM5/2/05
to
Oops...

It looks like you can pass a custom connection string to DBI.

The following connection string works:

dbh = DBI.connect(DBI:ADO:Provider=SQLOLEDB;Data Source=SERVER;Initial
Catalog=DATABASE;Integrated Security=SSPI;)

I was thrown off by the userid and password arguments.
I'm sorry to trouble you and thanks for responding.

Shashank Date

unread,
May 2, 2005, 6:14:40 PM5/2/05
to
Hi Brian,

--- Brian Takita <brian....@gmail.com> wrote:
> I would still feel safer using Windows
> Authentication.

I was able to make this work (assuming you have
installed dbi-ado):

#################
require 'dbi'

DBI.available_drivers.each { |driver|
puts 'Driver: ' + driver
if((driver =~ /ADO/) or (driver =~ /ODBC/))
DBI.data_sources(driver).each { |dsn|
puts "\tDatasource: " + dsn
}
end
}

URL = 'dbi:ADO:Provider=SQLOLEDB;Data
Source=P11;Initial
Catalog=master;Trusted_Connection=yes'
dbh = DBI.connect(URL)

__END__
#################

> Would it be feasible for DBI to allow a way to
> accept custom connection
> strings?

I believe it does ... see the URL constant definition
in my code above. Isn't that a custom connection
string?

> This would allow DBI to use database features that
> are not immediately
> generated by DBI.

HTH,
-- shanko

__________________________________________________
Do You Yahoo!?
Tired of spam? Yahoo! Mail has the best spam protection around
http://mail.yahoo.com


0 new messages