How can I filter an extended event by database in SQL Server 2008 R2 If I do an extended event session like this in SQL Server 2008 R2:

CREATE EVENT SESSION [Query tracing] ON SERVER 
ADD EVENT sqlserver.rpc_completed 
    (
        ACTION(sqlserver.sql_text)
        WHERE sqlsever.database_name = 'master'


I get an error:


  Msg 25706, Level 16, State 8, Line 8
  The event attribute or predicate source, "sqlsever.database_name", could not be found.


The same occurs for WHERE sqlsever.database_id = DB_ID('master')

Is there any way to filter by database?
Two things that are the problem.

There is no database_name action in SQL Server 2008 R2 (it was introduced in SQL Server 2012):

select
    action_name = 
        p.name + '.' + o.name
from sys.dm_xe_objects o
inner join sys.dm_xe_packages p
on o.package_guid = p.guid
where o.object_type = 'action'
and o.name like '%database%';


The output from that is:

action_name
-----------
sqlserver.database_id
sqlserver.database_context


But there is sqlserver.database_id.  The second problem is that your attempt with database_id didn't work because you have a typo (you have "sqlsever", missing an "r").