What is causing this bizarre error message when opening my Access database on another PC? - sql-server

The error is following:
The ODBC connection string is obviously wrong and not in the right format. But I don't understand where Access is getting it from! The correct and working connection string (string saved in the Access database via the Linked Table Manager) is below. It should be noted that my colleague is opening the compiled .accde file in Access Runtime and does not have Office installed on his computer. The data tables are in SQL Server. Another colleague, who does have Office installed (presumably) got it to open with no problem.
This is the proper connection string which is used in Linked Table Manager to link the tables to SQL Server:
"DRIVER=ODBC Driver 17 for SQL Server;SERVER=hgws19.win.hostgator.com;UID=*******;PWD=********;Trusted_Connection=No;APP=Microsoft Office;DATABASE=mypubid_usergamelog;"
What I can't understand is why this other string in the error message is being used instead of the correct one in Linked Table manager. Anyone have any ideas how to troubleshoot this?

Related

How to give other users access to a SQLite Database via ODBC in Excel?

I have a Database file I work with in SQLite.
This file is aimed to be shared with other users so that they can access the data in Excel, using "Data"--> "Retrieve data" --> "From other sources" --> "From ODBC".
I've read already many tutorials and forums regarding my problem, but nothing helped already.
An installation of the SQLite ODBC driver from the popular Werner-page, a creation of a new DSN in the "ODBC Data source Admin", and the export of the respective Reg-file was already conducted in different ways (different 32-/64-Bits, System-/User-DSN).
Afterwards, I can open the resulting tables without problem in Excel via ODBC. But the users I shared the Reg-file with were not such successful. They only were able to import my sent Reg-file and select the suitable DSN-file in Excel ODBC. The problem starts when they want to access the data via Windows Authentification, which results in the following error message: Error message in German
In English, it is said in there: "Connection Error: ODBC: ERROR [IM002] [Microsoft][ODBC Driver Manager] The data source name was not found and no default driver was specified"
Can anyone explain the problem? A data source name (DSN) was given as I believe and I don't know how to handle the driver problem.
An authentification via Oracle itself instead of Windows is not an option, since I want to share the data among many people and I cannot expect an extra Oracle-registration from everyone. So, we did not even test the success via this authentification form. But somehow it has to be possible via Windows Login I believe..
Any advice would be appreciated! And please tell me if you need further info.
Thanks.

Linked Server Test Connection Not Working (SQL Server to Oracle Database)

Database Versions:
SSMS: 17.9,
Oracle: 19.3
We are trying to establish a linked server connection to our production Oracle DB (hosted by another team) that uses SSL. The LS was created, however our test connection attempts always return this:
Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server "CDWRP201_TCPS". OLE DB provider "OraOLEDB.Oracle" for linked server "CDWRP201_TCPS" returned message "Error while trying to retrieve text for error ORA-28759". (Microsoft SQL Server, Error: 7303)
I read that this meant "failure to open file" and could be caused by insufficient wallet permissions so I gave our users full access to the files (not sure if this is recommended). I did the same for the ewallet, ORA files, and even their parent folders but still no success.
What's weird is that test connections work for our non-SSL connections, which use the same tnsnames.ora file. We have no problems connecting to the Oracle DB using tnsping and sqlplus as well.
I'm struggling with this because my experience with Oracle and SSMS linked servers are few to none and feel like I've hit a dead end. Any direction you can give will be very much appreciated. I'm happy to provide more details if needed.
Thank you very much.
You actually have TWO problems.
First, your call to oracle returned ORA-28795. AS others are focusing on, that results from a failure to open a wallet. However, rather than looking for permissions issues, I'd note the second error ...
The "Error while trying to retrieve text for error" indicates that your ORACLE_HOME (for the oracle client being used my msssql) is not correctly set. When the call received the ORA-28759, it needed to find the error message file to be able to properly report it. But with improper ORACLE_HOME it was unable to locate the message file.
And it very well might be the case that the invalid ORACLE_HOME is also the root cause of the ORA-28759. I've not much expderince with walllets, but it seems reasonable that it needs ORACLE_HOME to locate the wallet, just as it needs it to locate the message file ... and a bunch of other stuff. In any event, get ORACLE_HOME set correctly and you will get more informative diagnostics/error messages on your ORA-28795.
You said yourself that "The only variable that indicated Oracle was our PATH". You need to also set ORACLE_HOME. If your oracle PATH is 'C:\Oracle\x64\product\19.0.0\client_64\bin', then your ORACLE_HOME should be 'C:\Oracle\x64\product\19.0.0\client_64'

SSIS to Oracle "Could not create a managed connection manager."

I'm trying to use SSIS to load some data from Oracle database to MSSQL database.
I created the project and used the ADO.Net source and was able to create a connection to Oracle and run queries and view results.
However when I actually run the package I get the following error:
Error: 0xC0208449 at Data Flow Task, ADO NET Source 2: ADO NET Source has failed to acquire the connection {EECB236A-59EA-475E-AE82-52871D15952D} with the following error message: "Could not create a managed connection manager.".
It seems similar to the issue here
And I did find that I have two oracle clients version installed "11.1" and "12.2".
One is used by PL/SQL and the other by other entity framework project.
If this is the issue I just wanted a way to tell the SSIS to pick-up the correct one.
I tried adding Entry in machine.config for "oracle.manageddataaccess.client" section with the desired version.
I also tried using other types of data sources but couldn't even create a successful connection
I tried changing the Run64bitRuntime property in the project to False
Note: I don't have SSIS installed on my machine.
Eventually, I just had to remove the entries related to 11.1 in path variable then restarted my machine.
Also I switched to "dotConnectForOracle" for connection and now it seems to be working fine.
I'm expecting issues related to other applications that might still be using the 11.1 version, but that will be a problem for another day.
Always make sure to write the user (oracle schema) in uppercase and some special characters [in my case it was $] in the password needs escape character even if you're using the wizard not the cmd
I still don't understand the whole issue but I hope this helps someone some day.

SQL Server 2012 error: object reference not set to an instance of an object

I use SQL Server 2012 and I have some databases on it. The problem is I suddenly get an error saying,
object reference not set to an instance of an object
I get this error when:
Going to write a new query
Select previously entered data by right click the table name ->
Select top 1000 rows
What I can do without getting error message:
Log into my instance successfully using both Windows Authentication mode and SQL Authentication mode.
Edit the table data by right click the table name -> Edit top 200 rows
Create a new database
I'm using:
Microsoft SQL Server Management Studio: 11.0.3128.0
Microsoft .NET Framework: 4.0.30319.34014
Operating System: Windows 8.1
Here are some snapshots of the error.
Please give me a solution to fix this problem. Your help will be highly appreciated.
I fixed the problem by running SSMS as administrator.
I could solve the error.
Repair the SQL Server.
Go to Add/remove programs Microsoft SQL Server 2012(x64) -> Uninstall/Change -> Repair.
Select the instance that you want to repair here.
For me, after repairing the instance, the error was solved.
Thanks for all who spent their valuable time to reply my question.
I got the same error message. Problem was 0 bytes free on the C: drive.
Its may be late, but i get the same error in SQL SERVER 2016, i resolved it by assigning full access to the back up folder.
I faced the same error once in my project. This is purely due to SSMS(sql client) is corrupted. Just for cross check that server is fine and client is corrupted, try to connect to the sql-server in this machine from any other server if you have access and query the tables. If it returns data, just uninstall and reinstall the client(ssms) to solve the issue
Thanks
I got the same error for SQL 2016 and the only solution for me was to completely uninstall (in appwiz.cpl) all entries Visual Studio + SQL. Then I executed VisualStudioUninstaller and I reinstalled SQL and after Visual Studio.
I got the same message when I try to alter table to add new column . Issue is I haven't enclosed data types using '[' datatype ']' . Its Real data type. But It got fixed when I enclosed in using square braces.
My solution for this was to extract the csv file with the python library pandas rather than saving it with Excel. Further, I removed columns that I didn't need as a few columns caused formatting errors during the import.
For those who are unable to modify their SQL configuration due to administrative restrictions at work:
I was able to open a new query page by creating a SQL Server Scripts project and adding a new query through the solution explorer
I got the message after deleting a database. The database was gone, so I moved on.

SQL Server linked server error 7303 to Access database

I've performed multiple searches and read numerous pages and tried loads of different configurations and nothing seems to solve a nuisance problem we have. We have a SQL server (2008 R2 v10.50.4000) that has several linked servers to several different access databases on a different server. They are all set up using UNC paths and they work...for a time.
At some point, something happens and then we can no longer access the databases and the only way I have found to solve this is to restart the SQL server service, which obviously isn't ideal in a production environment. This is the exact error message we get when we try to access it:
OLE DB provider "Microsoft.ACE.OLEDB.12.0" for linked server "HIDDEN" returned message "The Microsoft Access database engine cannot open or write to the file '\servername\path01\path02\path03\databasename.mdb'. It is already opened exclusively by another user, or you need permission to view and write its data.".
Yet it works absolutely fine again if I restart the SQL Server service, so I know the settings are correct. I strongly suspect it has something to do with the Microsoft ACE driver because they all (the Access database linked servers) stop working at the same time - even though they all look at different files.
At this point I'm willing to try anything.

Resources