Please note that VisualCron support is not actively monitoring this community forum. Please use our contact page for contacting the VisualCron support directly.


fward
  •  fward
  • No customer Topic Starter
2011-04-27T22:38:04Z
Hi, currently evaluating VisualCron for automating some IT related processes...

One thing i noticed, is that the log are conveniently stored in an SQL Server compact database. Great! For advanced diagnostic when we run into problems, the UI can be a little limiting, so I'm thinking "No problem, I'll just go straight in the database".

Oh whoops, its password protected 🙂 And I don't see the password in any config file or anything.

Is it possible to get access to that database?

Thanks!
Sponsor
Forum information
Support
2011-04-28T09:50:10Z
We have password protected the file because some users find the output information (which is stored in database) sensitive.

The best way to access the database is through the VisualCron API. With a few lines you can logon to the VisualCron Server and then access the database. You could then, if you want to, create a simple script that extracts the data that is relevant and insert into your own database.

Please let us know if you need any help.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fward
  •  fward
  • No customer Topic Starter
2011-04-28T15:59:06Z
Yeah that would be an acceptable workaround.

Though is there something special to do to access the logs from the API? I just tried the following code:


Client client = new Client();
            
Connection connection = new Connection();
connection.Address = "sadshh01";
connection.ConnectionType = Connection.ConnectionT.Remote;
connection.UseADLogon = true;

var server = client.Connect(connection);

var history = server.Log.GetAll();


And it returns nothing. Note that Ive been playing with other parts of the API in the same application to get jobs, tasks, etc and that all work, so I assume my connection is done correctly?

Thanks!
Support
2011-04-28T16:20:52Z
This is VB.NET but probably can convert it:

Quote:

' get a list of historic results
Dim jl As List(Of LogTaskHistoryClass) = ConnectionAPI.CurrentServer.Log.GetTaskHistory(TaskId, thisMorning, Now)



Use the "ExecutionId" property to retrieve the specific output:

Quote:

Private Function GetOutput(ByVal executionId As Guid, ByVal bolStandardOutput As Boolean) As String
If Not dicOutput.ContainsKey(executionId) Then
Dim ltoc As LogTaskOutputClass = ConnectionAPI.CurrentServer.Log.GetTaskOutput(executionId)

dicOutput.Add(executionId, ltoc)
End If

If bolStandardOutput Then
Return dicOutput(executionId).StandardOutput
Else
Return dicOutput(executionId).StandardError
End If
End Function


Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
fward
  •  fward
  • No customer Topic Starter
2011-04-28T17:25:01Z
There we go, that worked :)

Thanks!
klewis10367
2011-06-22T18:48:41Z
I am not a programmer and have no idea how to use the API..is there anyway the password can be given to access the SQL Server Compact Editon database so i can look at logs?
ErikC
2011-06-23T06:15:18Z
Originally Posted by: klewis10367 

I am not a programmer and have no idea how to use the API..is there anyway the password can be given to access the SQL Server Compact Editon database so i can look at logs?


I don't think the password will be given. And if support will give it to you it wil not be on the forum.
The golden rule for a password is to keep it hidden 😎.

Regards
Erik
Uses Visualcron since 2006.
Support
2011-06-23T13:58:25Z
Originally Posted by: klewis10367 

I am not a programmer and have no idea how to use the API..is there anyway the password can be given to access the SQL Server Compact Editon database so i can look at logs?



The main reason that we do not give the password is that we then bypass VisualCron security. The only way to access the database is when you have already logged on VisualCron - through client or API. Then we can give the information as the data itself may contain confidential output.
Henrik
Support
http://www.visualcron.com 
Please like  VisualCron on facebook!
Users browsing this topic
Scroll to Top