Depends on the command ..
Commands like backup, restore , archive will not work when a connection to the db is active.
As a rule of thumb, if a command uses name of the database in the command (eg. archive log for db <dbname> ) , then a connection is not required and often, will not work if connected to a db ..
HTH
Sathyaram