EMU-CFE / CanvasDataViewer

CanvasDataViewer is used to automatically download Canvas Data files into a SQL Server database where you can query and analyze the information.
29 stars 8 forks source link

Stored Procedure Not Downloading Data Files #10

Closed dugup46 closed 7 years ago

dugup46 commented 7 years ago

Hello! First off, thank you guys for the work put into this. Huge help (if I can get it working 👍 )

Everything has seemingly gone smooth up to the point where I am now, running the first stored procedure (DownloadSchemaAndTables). The procedure has made a new directory (actually a couple) but it appears that it's not downloading any of the data from the Canvas instance. It then tries to unzip the files, but results in NULL.

When looking through the results, it looks like the code changes the dir to the node folder, runs the .js script (CanvasDataDL_Schema_Latest.js), adds 10k columns? of information across 2 tables? and then eventually results with the following error:

Something bad happened: { RequestError: SqlContext Error. Failed on step "__result__" with: "No connection is specified for that request." at C:\Program Files\nodejs\node_modules\mssql\lib\main.js:1478:17 at _combinedTickCallback (internal/process/next_tick.js:73:7) at process._tickCallback (internal/process/next_tick.js:104:9) name: 'RequestError', message: 'SqlContext Error. Failed on step "__result__" with: "No connection is specified for that request."', code: 'ENOCONN', step: '__result__' }

Those lines repeat themselves a few times. Then the following:

NULL C:\Program Files\nodejs>node CanvasDataDL_Tables_Latest.js NULL

From there it moves onto a wiki_page_fact, which seems to run properly. Finally, it ends with the following lines:

7-Zip [64] 16.04 : Copyright (c) 1999-2016 Igor Pavlov : 2016-10-04 NULL Scanning the drive for archives: NULL NULL Command Line Error: Cannot find archive NULL

Any help or guidance would be greatly appreciated! Thank you.

dugup46 commented 7 years ago

This issue was related to MSSQL not having TCP/IP enabled. After enabling TCP/IP on the MSSQL server, the error went away. Also, removing the comment marks on CanvasDataDL_Tables_Latest.js under CanvasDataAPICall helped determine there was an issue with my API key. I regenerated it and the files downloaded and were put into the table.