The sp_dbcmptlevel stored procedure affects behaviors only for the specified database, not for the entire server. sp_dbcmptlevel provides only partial backward compatibility with earlier versions of SQL Server. A database containing an indexed view cannot be changed to a compatibility level lower than 80.
The best practice to change the compatibility level of database is in following three steps.
Set the database to single user access mode by using
ALTER DATABASE SET SINGLE_USER
Change the compatibility level of the database.
Put the database in multiuser access mode by using
ALTER DATABASE SET MULTI_USER