This simple automation pack allow to execute a single at a time generic query on a MySQL Server. It adds:
- Process "MySQL Generic Query", and a "Sample SQL" to illustrate how to use it
- MySQL Database target type, with a "MySQL Server" tab to specify connectivity parameters, and is the required target type for "MySQL Generic Query" process
- MySQL database
- Query: only a single query at a time. If you put multiple queries (separated by a ";"), the process would fail (or have an untested behavior).
- SELECT with multiple output format: choose between XML/JSON/RAW
- SELECT with single output expected: If you expect a single output, like "SELECT COUNT(FIELD) FROM ...", set this to true. Unless, let the default value (false)
SELECT (single output) will return the value
SELECT will return an XML / JSON / RAW (like following examples)
INSERT/UPDATE/DELETE will return the count of affected rows
For other types of query it depends (direct output of powershell ExecuteNonQuery). For example, DROP TABLE will return 0 even if the table is actually dropped.
- Warning: should be empty, unless multiple ";" are detected (may be normal, but may also be because of multiple queries detected) or if you execute other type of query, to warn you that the return value may be untrustworthy.
- Requieres the MySQL .NET provider for Windows, which can be download from https://dev.mysql.com/downloads/connector/net/ (tested with 6.8.3)
- Depending on the size of the output (string value), you may experience warnings / errors in the windows event log. This can be configured since CPO 3.0 using File --> Environment properties --> Execution limits (mainly String Variable Size).
Please test and give me feedbacks for futur releases!
v18.104.22.168: Choosing output format XML / JSON / ROW
v22.214.171.124: Adding target type "MySQL Database" and using this target type (not initial "generic service" extension), Checking MySQL .NET Connector presence, Adding the sample workflow in the MySQL category.
v126.96.36.199: Correcting a bug regarding SELECT statements beginning with '(' (ex: may be used when using UNION)
v188.8.131.52: Simplifying outputs to simplify usability
v184.108.40.206: Initial release
Sample SELECT XML output (you can easily parse it with Read Table from XML activity using MySQL-CPO-Query-Row as Row XML element name):
Hello.I have two Cisco Multilayer Fabric Switches (MDS) that are currently on production. They are DS-C9124-K9 switches, as shown in Figure 1. I don't have info about their NX-OS software versions or their current memory contents.Figure 1: Network Diagram...
Hi, A client asked me to configure the OOB mgmt IP on a few N9K in ACI-OS without any APIC before sending the devices to the DC.I personnally do not see any advantage of doing that, but I want to know if technically there is a way to do it (without A...
Hi, Can anyone offer any clarification on the use of "system routing template-internet-peering" on a Nexus N9K-C9336C-FX2. When this is configured, the following message is generated: switch(config)# system routing template-internet-peering...
Hi ACI fans,in the qosClass configuration (qosInstPol: uni/infra/qosinst-default) there is the qosClass configuration.In the 4.x GUI it's under Fabric > Access Policies > Policies > Global > QoS Class.Each QoS class (Level 1 - 6) can be enable...
Hi, I can't console to any of the switches from our terminal servers for some reason and getting the following error:%connections to that host not permitted from this terminal how can I go by troubleshooting this? regards,