March 15, 2004 at 2:25 pm
Does anyone know of a command line utility to create a system ODBC data source? I want to include it in a "installation program" that would be run as part of a effort to upsize a Access database on a file share to use linked tables to SQL Server.
March 15, 2004 at 2:29 pm
March 15, 2004 at 2:48 pm
I launch a *.reg file with the information in it. Below is a sample for Windows 2000. It adds in the name and the ODBC entry of a SQL Database. I make my ODBC connections the same name as my database, but you do not have to. I placed an* where it is optional to use the database name as the ODBC name.
Windows Registry Editor Version 5.00
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\database_name*]
"Driver" = "C:\\WINNT\\System32\\SQLSRV32.dll"
"Server" = "server1"
"Database" = "database_name"
"Trusted_Connection" = "Yes"
[HKEY_LOCAL_MACHINE\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources]
"database_name*"="SQL Server"
Michelle
March 16, 2004 at 7:03 am
There is a command line utility in the System32 directory called odbcconf.exe. Typing odbcconf /h in a command window will popup the utilities options. An example to create a system DSN for a SQL Server database would be:
ODBCCONF CONFIGSYSDSN "SQL Server" "DSN=MyODBC | Description=My connection to my database | SERVER=MyServer | Database=MyDatabase"
Kemp
March 17, 2004 at 2:16 pm
Found the ODBCCONF very helpful. but can not find the parameter for SQL DSN to create it as a trusted connection ?
April 6, 2004 at 9:04 am
Here is the command that ended up working for me. I put it all on one line in bat file. I was even able to email it to a remote user and she ran it herself. I ran it with admin rights, but I do not know if it was required.
ODBCCONF.exe CONFIGSYSDSN "SQL Server" "DSN=dsGiftTracking | Description=Gift Tracking Data Source | SERVER=sqlserver01 | Trusted_Connection=Yes | Database=dbGiftTracking"
September 13, 2007 at 12:42 pm
How would you code and ID and PW SQL server Authentication?
Viewing 8 posts - 1 through 8 (of 8 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy