Oracle Solution for Error ora-01641

Solution for Oracle Error ORA-01641

ORA-01641: tablespace 'string' is not online - cannot add data file

What triggered the Error:

Attempting to add a datafile to a tablespace that has been set to read only or offline.

What should we do to fix it:

Make the tablespace online and read write then add the datafile.