cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted

opscenter customized sccript issue

SELECT DISTINCT B.friendlyName as 'Master Server', A.clientName as 'Client Name', A.policyName as 'Policy Name', LIST( DISTINCT A.statuscode) as 'Status Code', ( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful' from domain_JobArchive CKP where CKP.masterServerId = A.masterServerId AND CKP.id = CKP.parentJobId AND CKP.clientId = A.clientId AND CKP.policyId = A.policyId AND CKP.policyName = A.policyName AND CKP.policyType = A.policyType AND ( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ), ( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful' from domain_JobArchive BKP where BKP.masterServerId = A.masterServerId AND BKP.Id = BKP.parentJobId AND BKP.clientId = A.clientId AND BKP.policyId = A.policyId AND BKP.policyName = A.policyName AND BKP.policyType = A.policyType AND ( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ) FROM "domain_JobArchive" A , "domain_masterserver" B WHERE A.masterServerId = B.id AND A.id = A.parentjobid AND DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 120 AND ( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful' from domain_JobArchive CKP where CKP.masterServerId = A.masterServerId AND CKP.id = A.parentJobId AND CKP.clientId = A.clientId AND CKP.policyId = A.policyId AND CKP.policyName = A.policyName AND CKP.policyType = A.policyType AND CKP.scheduleType = A.scheduleType AND ( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) > 0 AND A.scheduleName != 'user_backup' AND A.statusCode not in (0,1,190,199,230,239,240,800,1000) AND A.policyName NOT LIKE 'SLP_%' AND A.type IN (0,22,28) AND A.scheduletype not in (-1,2) Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid ORDER BY B.friendlyName , A.clientName

 

Hi ALL,

 

I am using above opscenter custom scripts to generate what all backups that do not have run from past 120 hrs.Its giving me good result.Appreciate.

 

My query is:The query is giving the client name as media server where we have Vmware policies with query rule selected.

masterma1

mediame01

pol1

156

3

Feb 28, 2019 3:31:00 AM

 here the client tab contains the media server name.I want the client VM name here instead of the media server name.

i want the output to have the VM name instead of the Media server name.

 

Can the modified script be provided to me

 

 

4 Solutions

Accepted Solutions
Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

Hello,

I have reviewed my OpsCenter and I also use a variation of the same script. However I did not create it, it was searched via Google or was taken from a documentation. And, it is giving the same results from VIP based policies - so reporting Media Server as a client and also 1 successful job for any client in a policy is reported as a "last successful" job ot the whole failing policy.

Actually I think that fixing this script is a task for a brilliant SQL guru, not for a common OpsCenter admin:-)

Or I have another tip for you - some customers are using scripts working from VMware side, not NBU/Ops side. It is not so complex to report last successful VM backups from VMware. You can also engage NetBackup plug-in for VMware, it is giving similar reports.

Regards

Michal

View solution in original post

Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

Thanks Michael for the reply.

 

If any kind of script be provided to me that i can use at opscenter level or NBU level for my Vmware query based backup,i will be very greatful for that.

View solution in original post

Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

@noazara Here is the report for VMware jobs in the previous 24 hours.

 

SELECT DISTINCT
B.friendlyName as 'Master Server',
A.clientName as 'Client Name',
A.policyName as 'Policy Name',
LIST( DISTINCT A.statuscode) as 'Status Code',
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ),
( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful'
from domain_JobArchive BKP
where BKP.masterServerId = A.masterServerId AND
BKP.Id = BKP.Id AND
BKP.clientId = A.clientId AND
BKP.policyId = A.policyId AND
BKP.policyName = A.policyName AND
BKP.policyType = A.policyType AND
( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ),
( select DATEDIFF(hour,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Hours since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
--CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) )
FROM "domain_JobArchive" A , "domain_masterserver" B
WHERE
A.masterServerId = B.id AND A.id = A.id AND
DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 24
AND
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = A.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
CKP.scheduleType = A.scheduleType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) >= 0 AND
A.statusCode not in (0,200,230,239,240,800,1000) AND
A.policyName NOT LIKE 'SLP_%' AND A.policyType = 40 AND
A.scheduletype not in (-1,2) AND
A.clientName NOT LIKE '<media server>' AND A.clientName NOT LIKE '<media server>' AND A.clientName NOT LIKE '<media server>' AND
A.clientName not in ('server lists') AND -- NBU MASTER Servers
A.clientName not in ('server lists') AND -- NBU site1 MEDIA SERVERS
A.clientName not in ('server lists') AND -- NBU site2 MEDIA SERVERS
A.clientName not in ('server lists') AND -- NBU site3 MEDIA SERVERS
A.clientName not in ('server lists') -- NBU site4 MEDIA SERVERS
Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid,statuscode
ORDER BY B.friendlyName, 'Days since Last successful';

View solution in original post

Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

What version of OpsCenter are you running?

Also remove that last AND before 'Group By'. Remove the AND from the line below.

A.clientName NOT LIKE 'ma01' AND

View solution in original post

17 Replies
Highlighted

Re: opscenter customized sccript issue

Hi opscenter Champs.

 

 

 

Can i be helped on this.

Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

Hello,

I have reviewed my OpsCenter and I also use a variation of the same script. However I did not create it, it was searched via Google or was taken from a documentation. And, it is giving the same results from VIP based policies - so reporting Media Server as a client and also 1 successful job for any client in a policy is reported as a "last successful" job ot the whole failing policy.

Actually I think that fixing this script is a task for a brilliant SQL guru, not for a common OpsCenter admin:-)

Or I have another tip for you - some customers are using scripts working from VMware side, not NBU/Ops side. It is not so complex to report last successful VM backups from VMware. You can also engage NetBackup plug-in for VMware, it is giving similar reports.

Regards

Michal

View solution in original post

Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

Thanks Michael for the reply.

 

If any kind of script be provided to me that i can use at opscenter level or NBU level for my Vmware query based backup,i will be very greatful for that.

View solution in original post

Highlighted

Re: opscenter customized sccript issue

Hello,

we are spinning in a circle. The hints and comments above are a maximum I can do for you.

M.

Highlighted

Re: opscenter customized sccript issue

I modified this SQL query awhile back to several different types of backups. Add the following line after "A.scheduletype not in (-1,2) AND"

A.clientName NOT LIKE 'media server name' AND

add as many of these statements as you have media servers that are used as VM Backup Hosts. Make sure the statment ends in AND

If you want a seperate report just for VMware backups, you can do the following.

Throw in the following statement after "A.policyName NOT LIKE 'SLP_%' AND"

A.policyType = 40 AND

 

Let me know if you have any issues and I can just copy my entire SQL query if need be.

 

 

Highlighted

Re: opscenter customized sccript issue

Thanks A tonne.

Thanks a lot.If you can please copy ur SQL script,that would be really helpful.I really appreciate it

Highlighted

Re: opscenter customized sccript issue

I am running below query but still getting the media server name.

 


SELECT DISTINCT B.friendlyName as 'Master Server', A.clientName as 'Client Name', A.policyName as 'Policy Name', LIST( DISTINCT A.statuscode) as 'Status Code', ( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful' from domain_JobArchive CKP where CKP.masterServerId = A.masterServerId AND CKP.id = CKP.parentJobId AND CKP.clientId = A.clientId AND CKP.policyId = A.policyId AND CKP.policyName = A.policyName AND CKP.policyType = A.policyType AND ( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ), ( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful' from domain_JobArchive BKP where BKP.masterServerId = A.masterServerId AND BKP.Id = BKP.parentJobId AND BKP.clientId = A.clientId AND BKP.policyId = A.policyId AND BKP.policyName = A.policyName AND BKP.policyType = A.policyType AND ( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ) FROM "domain_JobArchive" A , "domain_masterserver" B WHERE A.masterServerId = B.id AND A.id = A.parentjobid AND DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 48 AND ( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful' from domain_JobArchive CKP where CKP.masterServerId = A.masterServerId AND CKP.id = A.parentJobId AND CKP.clientId = A.clientId AND CKP.policyId = A.policyId AND CKP.policyName = A.policyName AND CKP.policyType = A.policyType AND CKP.scheduleType = A.scheduleType AND ( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) > 0 AND A.scheduleName != 'user_backup' AND A.statusCode not in (0,1,190,199,230,239,240,800,1000) AND A.policyName NOT LIKE 'SLP_%' AND A.type IN (0,22,28) AND A.scheduletype not in (-1,2) AND A.clientName NOT LIKE 'med1' AND A.clientName NOT LIKE 'med2' Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid ORDER BY B.friendlyName , A.clientName

Highlighted

Re: opscenter customized sccript issue

Here it is. This only reports for VMware jobs that ran in the previous 24 hours.

SELECT DISTINCT
B.friendlyName as 'Master Server',
A.clientName as 'Client Name',
A.policyName as 'Policy Name',
LIST( DISTINCT A.statuscode) as 'Status Code',
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ),
( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful'
from domain_JobArchive BKP
where BKP.masterServerId = A.masterServerId AND
BKP.Id = BKP.Id AND
BKP.clientId = A.clientId AND
BKP.policyId = A.policyId AND
BKP.policyName = A.policyName AND
BKP.policyType = A.policyType AND
( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ),
( select DATEDIFF(hour,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Hours since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
--CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) )
FROM "domain_JobArchive" A , "domain_masterserver" B
WHERE
A.masterServerId = B.id AND A.id = A.id AND
DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 24
AND
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = A.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
CKP.scheduleType = A.scheduleType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) >= 0 AND
A.statusCode not in (0,200,230,239,240,800,1000) AND
A.policyName NOT LIKE 'SLP_%' AND A.policyType = 40 AND
A.scheduletype not in (-1,2) AND
A.clientName NOT LIKE '<media server>' AND A.clientName NOT LIKE '<media server>' AND A.clientName NOT LIKE '<media server>' AND
A.clientName not in ('server lists') AND -- NBU MASTER Servers
A.clientName not in ('server lists') AND -- NBU site1 MEDIA SERVERS
A.clientName not in ('server lists') AND -- NBU site2 MEDIA SERVERS
A.clientName not in ('server lists') AND -- NBU site3 MEDIA SERVERS
A.clientName not in ('server lists') -- NBU site4 MEDIA SERVERS
Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid,statuscode
ORDER BY B.friendlyName, 'Days since Last successful';

 

Highlighted

Re: opscenter customized sccript issue

Some reason old posts weren't showing posted, now it looks like I spammed the same comment.

Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

@noazara Here is the report for VMware jobs in the previous 24 hours.

 

SELECT DISTINCT
B.friendlyName as 'Master Server',
A.clientName as 'Client Name',
A.policyName as 'Policy Name',
LIST( DISTINCT A.statuscode) as 'Status Code',
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ),
( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful'
from domain_JobArchive BKP
where BKP.masterServerId = A.masterServerId AND
BKP.Id = BKP.Id AND
BKP.clientId = A.clientId AND
BKP.policyId = A.policyId AND
BKP.policyName = A.policyName AND
BKP.policyType = A.policyType AND
( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ),
( select DATEDIFF(hour,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Hours since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
--CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) )
FROM "domain_JobArchive" A , "domain_masterserver" B
WHERE
A.masterServerId = B.id AND A.id = A.id AND
DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 24
AND
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = A.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
CKP.scheduleType = A.scheduleType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) >= 0 AND
A.statusCode not in (0,200,230,239,240,800,1000) AND
A.policyName NOT LIKE 'SLP_%' AND A.policyType = 40 AND
A.scheduletype not in (-1,2) AND
A.clientName NOT LIKE '<media server>' AND A.clientName NOT LIKE '<media server>' AND A.clientName NOT LIKE '<media server>' AND
A.clientName not in ('server lists') AND -- NBU MASTER Servers
A.clientName not in ('server lists') AND -- NBU site1 MEDIA SERVERS
A.clientName not in ('server lists') AND -- NBU site2 MEDIA SERVERS
A.clientName not in ('server lists') AND -- NBU site3 MEDIA SERVERS
A.clientName not in ('server lists') -- NBU site4 MEDIA SERVERS
Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid,statuscode
ORDER BY B.friendlyName, 'Days since Last successful';

View solution in original post

Highlighted

Re: opscenter customized sccript issue

Thanks.Really appreciated.

I have master server as the media server.

SELECT DISTINCT
B.friendlyName as 'Master Server',
A.clientName as 'Client Name',
A.policyName as 'Policy Name',
LIST( DISTINCT A.statuscode) as 'Status Code',
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ),
( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful'
from domain_JobArchive BKP
where BKP.masterServerId = A.masterServerId AND
BKP.Id = BKP.Id AND
BKP.clientId = A.clientId AND
BKP.policyId = A.policyId AND
BKP.policyName = A.policyName AND
BKP.policyType = A.policyType AND
( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ),
( select DATEDIFF(hour,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Hours since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
--CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) )
FROM "domain_JobArchive" A , "domain_masterserver" B
WHERE
A.masterServerId = B.id AND A.id = A.id AND
DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 24
AND
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = A.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
CKP.scheduleType = A.scheduleType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) >= 0 AND
A.statusCode not in (0,200,230,239,240,800,1000) AND
A.policyName NOT LIKE 'SLP_%' AND A.policyType = 40 AND
A.scheduletype not in (-1,2) AND
A.clientName NOT LIKE 'ma01' AND
A.clientName not in ('ma01') AND
Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid,statuscode
ORDER BY B.friendlyName, 'Days since Last successful';


Getting below error:

OpsCenter-10881:Failed to execute specified SQL-- SQL Anywhere Error -131: Syntax error near 'Group' on line 53.

Highlighted

Re: opscenter customized sccript issue

Remove "A.clientName not in ('ma01') AND" and let me know if you still get an error.

Highlighted

Re: opscenter customized sccript issue

still the error.

 

SELECT DISTINCT
B.friendlyName as 'Master Server',
A.clientName as 'Client Name',
A.policyName as 'Policy Name',
LIST( DISTINCT A.statuscode) as 'Status Code',
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ),
( select UtcBigIntToNomTime(MAX(BKP.endTime)) as 'Last successful'
from domain_JobArchive BKP
where BKP.masterServerId = A.masterServerId AND
BKP.Id = BKP.Id AND
BKP.clientId = A.clientId AND
BKP.policyId = A.policyId AND
BKP.policyName = A.policyName AND
BKP.policyType = A.policyType AND
( BKP.statusCode = 0 OR BKP.statusCode = 1 ) ),
( select DATEDIFF(hour,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Hours since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
--CKP.id = CKP.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) )
FROM "domain_JobArchive" A , "domain_masterserver" B
WHERE
A.masterServerId = B.id AND A.id = A.id AND
DATEDIFF(hour,UtcBigIntToNomTime(A.endTime), GETDATE()) <= 24
AND
( select DATEDIFF(DAY,UtcBigIntToNomTime(MAX(CKP.endTime)),GETDATE()) as 'Days since Last successful'
from domain_JobArchive CKP
where CKP.masterServerId = A.masterServerId AND
CKP.id = A.Id AND
CKP.clientId = A.clientId AND
CKP.policyId = A.policyId AND
CKP.policyName = A.policyName AND
CKP.policyType = A.policyType AND
CKP.scheduleType = A.scheduleType AND
( CKP.statusCode = 0 OR CKP.statusCode = 1 ) ) >= 0 AND
A.statusCode not in (0,200,230,239,240,800,1000) AND
A.policyName NOT LIKE 'SLP_%' AND A.policyType = 40 AND
A.scheduletype not in (-1,2) AND
A.clientName NOT LIKE 'ma01' AND
Group by A.clientName,A.masterServerId,A.policyName,B.friendlyName,policyType,scheduleType,clientid,policyid,statuscode
ORDER BY B.friendlyName, 'Days since Last successful';

 

 

i have attached the error

 
OpsCenter-10881:Failed to execute specified SQL-- SQL Anywhere Error -131: Syntax error near 'Group' on line 52.
Highlighted
Accepted Solution!

Re: opscenter customized sccript issue

What version of OpsCenter are you running?

Also remove that last AND before 'Group By'. Remove the AND from the line below.

A.clientName NOT LIKE 'ma01' AND

View solution in original post

Highlighted

Re: opscenter customized sccript issue

8.1.1

Highlighted

Re: opscenter customized sccript issue

Thanks a lot.It did work.

Highlighted

Re: opscenter customized sccript issue

Happy to help.