Destination data gathering and updating

rreynolds's Avatar

rreynolds

07 Jul, 2016 03:48 PM

Greetings,

I was approached with these questions and was hoping to hear some welcome input.

  1. Is there a way to create a select query to see if "Publish to this Destination by default" is enabled throughout the sites model against a standardized name publish target?

  2. In the KB documentation there is a way to disable all publish targets via the following line:

UPDATE cxml_destination SET isEnabled=0;

Is there a way to disable a single publish target with a standardized name throughout the sites model?

  1. Support Staff 1 Posted by Tim on 07 Jul, 2016 05:24 PM

    Tim's Avatar

    Hi,

    Is there a way to create a select query to see if "Publish to this Destination by default" is enabled throughout the sites model against a standardized name publish target?

    I imagine you could do something like this if you're just looking for a list of Destinations in each Site and whether or not they have that option checked:

    select d.id, d.name, d.path, d.isEnabled, d.checkedByDefault, s.name as "site" from cxml_destination d inner join cxml_site s on s.id = d.siteId
    

    In the KB documentation there is a way to disable all publish targets via the following line: UPDATE cxml_destination SET isEnabled=0;

    Is there a way to disable a single publish target with a standardized name throughout the sites model?

    If you're looking to disable all Destinations having a similar name, you would probably want to do something like this:

    update cxml_destination set isEnabled = 0 where name like '{standardized-name-%}'
    
    For example, if you had a Destination in Site A named Web Server - PROD - SiteA and then a Destination in Site B named Web Server - PROD - SiteB, disabling both of those would look like:
    update cxml_destination set isEnabled = 0 where name like 'Web Server - PROD -%'
    
    NOTE: Performing select queries on the database is fine, but you should always backup the database prior to any update commands just in case you need to restore. You'll also want to check in with us first (as you've done here) before updating any of the raw database data.

    Let me know if this helps.

    Thanks

  2. 2 Posted by rreynolds on 07 Jul, 2016 07:03 PM

    rreynolds's Avatar

    I think that about covers it. Thanks again Tim.

  3. Support Staff 3 Posted by Tim on 07 Jul, 2016 07:04 PM

    Tim's Avatar

    You bet! Just let us know if anything else comes up!

    Thanks

  4. Tim closed this discussion on 07 Jul, 2016 07:04 PM.

Comments are currently closed for this discussion. You can start a new one.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac