Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2001-06-07
5
Medium Priority
?
527 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 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 800 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

On Demand Webinar: Networking for the Cloud Era

Did you know SD-WANs can improve network connectivity? Check out this webinar to learn how an SD-WAN simplified, one-click tool can help you migrate and manage data in the cloud.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Why is this different from all of the other step by step guides?  Because I make a living as a DBA and not as a writer and I lived through this experience. Defining the name: When I talk to people they say different names on this subject stuff l…
What if you have to shut down the entire Citrix infrastructure for hardware maintenance, software upgrades or "the unknown"? I developed this plan for "the unknown" and hope that it helps you as well. This article explains how to properly shut down …
Using examples as well as descriptions, and references to Books Online, show the different Recovery Models available in SQL Server and explain, as well as show how full, differential and transaction log backups are performed
Via a live example, show how to shrink a transaction log file down to a reasonable size.

718 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