I need help in altering multiple tablespaces at once in Oracle Database 11g. My particular scenario is that this command will be used in a shell script to set all of the tablespaces in read-write mode for upgrade purposes. The problem is that each server has a different number of tablespaces, so i can't hardcode the names right in. To solve this I will make a list of all the relevant tablespaces by using the datafiles and I want to pass this list it as an argument.
For instance, you alter one tablespace as such :
ALTER TABLESPACE DATA1 READ ONLY;
I want to do something of the likes :
ALTER TABLESPACE DATA1,DATA2,DATA3 READ ONLY;
Is this possible? If so what is the exact syntax. Thanks in advance!