Error in SQL Query

Post Reply
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

Error in SQL Query

Post by appleglaze28 »

This is a first time error. My source changed so I had to change my query for loading data to my TM1 Cube and I got this error.

Code: Select all

1824   [2]   ERROR   2012-09-12 07:04:55.727   TM1.Process   Process "LOAD_Commission_MKT_1": : Execution was aborted. Error file: <TM1ProcessError_20120912070455_LOAD_Commission_MKT_1.log>
When I open the log this is what the log says:

Code: Select all

Error: MetaData procedure line (0): Error executing SQL query: 
Hope someone can help me troubleshoot this.
asutcliffe
Regular Participant
Posts: 164
Joined: Tue May 04, 2010 10:49 am
OLAP Product: Cognos TM1
Version: 9.4.1 - 10.1
Excel Version: 2003 and 2007

Re: Error in SQL Query

Post by asutcliffe »

So what has actually changed in your source? Have you verified that the SQL query in your TI process is valid?
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

Re: Error in SQL Query

Post by appleglaze28 »

tables are the same just the source database I've been given access to. I usually do my SQL Query in SQL Management Server and then copy it to TM1 its easier that way. I'm able to preview the Query but when it comes to uploading the data to the TM1 Cube I get that error. Its something new for me to encounter so I'm not sure what is the possible problem.
asutcliffe
Regular Participant
Posts: 164
Joined: Tue May 04, 2010 10:49 am
OLAP Product: Cognos TM1
Version: 9.4.1 - 10.1
Excel Version: 2003 and 2007

Re: Error in SQL Query

Post by asutcliffe »

appleglaze28 wrote:I'm able to preview the Query but when it comes to uploading the data to the TM1 Cube I get that error.
By this do you mean that when you open the TI process in the editor, the preview box on the data tab contains data? If so are passing it any parameters that might render the sql invalid? Are you modifying any of the TurboIntegrator Local Variables (eg DatasourceNameForServer, DatasourceQuery) in the prolog?
appleglaze28
Regular Participant
Posts: 269
Joined: Tue Apr 21, 2009 3:43 am
OLAP Product: Cognos TM1, Planning
Version: 9.1 SP3 9.4 MR1 FP1 9.5
Excel Version: 2003

Re: Error in SQL Query

Post by appleglaze28 »

I'm not passing any parameter nor local variables. Yes the preview box contains data and I was able to set additional variable in the variables tab and write the query in the Advance Tab.

I even tried to use the same query to create a new dimension and use 1 variable in the query as my element and I still get the same error.

I tried to run my old query it still works. I was just provided direct link to an application's database to ensure data that I load in TM1 are always update compared to the old one wherein certain tables I use are not update.
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Error in SQL Query

Post by Duncan P »

Have you checked that the ODBC connection has access to all the objects referenced in the statement? Can you use the query from e.g. Excel using the same ODBC connection?
tomok
MVP
Posts: 2832
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Error in SQL Query

Post by tomok »

The first step to troubleshooting an SQL problem with TI is to ASCIIOUTPUT to a text file the SQL string you are passing. Copy and paste it into a command window for whatever database tool you are using to make sure it will actually run. If that passes muster make sure the ODBC connection is set up properly and can connect to the database. If you are good there then make sure the account the TM1 service is running under has all the appropriate security access to run the query. If that is OK, make sure you don't have syntax errors in any DatasourceNameForServer or DatasourceQuery or other TI local variables. 99% of the problems will fall in one of these. If these aren't the cause then good luck.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply