Excel 365 How to run an Oracle Stored Procedure from Get Data - excel

I am having a problem working out how to run an Oracle Stored Proc from Excel's:-
Get Data -> From Database -> From Oracle Database -> Advanced Options section.
I can connect ok to Oracle and query tables from within the Advanced Options, but when I try and execute the following stored proc, EXEC sp_Test or EXECUTE sp_Test
I get the following error message:-
Unable to connect
We encountered an error while trying to connect
Details: "Oracle: ORA-00900: invalid SQL statement"
This stored proc works fine from both within SQL Developer and from an SSRS report.
There are no parameters in the Stored Proc.
Any thoughts on how I can achieve this will be gratefully accepted.
Regards,
NJC

Related

Oracle: Why am I getting Error: ORA-00903: invalid table name when database table exists?

Background
I have a NodeJS server powered by ExpressJS that fetches data from Oracle database. I manage the database with Oracle SQL Developer tool. There is a database called MCF01 created using Database Configuration Assistant with pluggable database also named MCF01.
I connect to it using SYSTEM and the admin password both inside Oracle SQL Developer tool and from my server:
Now I created a table named CM_ITM_ALL:
CREATE TABLE "SYS"."CM_ITM_ALL" ...
I can without a problem query inside CM_ITM_ALL from Oracle SQL Developer tool like so:
Problem
I cannot execute the same query SELECT ITM_NM FROM CM_ITM_ALL WHERE ITM_NUM='a800004' using my nodejs server. What is the problem here?
Here is the error message from the Oracle via my server:
[Error: ORA-00942: table or view does not exist] {
errorNum: 942,
offset: 19
}
Table does exist. Connection is not a problem as it is giving out the table does not exist error. Otherwise it would give out wrong credentials error.
What I tried
Appending SYS into the query: SELECT ITM_NM FROM SYS.CM_ITM_ALL WHERE ITM_NUM='a800004'
Quoting the table name inside the query to SELECT ITM_NM FROM 'SYS'.'CM_ITM_ALL' WHERE ITM_NUM='a800004'
Dev environment
Oracle Database 19c Enterprise Edition Release 19.0.0.0.0
NodeJS v16.13.0
ExpressJs 4.17.2
node-oracledb 5.3.0
Oracle SQL Developer 21.4.2

Excel Power Query Can't Access Postgresql Views

I'm setting up Excel Office 365 to access one of our PostgreSQL (9.6) databases via Power Query. Specifically, I'm trying to connect to a View I wrote to return a particular data set.
We're using an ODBC DSN for the connection, using the Postgres Unicode ODBC driver.
I have a weird problem where on my PC this all works fine. But, on a co-workers laptop, it fails. I can connect to a real table on his, but not to a view. The error message is extremely terse. It simply says Error=Table. I'm not sure what that means, except perhaps it's telling me that it can only connect to tables? But if so, why only on that machine?
This is the actual error I get:
DataSource.Error: ODBC: ERROR [HY000] Error while executing the query
Details:
DataSourceKind=Odbc
DataSourcePath=dsn=uranus_emd
OdbcErrors=Table
I was able to solve this by installing an actual .NET connector on the PC.
I also see this problem using VBScript to access a postgres VIEW through an ODBC driver.
I had to work around it by expandingt the details of the query to use only TABLES and effectively recreate the VIEW in SQL
Get node.js http://microsoft.com/ekkarat.w#gmail.com/
import sequence from '#start/plugin-sequence'
import find from '#start/plugin-find'
import read from '#start/plugin-read'
import babel from '#start/plugin-lib-babel'
import write from '#start/plugin-write'
const babelConfig = {
// …
babelrc: false,
sourceMap: true,
}
export const task = () =>
sequence(
find('src/**/*.js'),
read,
babel(babelConfig),
write('build/')
)

Issue after deploying SSRS report that pulls data from an Excel data source to the Report Server

I am trying to deploy an SSRS report that is using an Excel data source. This report shows up fine on BIDS when I preview it.
I then tried to deploy it to the Report Server and that worked fine except that when I click on the report I get the following error:
An error has occurred during report processing. (rsProcessingAborted)
Cannot create a connection to data source 'Excel_64'. (rsErrorOpeningConnection)
ERROR [IM006] [Microsoft][ODBC Driver Manager] Driver's SQLSetConnectAttr failed ERROR [01S00] [Microsoft][ODBC Microsoft Access Driver]Invalid connection string attribute Trusted_Connection ERROR [01S00] [Microsoft][ODBC Microsoft Access Driver]Invalid connection string attribute Trusted_Connection ERROR [01S00] [Microsoft][ODBC Microsoft Access Driver]Invalid connection string attribute Trusted_Connection ERROR [01S00] [Microsoft][ODBC Microsoft Access Driver]Invalid connection string attribute Trusted_Connection
I have looked online and tried a bunch of different solutions ranging from sharing the workbook, trying to input Windows Credentials in the report server in the "Credentials stored securely in the report server" field but that also gave me the same error.
I would really appreciate any help in resolving this.
Thank you.
Did you try removing the Trusted_Connection attribute from the connection string?
Does that server have all necessary components installed to retrieve data from a Excel sheet? I seem to remember that in older versions you needed Data Access Componets(DACS) or Excel itself installed on the server from which the Excelfile is read.
SSRS must Excel be installed on Reporting server to use Excel as a Data SOURCE?
But I think you would be better of with the solution proposed in the link below.
It suggests importing the data into a SQL table using a scheduled SSIS package.
SSRS: Error while querying data from an Excel file (through ODBC)

Error exporting SQL Server 2008 R2 database to Excel 2007

I was trying to export SQL Server 2008 R2 database to Excel 2007. I used the export wizard in SQL Server Management Studio. I used a query to export some columns of a table. I checked the query (saw the result of parsing it) and it was good. But on the REVIEW DATA TYPE MAPPING it showed error notifications. It was converting varchar to LongText. But when I executed the package it failed to run showing fail status for steps like prepare for execute,pre-execute,execute . the error message is like this
Error 0xc002f210: Preparation SQL Task 1: Executing the query "CREATE TABLE Query (
id Long, sku LongText..." failed with the following error: "Unexpected error from external database driver (1309).". Possible failure
reasons: Problems with the query, "ResultSet" property not set
correctly, parameters not set correctly, or connection not established
correctly.
(SQL Server Import and Export Wizard)
Someone has a clue whats wrong?
Not an ideal answer (I have no idea what the cause of this problem is) but I was able to bypass this error by saving the excel sheet to 97-03 format and extracting to that.

problem with the connectivity/updation using db2(universal driver)

I choosed a web project in order to do that i am using an IDE (Eclipse), database (DB2 universal driver) and Apache Tomcat server. So, by gods grace every thing has gone well but when I try to update data to DB2 database through JDBC code then I am getting an SQL DB error as
:: DB2 SQL error: SQLCODE: -204, SQLSTATE: 42704, SQLERRMC: DB2ADMIN.REGISTER
where register is my table name and even i logged in as db2admin but i think there is no connectivity established but still its not resolved
This sounds a bit strange, -204 is Function, procedure or trigger not found...
Have a look at SQLCODE concepts and use the SQL Message Finder link to check yr return code for a full explanation.
Note that DB2 procedures & functions have case-sensitive names.
Hope this helps.

Resources