Copy link to clipboard
Copied
I just copied a database on the development server which I am not owner of, but I have rights to the database. I copied it to my local server. Now I need to connect to the local database and I don't know how.
Dim MM_cnnName_STRING
MM_cnnName_STRING = "Provider=SQLOLEDB.1;Password=xxx;Persist Security Info=True;User ID=xxx;Initial Catalog=DBName;Data Source=DevComputerName"
The above is what I used to connect to the development server. How can I figure out the string for my local MS SQL Server
Copy link to clipboard
Copied
I thought I could change the Source attribute and the userame and password but that is not working.
Copy link to clipboard
Copied
Have you created the local DSN?
Copy link to clipboard
Copied
I dont know what that is exactly. I can see my database in ms sql server manager on my local machine. I thought I didn't need a dns connection so I didnt go that route. Hmm I am still trying to figure it out.
Copy link to clipboard
Copied
>I thought I didn't need a dns connection
You're right, you shouldn't. Is the server running on the default port?
Copy link to clipboard
Copied
You might also try setting the network library to tcp/ip:
http://support.microsoft.com/kb/238949
Copy link to clipboard
Copied
What I ended up doing is opening visual studio started a project and from the object
explorer i viewed the database and got the connection string from the properties tab. Finally! ugh.
Copy link to clipboard
Copied
Now I have this error once I try to bring up a page that calls the db
Microsoft OLE DB Provider for SQL Server error '80004005'
Login failed. The login is from an untrusted domain and cannot be used with Windows authentication.
/CourseList.asp, line 9
Copy link to clipboard
Copied
Is your connection string using the SSPI (Integrated Security=SSPI) ?
Copy link to clipboard
Copied
yes. This is what it is:
Dim MM_cnnTraining_STRING
MM_cnnTraining_STRING = "Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security Info=True;Initial Catalog=xxx;Data Source=xxx;Use Procedure for Prepare=1;Auto Translate=True;Packet Size=4096;Workstation ID=xxx;Use Encryption for Data=False;Tag with column collation when possible=False"
There's also a red x over the database in the server explorer now in Visual Studio.
Copy link to clipboard
Copied
Have you tried removing that entry (Integrated Security=SSPI) ?
Copy link to clipboard
Copied
I get this when I try to connect when that item removed:
Microsoft OLE DB Provider for SQL Server error '80040e4d'
Invalid authorization specification