Error while using topcount - pivot

I'm using the following MDX query:
SELECT [Measures].[Unita (libri)] ON COLUMNS,
TopCount([Anno].[Anno].Members, 10.0, [Measures].[Unita (libri)]) ON ROWS
FROM [Pubblicazioni]
But i always get back an error:
Error Occurred While getting Resultset
MDX Query Editor
An error occurred while rendering Pivot.jsp. Please see the log for details.
I can't access the log (for some reason the server is not writing logs) but i think it's not normal to get this error with this simple query. Any ideas about?

Related

ADF Script Activity - Custom SQL Error code

Azure ADF has recently added a script activity that allows us to add multiple SQL statements. I am trying to execute those statements against SQLMI. In that, on certain error, if I want to throw an exception, I have following piece of code.
set #ERROR_MSG = 'My custom error message';
throw 50000, #ERROR_MSG, 1;
The output of activity have custom error message. But the error code is not getting customized. It returns 2001. My question is, how to customize error code ?

Import data from Salesforce Report using ADF

I am working on importing data from Salesforce Report using ADF. I am using copy activity and have created salesforce linked service.
I did get the below syntax from Microsoft documentation https://learn.microsoft.com/en-us/azure/data-factory/connector-salesforce but I get the below error.
Error:
Failed to import source schema. ERROR [HY000] [Microsoft][Salesforce] (120) SOQL_FIRST mode prepare failure: SOQL error: [Microsoft][SQLEngine] (31480) syntax error near '"<<< ??? >>>query": "{call "Quality & Impact Survey Results by Tier"}"'. SQL error: [Microsoft][SQLEngine] (31480) syntax error near '"query"<<< ??? >>>: "{call "Reportname"}"'. Activity ID: a1373279-97e4-42e4-86e3-80d930ef9364
If anyone have worked on this then do let me know your thoughts.
I found out the syntax to extract data from Salesforce from ADF as per below.
{call "Reportname"}

UserErrorSqlBulkCopyInvalidColumnLength - Azure SQL Database

I am configuring a Salesforce to Azure SQL Database data copy using Azure Data Factory. There appears to be an issue with the column length, but I am unable to identify which column is actually causing an issue.
How can I gain more insight into exactly what is causing my problem? or what column is really invalid?
{
"dataRead":18560714,
"dataWritten":0,
"rowsRead":15514,
"rowsCopied":0,
"copyDuration":34,
"throughput":533.109,
"errors":[
{
"Code":9123,
"Message":"ErrorCode=UserErrorSqlBulkCopyInvalidColumnLength,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=SQL Bulk Copy failed due to received an invalid column length from the bcp client.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=The service has encountered an error processing your request. Please try again. Error code 4815.\r\nA severe error occurred on the current command. The results, if any, should be discarded.,Source=.Net SqlClient Data Provider,SqlErrorNumber=40197,Class=20,ErrorCode=-2146232060,State=1,Errors=[{Class=20,Number=40197,State=1,Message=The service has encountered an error processing your request. Please try again. Error code 4815.,},{Class=20,Number=0,State=0,Message=A severe error occurred on the current command. The results, if any, should be discarded.,},],'",
"EventType":0,
"Category":5,
"Data":{
},
"MsgId":null,
"ExceptionType":null,
"Source":null,
"StackTrace":null,
"InnerEventInfos":[
]
}
],
"effectiveIntegrationRuntime":"DefaultIntegrationRuntime (East US 2)",
"usedCloudDataMovementUnits":4,
"usedParallelCopies":1,
"executionDetails":[
{
"source":{
"type":"Salesforce"
},
"sink":{
"type":"AzureSqlDatabase"
},
"status":"Failed",
"start":"2018-03-01T18:07:37.5732769Z",
"duration":34,
"usedCloudDataMovementUnits":4,
"usedParallelCopies":1,
"detailedDurations":{
"queuingDuration":5,
"timeToFirstByte":24,
"transferDuration":4
}
}
]
}
"Message":"ErrorCode=UserErrorSqlBulkCopyInvalidColumnLength,'Type=Microsoft.DataTransfer.Common.Shared.HybridDeliveryException,Message=SQL
Bulk Copy failed due to received an invalid column length from the bcp
client.,Source=Microsoft.DataTransfer.ClientLibrary,''Type=System.Data.SqlClient.SqlException,Message=The
service has encountered an error processing your request. Please try
again. Error code 4815.\r\nA severe error occurred on the current
command. The results, if any, should be
discarded.,Source=.Net SqlClient Data
Provider,SqlErrorNumber=40197,Class=20,ErrorCode=-2146232060,State=1,Errors=[{Class=20,Number=40197,State=1,Message=The service has encountered an error processing your request. Please try
again. Error code 4815.,},{Class=20,Number=0,State=0,Message=A severe
error occurred on the current command. The results, if any,
should be discarded.
I have seen that error when trying copy a string from the source to the destination but the column receiving the string on the destination is shorter than the source.
My suggestion is to make sure you selected data types big enough on the destination so they can receive the data from the source. Make sure also the sink has the columns shown in the preview.
To identify which column may be involved, exclude big columns one by one from the source.

Limit to using mariasql throwing error

I am using mariasql module in nodejs to connect with mariadb.
My query is:
select * from products where id=1 order by timestamp DESC LIMIT 0,10
This query works fine when I pass fixed values to limit.
Now I tried taking values from parameters.
select * from products where id=:pid order by timestamp DESC LIMIT :start,:end
This query is throwing following error.
{ Error: You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ''0','10'' at line 1 code: 1064 }
where as it accepts value from parameter for where clause.
It seems there is issue in mariasql node module. The issue is already reported in 2016 but there is no resolution yet.
Rather I found an alternative module which is for mysql but works fine with mariasql.

DB2 runstats throws exception " The utility could not generate statistics. Error "-911" was returned.. SQLCODE=-2310, SQLSTATE= , DRIVER=3.53.71"

Getting the below error when i run the following command :
call admin_cmd('runstats on TABLE schema.table with distribution and detailed indexes all')
DB2 runstats throws exception " The utility could not generate statistics. Error "-911" was returned.. SQLCODE=-2310, SQLSTATE= , DRIVER=3.53.71"
DB2 version - 9070900, table has 477125 rows. Marked as non-volatile.
Any help would be very much appreciated.
Still waiting on the feedback regarding diagnostics, but from the error it seems like this is related to the table or an index being blocked due to other locks (deadlock or contention).
The db2diag.log should hold information on which other process has been involved. In addition db2pd could be used to look into the lock situation. Most likely runstats will run without any error when repeated some time later (reason for no feedback to my diagnostics question?).

Resources