Windows 7 64 Bit - ODBC32 - Legacy App Problem - sql

Good day StackOverFlowlers,
I´m a little stuck (really stuck) with an issue with a legacy application on my organization.
I have a Windows 7 Enterprise 64 Bit machine, Access 2000 Installed and the Legacy App (Is built with something like VB but older) The App uses System ODBC in order to connect to a SQL 2000 DataBase on a Remote Server.
I created the ODCB using C:\Windows\SysWOW64\odbcad32.exe app in order to create a System DSN. I did not use the Windows 7 because it is not visible to the Legacy App.
I tested the ODBC connection with Access and worked ok, I can access the remote database.
Then I run the legacy App as Administrator and the App can see the ODBC, but I´m getting errors on credential validation and I´m getting this error:
DIAG [08001] [Microsoft][ODBC SQL Server Driver][Multi-Protocol]SQL Server does not exist or access denied. (17)
DIAG [01000] [Microsoft][ODBC SQL Server Driver][Multi-Protocol]ConnectionOpen (Connect()). (53)
DIAG [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed (0)
I use Trusted Connection on the ODBC in order to validate the user by Domain Controller.
I think that the credentials are not being sent by the Legacy App to the ODBC, or something like that. I don´t have the source code of the Legacy App in order to debug the connection.
Also, I turned off the Firewall.
Any ideas??
Thanks in advance!

When you run it as administrator is it your same account elevated or is it a second account all together?
Try running Access 2000 under that same method and see if it can still access the database. You can also check the SQL server logs to see who the app is trying to authenticate as. This should help you identity where to start looking.

Related

Unable to connect to a migrated Access database on SQL Server as another user: SQL server Error 4060

I have an Access DB that I migrated to SQL server recently. The SQL server is on a Windows server. Now I can work normally with the SQL database but when others log into the same windows server with their credentials they are not able to access the database. As soon as they open Access frontend they get an error saying failed connection. Now I created an ODBC connection string(File DNS) and gave it to the other users in the network but they still are not able to connect to the database. They get an error stating "SQL server connection failed. The server rejected the connection: Access to the selected database has been denied". Can someone please help me to solve this issue so that multiple users can connect to the SQL DB without any issues? Thanks
Hard to know with the limited information. Are you using windows authentication to sql server, or are you using SQL logons? Either should work fine. The other issue to watch out for is what sql driver did you use to link with?
If you link say using the native 17 ODBC driver, then that is not installed on workstations by default - you have to download and install that driver.
Or, maybe you linked using the long time "legacy" sql driver - that is by default installed on all workstations.
So, it not clear if you using SQL logons, or using Windows authentication for the connection to the database????
If your using windows authentication, then all those other users will require permissions to be granted to the database.
If you using a SQL logon, then that logon would have been saved when you link the table(s), and again it should work for all users. Its quite common to create ONE logon on SQL server, link using that logon, and thus all users will be connecting to the database using the one same logon id/password.
And, if you linked using a FILE dsn, then zero configeration should be required, since access converts FILE dsn's into what are called dsn-less connections. (the origonal file is not required anymore once you link - you can even delete that FILE dsn, and it will still work).
So, FILE dsn is the best choice, since that dsn is NOT required to be setup on each workstation.
And if you using sql logon's, then make sure you checked the box to remember the password during linking of the tables. That is this check box:
And note during a re-link the above box does not appear - only on first time linking of table(s).

SQL error SQLState 08001 from MS Access 2010 runtime 32bit

My Problem is that I cannot connect to an SQL Server Express 2008 64bit Database via an Access Runtime 32bit, neither by Windows authentification nor by SQL auth.
On the Windows 2011 Small Business Server runs a Virtual machine with Windows 7 Prof. 32 bit. From this Windows I tested my Access App. using a (32bit) SQL Driver 11, which works fine.
The same Access App used from a 64 bit Windows 7 Prof. Client using a 64bit SQL Driver 11 fails with SQLState 08001 error.
The Thing which I do not understand is, that ODBC Connection test is successful, a data link (UDL) is successful, but not my Access App.
When starting the app, the first Thing is to run a stored procedure through a passthrougquery and grab data from a certain tbl in the SQL-Database. This SP brings the Connection error, but not an runtime error from Access (I removed even an error handler!).
So, how can I find the reason or any error in the Access app (if there is one)?
I am helpless as anything I know to test or to do I already tried out to make the app run. As I cannot even install the SQL Driver 11 in 32bit, it should not be a Driver related error.
Does anyone know a test-app, where I cannot only connect but retrieve data from an SQL-Database or any other tricks to check the Access to the database?
Thanks your help!
Access usually is installed as a 32bit Application. So on 64bit computers it will use the 32bit subsystem. On Windows 7 all the default shortcuts to the ODBC Data Source Administrator utility will lead to the 64bit version of it. Whatever you see or configure there is completely irrelevant, as your 32bit Access is not going to see it.
Solution:
You need to explicitely open the 32bit version of the ODBC Admin utility and configure the data source there.
To make sure you get the right version, use Windows Explorer and open this file: C:\WINDOWS\syswow64\odbcad32.exe
Well, what I found out meanwhile is, that the Connection Fails when trying to use a Connection like this "ODBC; DSN=MyDSN;....." but it works, when I make a Connection DNS-less, by connecting with "ODBC;DRIVER=SQL Server Native Client 11; SErver=myServer;....".
Maybe this is exactly that what you are talking aout. When I just use a DSN it takes the wrong bit Version.
So I will try this: delete the DSN I have, open odbcad32.exe and create the same DSN again.
If I understand you correct, then Win 7 provides the correct Driver and stores it in the DSN. Calling this DSN by Access would lead to the correct Settings.
Further Problem is, that my SSQL-Server instance is not at port 1434, and the SQL Server Native Client 11 Driver has no more Clientconfiguartion to set the static port. So I found a string solution for that "MyServer\Myinstance, 15999".
I hope that this port Setting will be accepted in the DSN, otherwise I really have to Change to DSN-less which is more complicated due to different Servers for the development and the production.
Thanks yr. reply.

SQL server Login Fail for user 'ROMANCH9326/romanch'

I installed SQL server 2012 developer addition.
My windows is working on Parallel Access installed on MAC.
When I tried opening SQL server, It initiated a call to connect to server. And when I clicked on connect it gave me error.
I've never installed SQL server 2012 in my personal PC. WHen I was installing I chose Windows authentication mode and user ROMANCH9326 came out automatically.
Please help me, I'm clueless about this problem.
TITLE: Connect to Server
Cannot connect to ROMANCH9326.
ADDITIONAL INFORMATION:
Login failed for user 'ROMANCH9326\romanch'. (Microsoft SQL Server, Error: 18456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
On Start > Search type "sql configuration"
Open SQL Configuration Manager
SQL Server Network Configuration >Protocols for [SQLINSTANCENAME]
Check if Named Pipes is enabled, enable it if not.
Restart your SQL Server Instance.
Well This is a pretty silly solution but when I tried repair function on SQL server it said that my Database Engine libraries were not installed properly somehow.
So I reinstalled the software and now it worked just fine. I was able to log in.
Thanks :)

getting ODBC Sql Sever Driver DBNETLIB Invalid Connection error

i am working on vb.net windows application, it included vb6 reporting application exe also,for this application i am using SQL Server,In my working system it is working good. I have installed EXE in client system ,Some times in some systems i am getting this error like :
[Microsoft][ODBC SQL Server Driver][DBNETLIB] Invalid connection
any one please give me the suggestion on what i have to do.

SQL Server 2008 R2 First Time Login

I've just started work on a new computer in which I had to download all the software fresh.
I've just download a copy of SQL Server 2008 R2, and I'm trying to connect to SQL Server Management Studio without success. I vaguely remember last time I installed this, it asked me to choose between windows, or sql server authentication, however this didn't happen for this installation.
If I try to login via Windows Authentication (where the username and password fields are greyed out, localhost as server name) it gives the following error:
"A Network-related or instance
specific error occured while
establishing a connection to SQL
Server. The server was not found or
was not accessible. Verify that the
instance name is correct and that SQL
Server is configured to allow remote
connections. (provider: Named Pipes
Provider, error: 40 - Could not open a
connection to SQL Server) (Microsoft
SQL Server, Error: 2)"
I have checked everything in SQL Server Configuration Manager, and everything bar VIA is enabled.
If I try SQL Server Authentication, It asks me for a username and password which I definiately have not set yet. Also, under SQL Server Services in configuration manager, there is nothing there.
Any help would be appreciated :)
Thanks
PS: I don't know if it's worth mentioning but I am running Windows 7 as a virtual machine on a Mac.
Are you sure you have the correct instance name? If it was SQL Server 2008 R2 Express Edition then the default instance name is .\SQLEXPRESS.
Also if your using sql authentication to connect try running sql management studio as admin, if you are a limited user your identity might not be mapped to an account in sql server yet but i believe the Administrators user group is.
You need to check if your services are running.
Please type
net start mssqlserver
in your command prompt. Then try to login.
Ended up reinstalling completely and doing a fresh install from a fresh download. When I did this I was brought through the steps of selecting the default instance, and selecting authentication modes.
Working fine now :)
After checking tons of sites looking for an answer to this question, I think I have a simple solution.
Open the sql Server Configuration
Click on the sql server services node
Right Click on Sql server
Click Start.
I have been screwing around with this forever, and this simple method actually worked.