Kaseya Community

Problem using SQLCMD export in Kaseya

This question is answered

Hello Everyone,

I'm having a problem with building a procedure for a SQL server. The goal of this procedure is to add SQL data to a Report/Log/Monitor. At this moment I am able to create a text file using SQLCMD with the data, and export that data into the Agent Procedure log. Problem is that the Agent Procedure Log is not supporting any returns/breaks in the textfile. It is just pasting the whole thing together, making it unreadable. Next thing is that kaseya splits the file up into smaller pieces, so the whole layout is also vanished. Maybe someone over here knows a suitable sollution for my problem. For your information, below is a small example of the current situation.

Kind regards,

Anton

--- --- ---

TEXTFILE CONTENTS:

2011-03-09 10:05:33.000 TESTSERVER1
2011-03-13 07:10:40.000 TESTCLIENT1
2011-03-11 06:05:38.000 TESTCLIENT2
NULL TESTCLIENT3
2011-03-13 07:10:40.000 TESTCLIENT4
2011-03-13 07:10:40.000 TESTCLIENT5
2011-03-13 07:10:40.000 TESTCLIENT6
2011-03-13 07:10:40.000 TESTCLIENT7
2011-03-13 07:10:40.000 TESTLAPTOP1
2011-03-11 06:05:38.000 TESTLAPTOP2

(10 rows affected)

PROCEDURE LOG CONTENTS:

Time

Agent Proc Admin
3:18:31 pm 14-Mar-11 Test Procedure 127 testuser
Script Summary: Success THEN
3:18:31 pm 14-Mar-11 Test Procedure 127 testuser
2011-03-13 07:10:40.000 TESTCLIENT7 2011-03-13 07:10:40.000 TESTLAPTOP1 2011-03-11 06:05:38.000 TESTLAPTOP2 (10 rows affected)
3:18:31 pm 14-Mar-11 Test Procedure 127 testuser
2011-03-09 10:05:33.000 TESTSERVER1 2011-03-13 07:10:40.000 TESTCLIENT1 2011-03-11 06:05:38.000 TESTCLIENT2 NULL TESTCLIENT3 2011-03-13 07:10:40.000 TESTCLIENT4 2011-03-13 07:10:40.000 TESTCLIENT5 2011-03-13 07:10:40.000 TESTCLIENT6
3:18:27 pm 14-Mar-11 Run Now - Test Procedure 127 testuser
Admin anton scheduled procedure Run Now - Test Procedure 127 to run at Mar 14 2011 3:18PM


[edited by: Anwise at 7:53 AM (GMT -7) on 3-14-2011] Making text easier to read ;-)
Verified Answer
  • not stupid - we dont view the information from kaseya we created the table in the Kaseya dB and we import to it.

    You could then if you wanted create a SQL report using Reporting services that is on the kaseya box and then view it that way but it would not be via the web interface. I don't believe you can create custom reports in the kasey interface other than using what is there.

    We have a custom web portal that we built that allows us to display our information but we used to use SQL reporting services.

All Replies
  • if we are doing any sql imports we bring the file up to the kaseya server and then run a SQL job on the kaseya server to bulk import.

    So we run our commands locally on the client and we export to .csv or whatever we then do a get file but we store it in a folder on our kaseya server that we predefine, then we run our sql job to process all the files. Works well for us.

  • Hi Martin,

    First I would like to thank you for your reply.

    That looks like a good solution for my problem, though I have one little question left. In what table do you import the data in kaseya? Do you import it in the SQL Reports table, and then show it via kaseya?

    I'm trying to understand where in kaseya I can view the contents of that CSV file, i'm sorry for my stupidity... ;-)

    FYI, The main goal is to view the contents of a TXT/CSV/... file via the kaseya web interface, instead of opening the TXT/CSV file on it self...

    Kind Regards,

    Anton



    [edited by: Anwise at 8:52 AM (GMT -7) on 3-15-2011] Added some extra info
  • not stupid - we dont view the information from kaseya we created the table in the Kaseya dB and we import to it.

    You could then if you wanted create a SQL report using Reporting services that is on the kaseya box and then view it that way but it would not be via the web interface. I don't believe you can create custom reports in the kasey interface other than using what is there.

    We have a custom web portal that we built that allows us to display our information but we used to use SQL reporting services.

  • Martin,

    Thank you so much for providing me with this information! I suppose we are going to search for some other solutions. When I find it I will post the solution in this forum.

    Kind Regards,

    Anton Willemse