Article 5018P Selecting Custom parameters

Selecting Custom parameters

by
cbtshare
from LinuxQuestions.org on (#5018P)
Hello All,

I am migrating database from one account to another and need to get the custom parameters of the database. It looks like this

Code:{
"ParameterName": "tmpdir",
"ParameterValue": "/rdsdbdata/tmp/",
"Description": "The directory used for temporary files and temporary tables",
"Source": "system",
"ApplyType": "static",
"DataType": "string",
"IsModifiable": false,
"ApplyMethod": "pending-reboot"
}
{
"ParameterName": "tmp_table_size",
"ParameterValue": "67108864",
"Description": "If an in-memory temporary table exceeds the limit, MySQL automatically converts it to an on-disk MyISAM table. Increased value can improve perf for many advanced GROUP BY queries.",
"Source": "user",
"ApplyType": "dynamic",
"DataType": "integer",
"AllowedValues": "1024-18446744073709551615",
"IsModifiable": true,
"ApplyMethod": "immediate"
}
{
"ParameterName": "transaction_alloc_block_size",
"Description": "The amount in bytes by which to increase a per-transaction memory pool which needs memory.",
"Source": "engine-default",
"ApplyType": "dynamic",
"DataType": "integer",
"AllowedValues": "1024-18446744073709547520",
"IsModifiable": true,
"ApplyMethod": "pending-reboot"
}
{
"ParameterName": "transaction_prealloc_size",
"Description": "There is a per-transaction memory pool from which various transaction-related allocations take memory. For every allocation that cannot be satisfied from the pool because it has insufficient memory available, the pool is incremented.",
"Source": "engine-default",
"ApplyType": "dynamic",
"DataType": "integer",
"AllowedValues": "1024-18446744073709547520",
"IsModifiable": true,
"ApplyMethod": "pending-reboot"
}
{
"ParameterName": "tx_isolation",
"ParameterValue": "READ-COMMITTED",
"Description": "Sets the default transaction isolation level.",
"Source": "user",
"ApplyType": "dynamic",
"DataType": "string",
"AllowedValues": "READ-UNCOMMITTED,READ-COMMITTED,REPEATABLE-READ,SERIALIZABLE",
"IsModifiable": true,
"ApplyMethod": "immediate"
}I am only interested in ParameterName that has ParameterValues.

I have tried below but it prints columns without parameterValue, and changing || to && returns nothing
Code:aws rds describe-db-parameters --db-parameter-group-name -perf --output json | jq '.[] | .[]' | awk '/ParameterName/ || /ParameterValue/{print $0}'
also

Code:aws rds describe-db-parameters --db-parameter-group-name perf --profile old --output json | jq '.[] | .[]' | grep -e 'ParameterName' -e 'ParameterValue'produces similar results

I tried doing it all in jq
Code:aws rds describe-db-parameters --db-parameter-group-name perf --profile old --output json | jq ".[]|.[] | select((.ParameterName > 0) && .ParameterValue)"Can I please have some assistance?

Thank youlatest?d=yIl2AUoC8zA latest?i=gM3uiXc8xiI:9nScYhBfp0Y:F7zBnMy latest?i=gM3uiXc8xiI:9nScYhBfp0Y:V_sGLiP latest?d=qj6IDK7rITs latest?i=gM3uiXc8xiI:9nScYhBfp0Y:gIN9vFwgM3uiXc8xiI
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments