what databases are already set up in the log-shipping, and which ones are not?
that worked fine but there is a much easier way to monitor and have a look at the log shipping settings by using the log shipping tables in the msdb.
for instance:
msdb.dbo.log_shipping_primary_databases

Stores one record for the primary database in a log shipping
configuration. This table is stored in the msdb database.

 select * from msdb.dbo.log_shipping_primary_databases