The database in recovery I use a database named BI, every night it is restored. It worked great but since some days ago it is shown that the database is in recover. I used
RESTORE &lt;BI&gt; WITH RECOVERY

but it gives me
RESTORE cannot operate on database 'BI' because it is configured for database mirroring or has joined an availability group. If you intend to restore the database, use ALTER DATABASE to remove mirroring or to remove the database from its availability group.

does anybody has other ideas to solve this problem?
Does anybody has other ideas to solve this problem?

Do as error message says, perhaps you connected wrong SQL Instance this time.
Using following query, you can verify whether the database part of AG or not:
select name, IIF(group_database_id IS NULL, 'NO', 'YES') is_joined_AG 
from sys.databases;

select DB_NAME (database_id) mirrored_db
from sys.database_mirroring
where mirroring_guid is not null;