Skip to main content

First question: How to know the list of databases configured from a subclient sub2017 using command line?

How am I performing other operations:

qlogin -sso -gt
qlist client -tk $authToken
qoperation execute -tk $authToken -af "C:\Program Files\Delphix\DelphixConnector\ec23b263-5fec-9281-1b46-e1e7d211abc5-staging-1\SCRIPT\dlpx-d82e226d-951e-4738-b97e-1e682a8ccf94.xml"
qlist job -tk $authToken -j 157967 -format xml -waitForJobComplete
qlogout -tk $authToken

In similar manner, I want to fetch the databases for a subclient.

 

Second question: How to fetch the subclient properties for a subclient?

I have tried the follow commands:

 qoperation execute -tk $authToken -af "C:\Program Files\Delphix\get-sublient-prop.xml" -appName "SQL Server" -clientName "win2016s-97e2.dl.co" -backupSetName defaultBackupSet -subclientName sub2017 

Error:

 qoperation : execute: Error 0x911: Failed to process request due to invalid entity information.Invalid subclientId for subclientNameesub2017].
At line:1 char:1
+ qoperation execute -tk $authToken -af "C:\Program Files\Delphix\get-s ...
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+ CategoryInfo : NotSpecified: (execute: Error ...tNameesub2017].:String) ], RemoteException
+ FullyQualifiedErrorId : NativeCommandError

 

But when I use the same command with subclient -  default

 qoperation execute -tk $authToken -af "C:\Program Files\Delphix\get-sublient-prop.xml" -appName "SQL Server" -clientName "win2016s-97e2.dlpxdc.co" -subclientName "default" 

I am getting the result successfully.

Hello ​@KaranArora 

What version are you running here?

I tested this in lab and had no issues with user created subclient
It should return all properties including content:
 

qoperation execute -af "E:\scott\get_subclient_properties_template.xml" -appName "SQL Server" -clientName "SQL01" -subclientName scotttest 

 


    <content>
      <mssqlDbContent databaseId="4" databaseName="msdb" discoverType="AUTO"/>
    </content>


 


HI ​@KaranArora ,

Apart from the above command line you may also refer below API to fetch the sub client properties details.

https://documentation.commvault.com/11.20/rest_api_get_subclient_properties.html


Hi ​@Scott Reynolds 

I am using v11.28

When I am checking properties of default subclient, it is working fine as shown in the screenshot.

 

where as for other clients, I am getting the error, please check:

 

@Pradeep I cannot use REST API in my environment, we are using q commands from the java application.


While searching more and more I have found this command:

https://documentation.commvault.com/2024e/expert/getsqlsubclientinfo.html

PS C:\Users\delphix> qoperation execscript -tk $authToken -sn GetSQLSubclientConf.sql -si c="win2016s-iral-qar-170279-766f97e2.dlpxdc.co" -si a=Q_MSSQL -si i="10-110-230-68\SQL2017" -si s="sub2017"

Result:

QScript[GetSQLSubclientConf] CS[_Disabled__Disabled_10] DB[CommServ]
Qscript Output:
Client [win2016s-iral-qar-170279-766f97e2.dlpxdc.co], iDA [Q_MSSQL], Instance [10-110-230-68\SQL2017], Backupset [], Subclient [sub2017].
Database
--------
SourceDB2017
DB1

Qscript Execution Succeeded!

 

Strangely, I am not getting the result for the subclient which was created through the XML


PS C:\Users\delphix> qoperation execscript -tk $authToken -sn GetSQLSubclientConf.sql -si c="win2016s-iral-qar-170279-766f97e2.dlpxdc.co" -si a=Q_MSSQL -si i="10-110-230-68\SQL2016" -si s="SQL2016"

QScripttGetSQLSubclientConf] CSS_Disabled__Disabled_10] DBBCommServ]
Qscript Output:
Client win2016s-iral-qar-170279-766f97e2.dlpxdc.co], iDA Q_MSSQL], Instance 10-110-230-68\SQL2016], Backupset ], Subclient SQL2016].

Database

--------

Qscript Execution Succeeded!

Though, it is linked to one of the MSSQL database, it’s backup job is also successful.

In UI also, it is not visible. Do you guys know the reason ​@Scott Reynolds ​@Pradeep ?

 

 

 

 


Reply