Best way to automatically copy tables from Sage to SSMS for reporting with SSRS?

SOLVED

Good morning everyone,

I'm looking to create a reasonable workflow for reporting from sage with SSRS. Currently, we're using report builder with an ODBC connection to achieve this, but even with limited testing we're noticing that this slows down the system for other users.

What I'd like to do is setup some tables on our MS server in SSMS that import information once per day to some tables stored there to prevent our activities from slowing down the main system. Currently, we can access the tables using openquery, using the ODBC connection to create a linked database. The first solution that comes to mind is to write a stored procedure every day to save the output from the openquery run locally and do reporting from there, but this seems roundabout and my instinct tells me there is probably a better way.

Has anyone here used a setup like this?

  • 0

    I probably should have done a bit more research before posting this question. At this point I'm I'm trying to determine whether the Sql Server replication tools would be a better option vs SSIS (leaning toward SSIS since we only need to run this once per day)

  • +1 in reply to ikeane
    verified answer

    I have set up SQLCMD batch files to trigger an SP... drop the temp / mirror table, then select * into mirrortablename from openquery... Depending on how big the tables are, this can take seconds to run.  (Usually this is for a custom report run through Visual Cut, with a SQL view to speed up report processing... batch file triggers the SQL refresh, then the report).

    Somewhere else, I've used merge queries which run more frequently, to pull in data throughout the day, when dropping / recreating the mirror table is not an option.

  • 0 in reply to Kevin M

    Thanks, I'm looking into creating the table for this now. I used the import wizard to generate the SQL to create the table for me, but for some reason all the 'date' columns are missing a datatype. It goes like this:

    ...

    [RestockingCharge] decimal(10,3),
    [ProcurementType] varchar(1),
    [DateCreated] 23,
    [TimeCreated] varchar(8),

    ...

    Do you know what datatype will work for SQL Server and also accept dates formatted however they're formatted in these Sage tables?

  • 0 in reply to ikeane

    If you use the "select * into..." method, the data types will be auto-detected.  If you want to have the destination with specifically controlled data types, you'll need to build data conversion (understanding that ProvideX dates are stored as YYYYMMDD) into your queries.