Solved

DTS: Possible to reuse DSN info when creating DTS connection?

Posted on 2001-06-07
5
506 Views
Last Modified: 2013-11-30
Hi,

I'm using DTS to transfer data from Excel etc. to different MS SQL 2000 databases.
To create a new DTS connection to MSSQL you need to specify:
-DataSource(servername)
-Catalog(database name)
- UseTrustedConnection (NT authentication used)
- UserID
- Password
   
All these parameters are already present in my DSN (ODBC or OLEDB), and I only want this information in one place(the DSN). How can I reuse this information (either by telling DTS connection to use DSN or by getting the info from DSN and manually provide them to the DTS connection) ?

Any help would be appriciated.

Regards
Thomas Sorensen
0
Comment
Question by:tns1
  • 2
5 Comments
 
LVL 4

Expert Comment

by:Jeremy_D
ID: 6168121
In the DTS designer, choose "Other (ODBC Data Source)" as your destination (instead of "Microsoft OLE DB Provider for SQL Server"). You will then see a choice of existing system and user DSN's and be able to browse for a file DSN. If the username and password are stored in the DSN you should be able to connect using them by just leaving the username and password boxes in the "Choose a destination" dialog empty.
0
 

Author Comment

by:tns1
ID: 6168233
I'm using COM objects to access DTS programmatically, so I need to specify DSN or get info from DSN in my code.
0
 
LVL 4

Accepted Solution

by:
Jeremy_D earned 200 total points
ID: 6176277
I don't think you can specify a DSN for an SQL DMO connection, but you can find out the specific information if you know the name and type of the DSN.

You can find the DSN information in the following places:
- File DSNs: Directory {$ProgramFilesDir}\Common Files\ODBC\Data Sources\{$DataSourceName}.dsn
  These are simple text-files like an INI file which you can read using standard file IO.
- System DSNs: Registry key HKLM\Software\ODBC\ODBC.INI\{$DataSourceName}
- User DSNs: HKCU\Software\ODBC\ODBC.INI\{$DataSourceName}
  System and User DSNs can be read using standard registry access methods.
0
 

Expert Comment

by:CleanupPing
ID: 9282286
tns1:
This old question needs to be finalized -- accept an answer, split points, or get a refund.  For information on your options, please click here-> http:/help/closing.jsp#1
EXPERTS:
Post your closing recommendations!  No comment means you don't care.
0

Featured Post

Control application downtime with dependency maps

Visualize the interdependencies between application components better with Applications Manager's automated application discovery and dependency mapping feature. Resolve performance issues faster by quickly isolating problematic components.

Join & Write a Comment

Suggested Solutions

Let's review the features of new SQL Server 2012 (Denali CTP3). It listed as below: PERCENT_RANK(): PERCENT_RANK() function will returns the percentage value of rank of the values among its group. PERCENT_RANK() function value always in be…
JSON is being used more and more, besides XML, and you surely wanted to parse the data out into SQL instead of doing it in some Javascript. The below function in SQL Server can do the job for you, returning a quick table with the parsed data.
Familiarize people with the process of utilizing SQL Server functions from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Microsoft Ac…
Via a live example, show how to set up a backup for SQL Server using a Maintenance Plan and how to schedule the job into SQL Server Agent.

757 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

19 Experts available now in Live!

Get 1:1 Help Now