Error while extracting data from Oracle DB in SSIS - oracle11g

I have been trying to connect to Oracle DB (11g) in SSIS (VS2015) from past few days and tried all possible solutions but still getting error. I am passing query through SSIS variable, no other parameter is passed, it is just test query which need to retrieve two rows.
Case 1: Tried using Oracle Provider for OLEDB, test connection is successful but getting below error while Preview data:
The system cannot find message text for message number 0x80040e51 in the message file for OraOLEDB. (OraOLEDB)
Case 2: Tried using Microsoft OLEDB Provider for Oracle, test connection is successful but getting below error while Preview data:
Provider cannot derive parameter information and SetParameterInfo has not been called.
I have been struggling to solve this problem, any help would be appreciated. Thanks in Advance.
Edit: After setting Run64bitRuntime to false, I can extract data when using Oracle Provider for OLEDB, but Preview still gives same error.
Regards,
Jazz

Set Run64bitRuntime to false for the package and then it should work.

Right click Project and click Properties
In Configuration Properties at left side click Debugging
set Run64BitRunTime options as false

Some advice on this is all focused on "Preview". Don't throw the baby out with the bath water. With VS 2017 enterprise I got the "cannot find message text ... " message with Preview but was able to put oracle data into ms sql as a job (the gui has a problem, but not the run time job). I did set AlwaysUseDefaultCodePage to true on Component Properties in Advanced Editor on the OLEDB oracle task.

Related

Excel ODBC Connection Issues and HY000 CURLError

I am trying to connect Excel to our Snowflake instance so that users can pull data into Snowflake. I've installed the latest ODBC driver and set the User and Server as required. The authenticator is set to externalbrowser. When we attempt to use that connection within Excel, one of two things occurs:
A bunch of browser tabs open but the user is able to connect and bring in data. Not sure why we have multiple tabs but at least they get what they need.
The connection just spins, and ultimately we end up with a HY000 error saying that the REST Request for our URL failed; code=52 msg=Server returned nothing (no headers, no data), oS code=2, osMsg='No such file or directory'.
We have tried multiple options and all of our other connections (JDBC for example) works just fine with the external browser setting. There doesn't seem to be much of a difference between users that can connect and those that can't.
There is a good Knowledge Base article written about connecting to Snowflake from Excel.
Skip Step 1: Configure SSO with Azure AD if you are not using SSO. Go on to Step 2 onward.
This is the article: https://community.snowflake.com/s/article/HOW-TO-connect-to-Snowflake-authenticating-with-Azure-AD-SSO-from-MS-Excel-ODBC-driver

OpenEdge database connection issue

Im trying to add another data in a from table in a separate database to my script,
but I keep getting this error all time.
My script
connect database "chris.db" .
run chrisf.p
disconnect databse.
The error I'm getting
How can I get round this issue?
Thank you.
The word "database" is not part of the syntax for the CONNECT statement.
CONNECT "chris".
is the correct syntax.
The OpenEdge documentation for CONNECT is here: https://documentation.progress.com/output/OpenEdge117/openedge117/?_ga=2.93982683.75218856.1547464117-1040589272.1546786181#page/dvpin%2Fthe-connect-statement.html
I'm not sure what you are trying to do with:
run chrisf.p disconnect databse.
but that will run an external procedure called "chrisf.p" and pass 2 "compile on the fly" parameters with values of "disconnect" and "databse". (I'm pretty sure that's not really what you intend.)

Contained database SQL 2012 - and ODBC connection creation failing

Hi Guys Im having trouble understanding how to get around this error
When trying to create a ODCB connection we cant get past the error Error 18470 Login failed for user ####. Reason : The account is disabled.
Of course we have tested that the login to the contained database works through SMSS.
But cant google find anything on how to do a ODBC connection string to work around the .
ODBC is needed for the application that is going to be setup to use the contained databases...
Any suggestions appreciated...
I fixed this because i remembered that often when you create the ODBC connection when setting up a sql account - you can fool the gui - put the details in of the account your trying to use - password - and then simply untick the use this account box – MoOriginal 1 min ago edit
Even though this greys out the box the details are still stored and allow you proceed to the next stages of setup so you can achieve connection by explicitly specifying the database in the next step - cut and paste - then you can go ahead and finally test the connection- this is what i did and this allowed me to create the connection. – MoOriginal just now edit

Pool Multiple Messages with BizTalk 2006 SQL Adapter

I have a StoredProcedure that returns a simple table containing several records:
DECLARE #STEPS_TABLE AS TABLE (OrchestrationID uniqueidentifier, [Message] nvarchar(1000));
-- LOADING THE VALUES HERE
SELECT * FROM #STEPS_TABLE As Step FOR XML AUTO, XMLDATA, ELEMENTS
I used the SQL Transport Schema Generation Wizard to create my schema and could configure the port correctly. If I use this schema on my orchestration, it works perfectly. BizTalk starts one instance of the orchestration everytime the #STEPS_TABLE has more than 1 record.
Reading Microsoft technical documentation, they recommend to get several messages in one call and then use the XML pipeline to disassemble the multi-row BizTalk message into a single-row BizTalk message.
I haven't used the XML pipeline before, so I tried the provided steps but couldn't get it to work.
Could somebody provide me a link to a "how to" (didn't find anything until now, after several hours of searching) or give me some hints to succeed.
Thanks in advance.
... some hours later I could figure it out myself. So if anybody comes across the same issue as me, here you have some guidelines to make it work on your environment.
At the end I followed a different walkthrough from Microsoft and avoided the pipeline recommendation altogether. The documentation I found is called "Disassembling Result Sets Using the SQL Adapter" and does exactly what i was looking for. You can just follow the whole walkthrough from Microsoft but avoid the creation of the send port and make some little adjustment on the receive port.
After following the technical document you will end up with two schemas, I will call them message and envelope (contains several messages) for the sake of this excercise. In your orchestration you can create a receiving port that maps to the message and then when you configure it as a SQL Port and you link it to your stored procedure (or select statement), you only have to change the Document Root Element Name to the envelope root name; the XML Receive pipeline (provided by default in BizTalk 2006) will do the magic of disassembling the messages contained in the envelope and instantiating an orchestration for each message.
The Microsoft "Disassembling Result Sets Using the SQL Adapter" walkthrough can be found under:
http://msdn.microsoft.com/en-us/library/aa562098(v=bts.20).aspx
Mission accomplished :)

Reporting in ASP.NET

I have an SQL Database and an ASP.NET website built to put data into the database.
One of the project requirements is to build a system that would let the user upload a Crystal Report to the server and run it as needed. This way, the user could create a customized report (for then turning into management, customers) that wouldn't force them to go through a developer.
I'm looking for suggestions on how to accomplish this goal.
Currently, I'm looking for a way to redirect the database connection in the Crystal Report from the database it was developed with to the database it will eventually run on. However, There doesn't seem to be a simple way to do this.
I'm also investigating the ReportViewer object. However, all the code I have seen involves specifying the query for the report in the code, which isn't acceptable.
One option (which I don't like at all) is to let them write their own queries so they can copy the results into Excel. This would mean a blank textbox and information about the structure of the database. Not a good idea for multiple reasons.
Another option is to create one report for each table (and maybe a few extras), let the user copy the data they want into Excel, and go on their merry way.
tl;dr How do I build a flexible reporting system?
=========================================
Continuation: 08/20/2012
I have decided to go the route of b.pell's extension methods. So far, it has gotten me closer than anything else. My code to bind to the CrystalReportViewer is below:
CrystalReportSource rs = new CrystalReportSource();
rs.Report.FileName = Server.MapPath("ReportFiles/") + Request["reportname"];
string connstring = System.Web.Configuration.WebConfigurationManager.ConnectionStrings["myConnectionString"].ConnectionString;
rs.ReportDocument.ApplyCredentialsFromConnectionString(connstring);
rs.ReportDocument.ApplyNewDatabaseName("myDBName", "mySchemaName");
rs.ReportDocument.Refresh();
CrystalReportViewer1.ReportSource = rs;
This comes very close to working. It works fine on my dev machine, but when I run the code on the server, it gives the following error:
Logon failed.Error in File CrystalReport2 {5D2E82E5-783E-4DFD-A770-C8AE72A51E4E}.rpt:
Unable to connect: incorrect log on parameters. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Runtime.InteropServices.COMException: Logon failed.Error in File CrystalReport2 {5D2E82E5-783E-4DFD-A770-C8AE72A51E4E}.rpt: Unable to connect: incorrect log on parameters. Source Error: An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.
The error is in this line in the code:
crTable.Location = String.Format("{0}{1}", prefix, crTable.Location.Substring(crTable.Location.LastIndexOf(".") + 1))
When I remove the call to ApplyNewDatabaseName, I am asked to enter the Server Name, the Database name, the Username and the Password or to select Integrated Security. I can't enter the Database Name or the Server Name (those fields are disabled).
Any thoughts?
I think what you're looking for is the Reporting Services, part of Business Intelligence
Or maybe you can setup a UI that let the users pick the tables and columns they need for the report (this way you can limit the information they can access) an write a Dinamic Query Builder Function or something like that.
I answer the changing Crystal Reports connection question a lot (it's something I'd think Crystal would make easier, but I wonder if they don't because that's what their server product does). :D Anyway, you can set the database credentials at runtime. Crystal is very particular in the order it's done, but I have some code that I turned into extension methods that do the trick. This code will go through the main report and all sub reports and change the connection information. This assumes that all sub reports connect to the same database that the main report does (if not, you'll need to modify it to handle multiple connections, but this rarely comes up at least with what I do).
Extension methods to change connection info: http://www.blakepell.com/2012-05-22-crystal-reports-extension-methods
It would be used something like this (although, you're binding to a viewer probably and not exporting, so you could ignore that, this is just for example).
Using rd As New ReportDocument
rd.Load("C:\Temp\CrystalReports\InternalAccountReport.rpt")
rd.ApplyNewServer("serverName or DSN", "databaseUsername", "databasePassword")
rd.ApplyParameters("AccountNumber=038PQRX922;", True)
rd.ExportToDisk(ExportFormatType.PortableDocFormat, "c:\temp\test.pdf")
rd.Close()
End Using
System.Diagnostics.Process.Start("c:\temp\test.pdf")
You could use the Crystal Viewer at this point to deliver the reports and store the report in a database or on the file system (with a db meta data table) and have some predefined connections the user could select from that would be applied when it is run.
You also have the option to write your own front end. In this scenario a user would select a report from your meta data (you could put whatever security on it you wanted, I use AD). Then you can read the report parameters in and lay them out on the web form. When the user fills them in, you then sanatize them and pass them to the report via these extensions and you can output Excel, PDF, Word Doc, RTF, etc. A little more overhead and not the nice preview view, but can work well (I've done something like this in the past). Hope this helps.
About "...let them write their own queries" part of your question.
The solution can be to use some query builder component with friendly user interface which hides from users the complexity of your database and avoid any possible SQL injections.
There are few such products on the market. One of them is called EasyQuery, another one is build by Aspose if I'm not wrong. Try to search in Google for "query bulider for asp.net" or ".net query builder component".

Resources