VisualCron
»
Support
»
API
»
Accessing the log's database in management studio
 Rank: Newbie
Joined: 4/27/2011(UTC) Posts: 4 Location: Montreal
|
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!
|
|
|
|
|
|
 Rank: Administration
Joined: 2/23/2008(UTC) Posts: 6,169  Location: Sweden Thanks: 200 times Was thanked: 120 time(s) in 115 post(s)
|
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. |
|
|
|
|
|
|
 Rank: Newbie
Joined: 4/27/2011(UTC) Posts: 4 Location: Montreal
|
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: 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!
|
|
|
|
|
|
 Rank: Administration
Joined: 2/23/2008(UTC) Posts: 6,169  Location: Sweden Thanks: 200 times Was thanked: 120 time(s) in 115 post(s)
|
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 |
|
|
|
|
|
|
 Rank: Newbie
Joined: 4/27/2011(UTC) Posts: 4 Location: Montreal
|
There we go, that worked :)
Thanks!
|
|
|
|
|
|
 Rank: Advanced Member
Joined: 9/14/2009(UTC) Posts: 114 Location: Myrtle Beach
Was thanked: 1 time(s) in 1 post(s)
|
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?
|
|
|
|
|
|
 Rank: Advanced Member
Joined: 2/26/2008(UTC) Posts: 1,107  Location: Amsterdam, The Netherlands Thanks: 39 times Was thanked: 66 time(s) in 57 post(s)
|
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. |
|
|
|
|
|
 Rank: Administration
Joined: 2/23/2008(UTC) Posts: 6,169  Location: Sweden Thanks: 200 times Was thanked: 120 time(s) in 115 post(s)
|
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. |
|
|
|
|
|
|
| Users browsing this topic |
|
Guest
|
VisualCron
»
Support
»
API
»
Accessing the log's database in management studio
Forum Jump
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.