Solution to error NID-00135 in Oracle 10g, Solaris 10
The "damn thing" tries to prevent you from destroying your database. The error is described in the manual. You did not await the shutdown immediate of your database but killed the oracle processes. Therefor not all sessions could be rolled back. Start the database again and make a shutdown immediate and wait until the database is shut down cleanly.

Stop the listner make a local connection with the dbnewid utility. The dbnewid utility is described in the manual too. You have always a good chance to destroy your database if you handle the dbnewid utility in the wrong way. The dbnewid is necessary to change the id of the database that is used by rman in an rmancatalog. if you dont use an rmancatalog th change of the dbid is not necessary. Renaming can be done by recreating the controlfile. Often it suffices only to change the insatnce name. This can be done in the parameterfile (init.ora, spfile.ora)

The simplest and therefore best way to create a copy of the production database for testing is to use the rman duplicate database command.

The reason why it tooks so long to shutdown your database is that there is a long running transaction that must be rolled back. Such a situation can be avoided if you recover your database to a point in time where no such long transactions where running on the database.