BIDS throws an exception trying to display blobs - blob

I don't know if this is the correct place to ask but here goes;
i've been using Microsoft SQL 2008 R2 Business Inteligence Development Studio to create an analysis service, ultimatly to build an OLAP cube
when i want to explore data in in my data source view, i get an exception. for some reason BIDS can't or won't parse the binary data in a column.
the exception that is thrown, looks like an unhandled exception of BIDS. the last line of the message is To replace this default dialog please handle the dataError event
the first part of the error message:
The following exception occured in the datagridView:
System.argumentException: Parameter is not valid.
at system.drawing.image.fromstream(Stream stream, boolean useEmbeddedColorManagement, boolean validateImageData)
at...
the database used is a firebired 2.5 database connected through IBProvider v3 ODBC driver. i had issues before, i changed the code page to win1252, west europe so it would parse text fields correctly.
on the websites of firebird i found that binary fields can have subtypes, this one is 0 = not defined so firebird will save the data byte for byte.
when i look inside the field, it has some rtf data.
has anyone experienced this, or can anyone point me in the right direction?
Edit: added the exception
Edit: when i change the subtype to 1 (text) there is no problem. but this would require me to update 431 tables. shouldn't there be an easier way?

Related

Google Data Studio can't explore Big Query time partitioned table

When trying to explore a Big Query Table in Google Data Studio after having connected to it I get the following error. Any Ideas how to handle that or what it means?
The query returned an error.
Unrecognized name: _PARTITIONTIME at [1:167] Error ID: a6e0a88c
In your Data Studio editor, click resources --> manage added data sources then go to edit connection.
There is an option to use _PARTITIONTIME as the time dimension.
I suspect Data Studio has picked up this magic field and tried to use it as a time datatype and there is some incompatibility going on. I think this field is really metadata so shouldn't be used. Data Studio should really ignore it and not try to be too clever in finding your fields and inferring their usage & type from their names ( Although, mostly that is helpful ).
Unticking that option, clicking back to the report with Done will let you resolve the issue.

Blind SQL Injection Guidance

So I'm doing an exercise for class and I'm having a bit of trouble understanding this particular database that I'm meant to break into blindly.
The database throws the following error with the string:
x'
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC driver for Oracle][Oracle]ORA-01756: quoted string not properly terminated
showing that it is vulnerable.
Similarly, the database concatenates fine with a valid input aka valid'||'input returns the correct webpage for the input.
What confuses me is that the database does not throw an error when the input x' -- is entered, but when the input x'; -- is entered the db throws the following error:
Error Type: Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00911: invalid character
I've also tried URL encoding the input so that it reads x'%3b+-- or x'%3b -- but it returns the same result.
Does anyone have any clue where to step next since it seems that I can't inject a semicolon ; into a query?
Everything's an Edit Below This:
Edit 1: I got to thinking and thought I might be inside of a parenthetical block. I tried the input x'); and it produces the following error:
Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80040E14)
[Microsoft][ODBC driver for Oracle][Oracle]ORA-00933: SQL command not properly ended
Edit 2:
Found out that the statement validinput'order by 52-- produced a result, but validinput'order by 53-- produced an error. I concluded the table has 52 columns.
I'm attempting validinput' union select 1 from table_name now, but it feels largely like a huge guessing game. I don't know what any of the table names could possibly be.
Edit 3:
My brain is honestly hurting at this point but I think I'm almost there...
The statement
validnum'+union+select+null,2,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null,null+from+dual--
returned a legitimate page
Edit 4:
Followed Jeffrey Kemp's suggestion and I got a single table (the output seems to be limited to 1 row). Uh oh. More information though, the version is Oracle 9i, and I know the database name plus user name, and few of the tables through blind luck. The goal of the exercise is to change a value in one of the tables. However, I've run into difficulty getting the column names since the output is limited to 1 row. Any suggestions?

PowerBuilder DataWindow retrieval arguments not working for SQL Server

Earlier we were using Sybase as the back end. Now we are migrating to SQL server where as front end remains the same i.e. PowerBuilder.
Issue :
I have a DataWindow code which takes two retrieval arguments adt_from_date and adt_to_date. Both Date format. This works fine for PB-Sybase combination, but throws an error 37000 for SQL server.
Here is our code. If I hard-code the dates. i.e. for e.g. if I replace :adt_from_date by '20141001'. The code works fine.
SELECT A.MEMBER_NO AS 'MEMBER_NO',
ROUND(SUM(TRANSACTION_CHARGES),2) as 'AMOUNT',
SUBSTRING(DATENAME(MM, :adt_from_date ),1,3) +'-'+substring(convert(varchar,datepart(YY, :adt_from_date )),3,2) as 'REASON'
FROM TRAN_SERVICE_TAX_DRV A,
MEMBER_MASTER B
WHERE A.MEMBER_NO = B.MEMBER_NO
AND A.TRADE_DATE BETWEEN :adt_from_date AND :adt_to_date
GROUP BY A.MEMBER_NO
Please suggest something on this.
I'd suggest you look at the error text being loaded into the transaction instead of just the number; it will probably be much more helpful. If we're talking about SQLState 37000, that doesn't narrow it down much.
If that doesn't shed some light on it, I'd look at tracing either on the PowerBuilder side, or on the database side. Starting on the PB side probably makes most sense. If you're just running this DataWindow from the IDE, the trace is just a checkbox on the connection properties. If in the app, replace your "DBMS='xxx'" with "DBMS='tra xxx'" (there are other options described in the Connecting to your Database manuals).
Good luck.

WIS 10901 error while refreshing Webi report

While refreshing Webi report I am getting an error:
A database error occured. The database error text is: (CS) "Unexpected behavior" . (WIS 10901)
All the objects are parsing in the universe and Server is also responding. What can be the possible reason?
We are also able to run query in the database using database client tool.
If the error message appears after the a long time it might just be a timeout issue.
Else, you could try to import a version of the report that works in CMS to your local drive, rename it and run again.
It can be caused by some special character in the data combined with the fact that the server language settings do not foresee such character and therefore Business Objects cannot parse it for presentation.
If that is the case you might need to configure an environment variable of the server (like NLS_LANG) setting it to a value such that those special characters in your data can be handled by Business Objects.
In my situation, the error appera when some objet from the data base has changed or does not exists anymore. So we need to delete this object in the Universe or be sure that the field exists in the data base with the same name and type.
I had same problem with my reports. After couple hour of "investigation", I found.
I create Object in my universe, and set inappropriate type of object data Number, when value in database have type Character.
It throw me oracle Error (ORA-01722), and Bussiness Object error (WIS 10901), though SQL copied from report creator interface, executed directly on database return proper data.

How to Convert NTEXT values to BOOLEAN using SSIS

I'm using SSIS to import SalesForce data into SQL Server. In SF, I have ntext fileds that contain values like "Live/ Not Live" which can easily be interpreted with a bit filed in SQL Server.
Is there a way to convert these ntext fields to Boolean values using SSIS. I have tried using Derived Column transformation and get the following errors:
[Insert Destination [807]] Error: SSIS Error Code DTS_E_OLEDBERROR.
An OLE DB error has occurred. Error code: 0x80040E21. An OLE DB record
is available. Source: "Microsoft SQL Server Native Client 10.0"
Hresult: 0x80040E21 Description: "Multiple-step OLE DB operation
generated errors. Check each OLE DB status value, if available. No
work was done.".
[Insert Destination [807]] Error: SSIS Error Code
DTS_E_INDUCEDTRANSFORMFAILUREONERROR. The "input "OLE DB Destination
Input" (820)" failed because error code 0xC020907B occurred, and the
error row disposition on "input "OLE DB Destination Input" (820)"
specifies failure on error. An error occurred on the specified object
of the specified component. There may be error messages posted
before this with more information about the failure.
[SSIS.Pipeline] Error: SSIS Error Code DTS_E_PROCESSINPUTFAILED. The
ProcessInput method on component "Insert Destination" (807) failed
with error code 0xC0209029 while processing input "OLE DB Destination
Input" (820).
The identified component returned an error from the ProcessInput method.
The error is specific to the component, but the error is fatal and will cause
the Data Flow task to stop running. There may be error messages posted
before this with more information about the failure.
Any help would be greatly appreciated.
NTEXT is your unicode text stream. You can't do much with a stream so we'll need to make it into something more manageable like DT_STR or DT_WSTR. Whether you have internationalization in your text data is something only you will know. Either way, connect a Data Conversion Transformation up to your SF source and make that data into a non-stream type (give it a max width). The goal of this operation is to take the stream data and turn it into straight text values (Live, Not Live). I'm assuming this column will be called IsLiveString
Now that you're dealing with a string type, add your Derived Column Transformation to the Conversion output and here is where you will need an expression to determine whether the supplied values from the Data Conversion task evaluate to True/False. Even if SQL Server understood that Live translates to a 1 (true), there is no way in heck I'd want to rely on that magic working forever. Instead, I'd look to create a new column, IsLiveBoolean and it'd have an expression like ([IsLiveString]=="Live") ? True : False That expression is approximate, I'm not sitting an instance of SSDT/BIDS. It could also be simplified by eliminating the ternary expression in lieu of the equality check. If you need to deal with NULL values in the IsLiveString column, then the ternary operator syntax makes that evaluation easier.
Edit
A picture's worth a thousand words so consider this 3k and some change. This represents the actions in your data flow. I used a simple query to POC your example. I generate a column of data type ntext with values of "Live" and "Not Live" and a NULL. From the source, I use the Data Conversion task as described above. I went with DT_WSTR to make this answer apply to the broadest possible audience and left the length at the default of 50. To optimize your memory usage, you'd want to decrease the length to match the longest possible value from the source system.
I configured my Derived Column transformation thusly. Options are there for dealing with NULLs or if you know your data is NULL free then the first will work.
Results. You can observe that this correctly makes the strings into their corresponding boolean counterparts. Those would then be piped into your destination component.