| | |
MSSQL connection strings
Please support our MS SQL advertiser: PostgreSQL or MySQL? Compare and contrast the two most popular open source databases
![]() |
•
•
Join Date: Jul 2006
Posts: 22
Reputation:
Solved Threads: 0
Hi,
I am using MSSQL (Microsoft SQL)to liase with python via third party driver.
Well here goes...
I have created two instances of SQL registration in my Enterprise manager. It is under
i)Console Root->Microsoft SQL Servers->SQL Server Group->(LOCAL)(Windows NT) and
ii)Console Root->Microsoft SQL Servers->SQL Server Group-> INTEL\FR6EnterpriseDB (Windows NT)
Btw INTEL is the name of my computer..
So in fact both of them are in localhost...
Here's the problem...
db=MSSQL.connect('localhost','sa','','FirstDBase') ..there's no problem and the database access is successful in the first case.
but I am not sure on how to access the database in the second instance
db=MSSQL.connect('193.168.1.111','sa','','SecondDbase') and in this case the used IP is the one I got when ipconfig at the cmd prompt.
The error occurs and dbopen('193.168.1.111') fails. I have tried other names like 'localhost' and '127.0.0.1'.
A million thanks to anyone who can guide me in the right direction.
I am using MSSQL (Microsoft SQL)to liase with python via third party driver.
Well here goes...
I have created two instances of SQL registration in my Enterprise manager. It is under
i)Console Root->Microsoft SQL Servers->SQL Server Group->(LOCAL)(Windows NT) and
ii)Console Root->Microsoft SQL Servers->SQL Server Group-> INTEL\FR6EnterpriseDB (Windows NT)
Btw INTEL is the name of my computer..
So in fact both of them are in localhost...
Here's the problem...
db=MSSQL.connect('localhost','sa','','FirstDBase') ..there's no problem and the database access is successful in the first case.
but I am not sure on how to access the database in the second instance
db=MSSQL.connect('193.168.1.111','sa','','SecondDbase') and in this case the used IP is the one I got when ipconfig at the cmd prompt.
The error occurs and dbopen('193.168.1.111') fails. I have tried other names like 'localhost' and '127.0.0.1'.
A million thanks to anyone who can guide me in the right direction.
db=MSSQL.connect('INTEL\FR6EnterpriseDB','sa','','SecondDBase')
try this, I'm an ADO user so not sure about Python, but the theory should be the same.
You see both databases are listening on that IP address 193.168.1.111, which is synonymouse with 'INTEL', the only way to differentiate is that the server with no name is the default and the other is called 'FR6EnterpriseDB' so when connecting if you don;t differentiate in your string it will try to find 'SecondDBase' in the default server and of course it's not there so it fails.
try this, I'm an ADO user so not sure about Python, but the theory should be the same.
You see both databases are listening on that IP address 193.168.1.111, which is synonymouse with 'INTEL', the only way to differentiate is that the server with no name is the default and the other is called 'FR6EnterpriseDB' so when connecting if you don;t differentiate in your string it will try to find 'SecondDBase' in the default server and of course it's not there so it fails.
•
•
Join Date: Jul 2006
Posts: 22
Reputation:
Solved Threads: 0
•
•
•
•
Originally Posted by hollystyles
db=MSSQL.connect('INTEL\FR6EnterpriseDB','sa','','SecondDBase')
try this, I'm an ADO user so not sure about Python, but the theory should be the same.
You see both databases are listening on that IP address 193.168.1.111, which is synonymouse with 'INTEL', the only way to differentiate is that the server with no name is the default and the other is called 'FR6EnterpriseDB' so when connecting if you don;t differentiate in your string it will try to find 'SecondDBase' in the default server and of course it's not there so it fails.
Your above solution werks..I am hosting to the database and my collegue running on Linux has prob connecting. He can connect to the 193.168.1.111 but not to the one with the '193.168.1.111\FR6Enterprise' .
I am gratefull if anyone knoes what the problem is...Or is that Linux doesnt support the anyting else other than the default instance.
Thanks in advance.
![]() |
Similar Threads
- ASP to MsSQL (ASP)
- HELP - Invalid object error related to sqlole null bug in MSSQL 2000 (MS SQL)
- connection to a remote database (Visual Basic 4 / 5 / 6)
- Proper Oracle connection syntax (VB.NET)
- sql server connection (ASP)
Other Threads in the MS SQL Forum
- Previous Thread: UpdateCommand does not work
- Next Thread: Min function
Views: 7286 | Replies: 4
| Thread Tools | Search this Thread |
Tag cloud for MS SQL
"last age autogrowth business connectingtodatabaseinuse count cursor data database dateadd datediff datepart day" dbsize deadlock delete_trigger exploit getdate hack highperformancecomputing hpc hpcserver2008 ibm iis limit live loop maximum microsoft ms mssql multiple multithreading news number password permission position query reporting result security server services sets single source sql sql-injection sqlserver sqlserver2005 subtype supercomputing supertype tables uniqueid update view weekday






