CS: Performance

Symptoms:
When you have a large data set in the repository, the object_name clause (‘and object_name=’) in the folder query generated by the IDfSession.getFolderByPath API produces very slow SQL on Content Server.

Cause:
The large number and depth of folders leads to poor execution performance of folder query SQL.

Resolution:
Configure DFC by copying the following two properties from dfcfull.properties to dfc.properties and set appropriate values:

  • dfc.query.object_name_for_docbase: Name of the repository in which object_name clause needs to be included or not in the folder query present in IDfSession.getFolderByPath API.

    Specify the repository you are working with.

  • dfc.query.should_include_object_name: This value is used when running a folder query through the IDfSession.getFolderByPath API. It determines whether to include or not object_name clause in the query for the docbase specified in dfc.query.object_name_docbase. If it is explicitly mentioned as false, the object_name clause will not be included in the query for the docbase name that is mentioned in dfc.query.object_name_docbase.
    Default value is true.

    Set it to false to alleviate performance.

If there are multiple docbases to which you want to disable this object_name qualifier, you have to enter it in the following way in dfc.properties:

dfc.query.object_name_for_docbase[0]=<docbase_name1>
dfc.query.should_include_object_name[0]=false
dfc.query.object_name_for_docbase[1]=<docbase_name2>
dfc.query.should_include_object_name[1]=false

CS: enable SQL Trace

Commands to Enable / Disable sqltrace for a particular user:
apply,c,NULL,SET_OPTIONS,OPTION,S,sqltrace,VALUE,B,T,USERNAME,S,<user name>
apply,c,NULL,SET_OPTIONS,OPTION,S,sqltrace,VALUE,B,F,USERNAME,S,<user name>

Commands to Enable / Disable sqltrace for a particular session:
apply,c,NULL,SET_OPTIONS,OPTION,S,sqltrace,VALUE,B,T,SESSION_ID,S,<session id>
apply,c,NULL,SET_OPTIONS,OPTION,S,sqltrace,VALUE,B,F,SESSION_ID,S,<session id>

Example: steps performed to enable sqltrace for a user <testuser1>
Connected to IAPI via installation owner and fired below statement:
apply,c,NULL,SET_OPTIONS,OPTION,S,sqltrace,VALUE,B,T,USERNAME,S,testuser1

Later connected to IDQL as testuser1 and ran the following DQL:
select r_object_id, object_name from dm_document where r_creation_date >= date(today);

Later connected to IAPI as installation owner and turned off sqltrace
apply,c,NULL,SET_OPTIONS,OPTION,S,sqltrace,VALUE,B,F,USERNAME,S,testuser1

DCTM – Get user permissions in ACL

below query gives the result

 

select * from dm_user where
(
user_name in
(
select distinct(i_all_users_names) from dm_group where group_name in
(
select r_accessor_name from dm_acl where object_name = ‘<ACL_NAME>’ and r_accessor_permit >= 4
)
)
OR
user_name in
(
select r_accessor_name from dm_acl where object_name = ‘<ACL_NAME>’ and r_accessor_permit >= 4
)
)
and user_name = ‘<USER_NAME>’
enable(row_based);

 

source: https://community.emc.com/thread/196461

Also can use

execute check_security with username=’username’, level=x, object_list=’listofobjectids’ with groupname=’groupnamehere’ for groups

xCP – Cleanup space

  1. Fire the following query and note the <r_object_id> of the latest version of xcp_atrifact_bundle
select r_object_id, namespace, r_version_label from xcp_artifact_bundle (all) where namespace='<namespace>’
  1. Fire the following query to delete all the older versions. Be very careful in noting the object ID. It should be the object ID of the latest version of the object.
delete xcp_artifact_bundle (all)  objects where namespace = ‘<namespace>’ and r_object_id != ‘<r_ojbect_id> noted in first query’
  1. Once the objects are deleted, run dm_DMClean job to purge the older objects and its content from repository by navigating to “Job Management” > Jobs. Select dm_DmClean job. Right click and run.
You can do the same clean up for the xcpui, xcpcommons and xCP core in the xcp_artifact_bundle.

xCP – logger configuration for search service

– Log4j configuration:
Add the following lines in the
        log4j.properties of the application found under <app server>\webapps\<app_name>\WEB-INF\classes:
        #XCP Search REST classes
log4j.logger.com.emc.xcp.rest.search=DEBUG
#For Real-Time Query
log4j.logger.com.emc.xcp.rest.search.realtime=DEBUG
#For Full-Text Query
log4j.logger.com.emc.xcp.rest.search.fulltext=DEBUG

D2 – Columns in doclist

1) D2 will check D2-Config -> Interface -> Display configuration first:
If the listed object type is in “Selected type” pane and the property is configured with a Dictionary, then D2 will follow the Dictionary.

User-added image

2) If there’s no Dictionary configured, D2 will look into the object type definition:
In Composer, open the target object type, and find the label in “Display” tab, the label defined will be displayed in D2 Doclist widget.
User-added image