Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2009-07-22 : 13:23:20
|
| I am sure I am posting this to the wrong section of this forum.My question is related to SQL Server 2005 and Classic ASP.I can't seem to connect to our prod db using the below code.<%set cn=server.createobject("ADODB.Connection")cn.provider = "sqloledb"provstr = "server=myserver;Database=SysProd;UID=abc;PWD=def;"cn.open ProvStr%>If I change the database(SysProd) to point to our dev system (SysDev), I am able to connect.At first I though this was related to user security. I am now not sure. As far as I can tell, the security is configured the same on each database for the user. Could there be a setting at the database level that I am not looking at which would prevent connecting via Classic ASP?Hope this makes sense.... |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2009-07-22 : 13:34:47
|
| did you change the name of the server "myserver" to the neame of the remote server ? |
 |
|
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2009-07-22 : 13:40:28
|
| myserver was changed to the actual server name. This works when connecting to our test database using a valid user name.The problem is when I connect to the prod database which is on the same server using ANY user name (including admins). I was wondering if there is some sort of high end configuration that would be preventing the users from connecting.One of our developers recently ported our databases onto a new server. This server is the one giving us the issues. As far as I tell security, tables, etc were migrated over correctly. |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-07-22 : 13:48:25
|
| [code]Dim strConnDim cnstrConn = "Provider=SQLNCLI.1;Persist Security Info=False;Initial Catalog=dbName;Data Source=serverNameOrIP;UID=abc;PWD=def"Set cn = Server.CreateObject("ADODB.Connection")cn.Open strConn[/code] |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-07-22 : 13:53:47
|
orstrConn = "Provider=SQLOLEDB.1;Password=def;Persist Security Info=True;User ID=abc;Initial Catalog=dbName;Data Source=serverNameOrIP" you aren't in Indiana by any chance are you qman? |
 |
|
|
qman
Constraint Violating Yak Guru
442 Posts |
Posted - 2009-07-22 : 14:11:32
|
| The connection string do not seem to be the issue. I am able to use either of these connection string without issues. Just as long as I connect to the dev db rather than the prod db. I am leaning on there being some global security issue for the prod db. Russell, not Indiana.... |
 |
|
|
russell
Pyro-ma-ni-yak
5072 Posts |
Posted - 2009-07-22 : 14:19:33
|
is new server set to allow remote connections?using valid user account?new server allows sql authentication?can u connect with domain credentials via SSMS?asked about indy because i have a friend goes by name of qman on different forum... |
 |
|
|
afrika
Master Smack Fu Yak Hacker
2706 Posts |
Posted - 2009-07-22 : 18:36:15
|
| did u enable tcp/ip and remote connections in sql 2005 ? |
 |
|
|
|
|
|