Answered by:
Cannot create a connection to data source 'PPY_DS'. ---> System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.

Question
-
I am getting this error when I am running SSRS report from service account. I am able to open the report manually as well I can connect to database also credential stored in reporting server.
C:\Program Files\Microsoft SQL Server\MSRS10.MSSQLSERVER\Reporting Services\LogFiles content are below:
processing!ReportServer_0-52!6a88!07/28/2020-06:17:09:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'PPY_DS'., ;
Info: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'PPY_DS'. ---> System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
at System.Data.OracleClient.OciHandle..ctor(OciHandle parentHandle, HTYPE handleType, MODE ocimode, HANDLEFLAG handleflags)
at System.Data.OracleClient.OciEnvironmentHandle..ctor(MODE environmentMode, Boolean unicode)
at System.Data.OracleClient.OracleInternalConnection.OpenOnLocalTransaction(String userName, String password, String serverName, Boolean integratedSecurity, Boolean unicode, Boolean omitOracleConnectionName)
at System.Data.OracleClient.OracleInternalConnection..ctor(OracleConnectionString connectionOptions)
at System.Data.OracleClient.OracleConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options)
at System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject)
at System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection)
at System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory)
at System.Data.OracleClient.OracleConnection.Open()
at Microsoft.ReportingServices.DataExtensions.ConnectionExtension.Open()
at Microsoft.ReportingServices.OnDemandProcessing.RuntimeDataSource.OpenDataExtensionConnection(DataSource dataSourceObj, OnDemandProcessingContext pc, CreateDataExtensionInstance createDataExtensionInstance)
--- End of inner exception stack trace ---
processing!ReportServer_0-52!6a88!07/28/2020-06:17:09:: e ERROR: Data source 'PPY_DS': An error has occurred. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'PPY_DS'. ---> System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
processing!ReportServer_0-52!6a88!07/28/2020-06:17:09:: e ERROR: An exception has occurred in data source 'PPY_DS'. Details: Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'PPY_DS'. ---> System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
processing!ReportServer_0-52!6a88!07/28/2020-06:17:09:: i INFO: DataPrefetch abort handler called for Report with ID=. Aborting data sources ...
processing!ReportServer_0-52!6a88!07/28/2020-06:17:09:: e ERROR: Throwing Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing., ;
Info: Microsoft.ReportingServices.ReportProcessing.ProcessingAbortedException: An error has occurred during report processing. ---> Microsoft.ReportingServices.ReportProcessing.ReportProcessingException: Cannot create a connection to data source 'PPY_DS'. ---> System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
--- End of inner exception stack trace ---
chunks!ReportServer_0-52!6a88!07/28/2020-06:17:09:: w WARN: Rolling back shared chunk transaction for snapshot 'bc88e972-6a96-41cd-b134-02b39bdd7b63', Permanent=True.
Could you please help me with this error.
Thanks
Sandeep
- Edited by Sandeep Devadiga Tuesday, July 28, 2020 10:37 AM
Tuesday, July 28, 2020 10:33 AM
Answers
-
Hi Amelia and Olaf Helper,
Thanks for your support.
I have followed below link and it worked for me for others benefit i am posting the link.
http://oraclepoint.com/oralife/2010/08/19/oracle-odbc-connection-issue-of-system-exception-ocienvcreate-failed-with-return-code-1-on-windows-with-asp/
Sandeep
- Marked as answer by Sandeep Devadiga Tuesday, August 18, 2020 5:55 AM
Tuesday, August 18, 2020 5:54 AM
All replies
-
System.Exception: OCIEnvCreate failed with return code -1 but error message text was not available.
OCIEnvCreate is an Oracle component, so the error message comes from the Oracle client; see https://stackoverflow.com/questions/12901045/ocienvcreate-failed-with-return-code-1-but-error-message-text-was-not-available
Olaf Helper
[ Blog] [ Xing] [ MVP]- Proposed as answer by Amelia GuMicrosoft contingent staff Tuesday, August 4, 2020 6:20 AM
Tuesday, July 28, 2020 11:21 AM -
I am able to connect to oracle database from command prompt using sqlplus command
OCI.DLL present in path D:\oracle\product\10.2.0\client_1\BIN and
Oracle_home :D:\oracle\product\10.2.0\client_1
- Edited by Sandeep Devadiga Tuesday, July 28, 2020 12:00 PM
Tuesday, July 28, 2020 11:52 AM -
Hi Sandeep Devadiga,
Please refer to the following threads which might help:
OCIEnvCreate failed with return code -1 but error message text was not available
OCIEnvCreate failed with return code -1
In addition, this issue is related to Oracle; you could also try to open a thread in Oracle forum.
Best Regards,
Amelia
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.Wednesday, July 29, 2020 6:14 AM -
Hi Sandeep Devadiga,
Did the answers above help you?
Please feel free to let us know if you have any other question.
Best Regards,
Amelia
""SQL Server related"" forum will be migrated to a new home on Microsoft Q&A SQL Server!
We invite you to post new questions in the "SQL Server related" forum’s new home on Microsoft Q&A SQL Server !
For more information, please refer to the sticky post.Tuesday, August 4, 2020 6:24 AM -
Hi Amelia and Olaf Helper,
Thanks for your support.
I have followed below link and it worked for me for others benefit i am posting the link.
http://oraclepoint.com/oralife/2010/08/19/oracle-odbc-connection-issue-of-system-exception-ocienvcreate-failed-with-return-code-1-on-windows-with-asp/
Sandeep
- Marked as answer by Sandeep Devadiga Tuesday, August 18, 2020 5:55 AM
Tuesday, August 18, 2020 5:54 AM