Showing posts with label dsn. Show all posts
Showing posts with label dsn. Show all posts

Tuesday, March 20, 2012

creating system dsn to SQL server 2000 Sp 4 fails

Hi,

I hope someone can help me out here? I have a fresh install of SQL Server 2000 (standard edition - sp4), on a server running Windows 2003 SE (v 5.2.3790). I am trying to create a system dsn on my client pc (running Windows 2000) to a newly created database in SQL server called BLISS.

I am getting the following error message:

Connection failed:

SQL State :'01000'

SQL Server Error: 11001

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open (Connect()).

Connection Failed:

SQL State :'08001'

SQL Server Error: 6

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL server not found.

From support.microsft.com I have tried changing the TCPPort value to 0, but this has not helped. Does anyone have any further ideas please?

Jackie

Which protocols are enabled? Have you tried running cliconfg.exe?|||

Hi Anton,

I have looked at cliconfg.exe and have enabled TCP/IP and named pipes for genera connections. Both were already enabled for connections to this SQL Server installation.

Another thought is that the connection works top a server running SQL Server 2k sp 3a, but not to this server running SQL Server 2k sp4. Perhaps I should just reinstall and put sp3a on instead?

Jackie

|||Have you already exhausted all the possibilities mentioned in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1

creating system dsn to SQL server 2000 Sp 4 fails

Hi,

I hope someone can help me out here? I have a fresh install of SQL Server 2000 (standard edition - sp4), on a server running Windows 2003 SE (v 5.2.3790). I am trying to create a system dsn on my client pc (running Windows 2000) to a newly created database in SQL server called BLISS.

I am getting the following error message:

Connection failed:

SQL State :'01000'

SQL Server Error: 11001

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Connection Open (Connect()).

Connection Failed:

SQL State :'08001'

SQL Server Error: 6

[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]Specified SQL server not found.

From support.microsft.com I have tried changing the TCPPort value to 0, but this has not helped. Does anyone have any further ideas please?

Jackie

Which protocols are enabled? Have you tried running cliconfg.exe?|||

Hi Anton,

I have looked at cliconfg.exe and have enabled TCP/IP and named pipes for genera connections. Both were already enabled for connections to this SQL Server installation.

Another thought is that the connection works top a server running SQL Server 2k sp 3a, but not to this server running SQL Server 2k sp4. Perhaps I should just reinstall and put sp3a on instead?

Jackie

|||Have you already exhausted all the possibilities mentioned in http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=362498&SiteID=1sql

Creating System DSN on Vista Box

We are trying to create System DSN on vista using the API
SQLConfigDataSource(...) it give error Access denied.
Can any one help? This is going very critical every hour.
Thanks in anticipation,
Cheers,
Madhav
Try changing the security context to administrator when
creating the DSN.
-Sue
On 16 Feb 2007 02:55:28 -0800, mlimaye@.gmail.com wrote:

>We are trying to create System DSN on vista using the API
>SQLConfigDataSource(...) it give error Access denied.
>Can any one help? This is going very critical every hour.
>Thanks in anticipation,
>Cheers,
>Madhav

Creating System DSN on Vista Box

We are trying to create System DSN on vista using the API
SQLConfigDataSource(...) it give error Access denied.
Can any one help? This is going very critical every hour.
Thanks in anticipation,
Cheers,
MadhavTry changing the security context to administrator when
creating the DSN.
-Sue
On 16 Feb 2007 02:55:28 -0800, mlimaye@.gmail.com wrote:

>We are trying to create System DSN on vista using the API
>SQLConfigDataSource(...) it give error Access denied.
>Can any one help? This is going very critical every hour.
>Thanks in anticipation,
>Cheers,
>Madhav

Wednesday, March 7, 2012

Creating odbc dsn's

I'm like to create some sql server odbc dsn's by using a script.
does anybody know if can this be done,,,What type of Script are you referring to?
Rand
This posting is provided "as is" with no warranties and confers no rights.|||Here's a simple script that I've used to create ODBC DSN's for SQL Server
OPTION EXPLICIT
Dim sDSN
Dim sDB
Dim sDescription
Dim sDriverDLL
Dim sDriverName
Dim sSQLServer
Dim sRegPath
Dim oFSO
Dim oSystemFolder
Dim sSystemFolderPath
DIM oWshShell
Const cSystemFolder = 1
Set oFSO = wscript.CreateObject("Scripting.FileSystemObject")
Set oSystemFolder = oFSO.GetSpecialFolder(cSystemFolder)
sSystemFolderPath = oSystemFolder.Path
sDSN = "MyDSN3"
sDB = "pubs"
sDescription = "My New Data Source"
sDriverDLL = sSystemFolderPath & "\sqlsrv32.dll"
sSQLServer = "MySQLServer"
sDriverName = "SQL Server"
Set oWshShell = WScript.CreateObject("WScript.Shell")
sRegPath = "HKLM\SOFTWARE\ODBC\ODBC.INI\" & sDSN & "\"
oWshShell.RegWrite sRegPath , ""
oWshShell.RegWrite sRegPath & "Database" , sDB
oWshShell.RegWrite sRegPath & "Description" , sDescription
oWshShell.RegWrite sRegPath & "Driver" , sDriverDLL
oWshShell.RegWrite sRegPath & "Server" , sSQLServer
oWshShell.RegWrite sRegPath & "Trusted_connection" , "Yes"
oWshShell.RegWrite "HKLM\SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources\" & sDSN ,
sDriverName
wscript.Quit
Mike O.
"Sean" <myocard@.hotmail.com> wrote in message
news:C3LKb.4111$9k7.91187@.news.xtra.co.nz...
quote:

> I'm like to create some sql server odbc dsn's by using a script.
> does anybody know if can this be done,,,
>
>

Tuesday, February 14, 2012

Creating Data Sources (ODBC) via code

Hi
I need to create a User DSN based on SQL Server driver under Data Sources
(ODBC). As I need to do it on multiple PCs, is there a script or another
automated way to do this quickly?
Thanks
RegardsHi John,
This looks good:
http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1110.mspx
For remote PC's you will need to use a UNC path and run the script with an
account that is also valid administrative account on your remote PC's.
CreateWindow
http://justldap.com
"John" <John@.nospam.infovis.co.uk> wrote in message
news:Oc0bPegiHHA.680@.TK2MSFTNGP06.phx.gbl...
> Hi
> I need to create a User DSN based on SQL Server driver under Data Sources
> (ODBC). As I need to do it on multiple PCs, is there a script or another
> automated way to do this quickly?
> Thanks
> Regards
>|||Hi
Many Thanks. Looks good. Just one thing, how do I add the username and
password for SQL Server authentication?
Thanks again
Regards
Const HKEY_LOCAL_MACHINE = &H80000002
strComputer = "."
Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
strComputer & "\root\default:StdRegProv")
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
strValueName = "My SQL Server"
strValue = "SQL Server"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
strValueName = "Database"
strValue = "My Database"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Driver"
strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Server"
strValue = "111.111.111.111"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
strValueName = "Trusted_Connection"
strValue = "No"
objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
"CreateWindow" <createwindow@.gmail.com> wrote in message
news:MbadnZsaYPcSmqnbnZ2dneKdnZydnZ2d@.giganews.com...
> Hi John,
> This looks good:
> http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1110.mspx
> For remote PC's you will need to use a UNC path and run the script with an
> account that is also valid administrative account on your remote PC's.
> CreateWindow
> http://justldap.com
>
>
> "John" <John@.nospam.infovis.co.uk> wrote in message
> news:Oc0bPegiHHA.680@.TK2MSFTNGP06.phx.gbl...
>> Hi
>> I need to create a User DSN based on SQL Server driver under Data Sources
>> (ODBC). As I need to do it on multiple PCs, is there a script or another
>> automated way to do this quickly?
>> Thanks
>> Regards
>>
>|||You can use Reg_Sz string for "LastUser" but you can't store the password in
the registry.
--
Regards,
Dave Patrick ...Please no email replies - reply in newsgroup.
Microsoft Certified Professional
Microsoft MVP [Windows]
http://www.microsoft.com/protect
"John" wrote:
> Hi
> Many Thanks. Looks good. Just one thing, how do I add the username and
> password for SQL Server authentication?
> Thanks again
> Regards
>
> Const HKEY_LOCAL_MACHINE = &H80000002
> strComputer = "."
> Set objReg=GetObject("winmgmts:{impersonationLevel=impersonate}!\\" & _
> strComputer & "\root\default:StdRegProv")
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\ODBC Data Sources"
> strValueName = "My SQL Server"
> strValue = "SQL Server"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> objReg.CreateKey HKEY_LOCAL_MACHINE,strKeyPath
> strKeyPath = "SOFTWARE\ODBC\ODBC.INI\My SQL Server"
> strValueName = "Database"
> strValue = "My Database"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Driver"
> strValue = "C:\WINDOWS\System32\SQLSRV32.dll"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Server"
> strValue = "111.111.111.111"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
> strValueName = "Trusted_Connection"
> strValue = "No"
> objReg.SetStringValue HKEY_LOCAL_MACHINE,strKeyPath,strValueName,strValue
>
> "CreateWindow" <createwindow@.gmail.com> wrote in message
> news:MbadnZsaYPcSmqnbnZ2dneKdnZydnZ2d@.giganews.com...
>> Hi John,
>> This looks good:
>> http://www.microsoft.com/technet/scriptcenter/resources/qanda/nov04/hey1110.mspx
>> For remote PC's you will need to use a UNC path and run the script with
>> an account that is also valid administrative account on your remote PC's.
>> CreateWindow
>> http://justldap.com
>>
>>
>> "John" <John@.nospam.infovis.co.uk> wrote in message
>> news:Oc0bPegiHHA.680@.TK2MSFTNGP06.phx.gbl...
>> Hi
>> I need to create a User DSN based on SQL Server driver under Data
>> Sources (ODBC). As I need to do it on multiple PCs, is there a script or
>> another automated way to do this quickly?
>> Thanks
>> Regards
>>
>>
>