dbTalk Databases Forums  

Unable to retrieve SQL password

microsoft.public.sqlserver.dts microsoft.public.sqlserver.dts


Discuss Unable to retrieve SQL password in the microsoft.public.sqlserver.dts forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
cc
 
Posts: n/a

Default Unable to retrieve SQL password - 08-03-2004 , 05:03 PM






Hi there,

I have a custom DTS task that import an ETL file into a SQL database. Within the DTS package, I used the package object to retrieve the SQL connection, from which I retrieved the userID and password specified for SQL Authentication. I am getting a 'null' value for the password property. Is this a known issue? How do I work around it?

Thanks!

Reply With Quote
  #2  
Old   
Darren Green
 
Posts: n/a

Default Re: Unable to retrieve SQL password - 08-03-2004 , 05:21 PM






In message <35874FAF-309C-4A9A-A8F2-2EB81D9E13B9 (AT) microsoft (DOT) com>, cc
<cc (AT) discussions (DOT) microsoft.com> writes
Quote:
Hi there,

I have a custom DTS task that import an ETL file into a SQL database.
Within the DTS package, I used the package object to retrieve the SQL
connection, from which I retrieved the userID and password specified
for SQL Authentication. I am getting a 'null' value for the password
property. Is this a known issue? How do I work around it?

Thanks!
The password on a DTS connection object was made write-only some time
ago, somewhere around SQL 7.0 SP 2, +/- 1 SP, I forget which SP exactly
introduced that change. All in the name of security.

Workaround is to find another storage location for the (connection
details and) password. One I quite like is to the SQL-DMO registered
servers collection. Just setup the registrations in EM, and read them
off as required.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #3  
Old   
cc
 
Posts: n/a

Default Re: Unable to retrieve SQL password - 08-03-2004 , 06:33 PM



Hi Darren,

Thanks for confirming it!
I'm not familiar with SQL-DMO, but doesn't that just retrieves the available servers? Is the password that the user specified via the Connection (e.g. Microsoft OLE DB Provider for SQL Server...) property dialog be available too?

I would like to be able to maintain the legacy behavior of our custom DTS task, which is to have a connection set up before allowing the configuration of the custom task. During execution of the task, we retrieve the userID and password (if using SQL Authentication) to connect to the SQL database.

Would appreciate any guidance on this. Thanks!

"Darren Green" wrote:

Quote:
In message <35874FAF-309C-4A9A-A8F2-2EB81D9E13B9 (AT) microsoft (DOT) com>, cc
cc (AT) discussions (DOT) microsoft.com> writes
Hi there,

I have a custom DTS task that import an ETL file into a SQL database.
Within the DTS package, I used the package object to retrieve the SQL
connection, from which I retrieved the userID and password specified
for SQL Authentication. I am getting a 'null' value for the password
property. Is this a known issue? How do I work around it?

Thanks!

The password on a DTS connection object was made write-only some time
ago, somewhere around SQL 7.0 SP 2, +/- 1 SP, I forget which SP exactly
introduced that change. All in the name of security.

Workaround is to find another storage location for the (connection
details and) password. One I quite like is to the SQL-DMO registered
servers collection. Just setup the registrations in EM, and read them
off as required.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org



Reply With Quote
  #4  
Old   
Darren Green
 
Posts: n/a

Default Re: Unable to retrieve SQL password - 08-04-2004 , 02:49 AM



DMO Registered servers is distinct from DTS. It shows the lists of servers
registered in Enterprise Manager, but if set correctly it also has username
and passwords available. So it is a potential central storage location for
this information.

Any tasks that use connections now will need to change to use a new storage
location for this information, registered servers is just one option for
this location.


--
Darren Green
http://www.sqldts.com

"cc" <cc (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi Darren,

Thanks for confirming it!
I'm not familiar with SQL-DMO, but doesn't that just retrieves the
available servers? Is the password that the user specified via the
Connection (e.g. Microsoft OLE DB Provider for SQL Server...) property
dialog be available too?
Quote:
I would like to be able to maintain the legacy behavior of our custom DTS
task, which is to have a connection set up before allowing the configuration
of the custom task. During execution of the task, we retrieve the userID and
password (if using SQL Authentication) to connect to the SQL database.
Quote:
Would appreciate any guidance on this. Thanks!

"Darren Green" wrote:

In message <35874FAF-309C-4A9A-A8F2-2EB81D9E13B9 (AT) microsoft (DOT) com>, cc
cc (AT) discussions (DOT) microsoft.com> writes
Hi there,

I have a custom DTS task that import an ETL file into a SQL database.
Within the DTS package, I used the package object to retrieve the SQL
connection, from which I retrieved the userID and password specified
for SQL Authentication. I am getting a 'null' value for the password
property. Is this a known issue? How do I work around it?

Thanks!

The password on a DTS connection object was made write-only some time
ago, somewhere around SQL 7.0 SP 2, +/- 1 SP, I forget which SP exactly
introduced that change. All in the name of security.

Workaround is to find another storage location for the (connection
details and) password. One I quite like is to the SQL-DMO registered
servers collection. Just setup the registrations in EM, and read them
off as required.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org





Reply With Quote
  #5  
Old   
Darren Green
 
Posts: n/a

Default Re: Unable to retrieve SQL password - 08-19-2004 , 06:19 AM



Option Explicit

Main

Function Main()

Dim oApplication ' SQLDMO.Application
Dim oServerGroups ' SQLDMO.ServerGroups

Set oApplication = CreateObject("SQLDMO.Application")
Set oServerGroups = oApplication.ServerGroups

EnumerateServers oServerGroups
End Function

Function EnumerateServers(ByVal oServerGroups)
Dim oServerGroup ' SQLDMO.ServerGroup
Dim oRegisteredServer ' SQLDMO.RegisteredServer

For Each oServerGroup In oServerGroups
For Each oRegisteredServer In oServerGroup.RegisteredServers
MsgBox oRegisteredServer.Name
' Read off server properties, including username and password here!!!
Next
EnumerateServers oServerGroup.ServerGroups
Next
End Function



"cc" <cc (AT) discussions (DOT) microsoft.com> wrote

Quote:
Hi Darren,

2 questions:

1) How do I set up the DMO?
2) Does it list the username and password provided by the user via the
Connection dialog box, or does it list the username/password registered
under the servers?
Quote:
Thanks,

"Darren Green" wrote:

DMO Registered servers is distinct from DTS. It shows the lists of
servers
registered in Enterprise Manager, but if set correctly it also has
username
and passwords available. So it is a potential central storage location
for
this information.

Any tasks that use connections now will need to change to use a new
storage
location for this information, registered servers is just one option for
this location.


--
Darren Green
http://www.sqldts.com

"cc" <cc (AT) discussions (DOT) microsoft.com> wrote in message
news:090266C1-7BE5-42B8-A539-1305EE59CDC2 (AT) microsoft (DOT) com...
Hi Darren,

Thanks for confirming it!
I'm not familiar with SQL-DMO, but doesn't that just retrieves the
available servers? Is the password that the user specified via the
Connection (e.g. Microsoft OLE DB Provider for SQL Server...) property
dialog be available too?

I would like to be able to maintain the legacy behavior of our custom
DTS
task, which is to have a connection set up before allowing the
configuration
of the custom task. During execution of the task, we retrieve the userID
and
password (if using SQL Authentication) to connect to the SQL database.

Would appreciate any guidance on this. Thanks!

"Darren Green" wrote:

In message <35874FAF-309C-4A9A-A8F2-2EB81D9E13B9 (AT) microsoft (DOT) com>, cc
cc (AT) discussions (DOT) microsoft.com> writes
Hi there,

I have a custom DTS task that import an ETL file into a SQL
database.
Within the DTS package, I used the package object to retrieve the
SQL
connection, from which I retrieved the userID and password
specified
for SQL Authentication. I am getting a 'null' value for the
password
property. Is this a known issue? How do I work around it?

Thanks!

The password on a DTS connection object was made write-only some
time
ago, somewhere around SQL 7.0 SP 2, +/- 1 SP, I forget which SP
exactly
introduced that change. All in the name of security.

Workaround is to find another storage location for the (connection
details and) password. One I quite like is to the SQL-DMO registered
servers collection. Just setup the registrations in EM, and read
them
off as required.

--
Darren Green (SQL Server MVP)
DTS - http://www.sqldts.com

PASS - the definitive, global community for SQL Server professionals
http://www.sqlpass.org








Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.