How to create user for existing
Is this ok ?

The db_datareader role gives implicit access to SELECT against all tables and views in a database.

If that's ok, then it's ok

You might be interested in the information in this post about db_datareader

You can conditionally check to see if the user already exists

use myDB
GO

if not exists(select * from sys.database_principals where name = 'foo')
-- create your database user


When restoring or attaching databases where the user already exists, you might have to 'remap' any Sql logins to the restored database.  This is what I use as part of normal 'refresh' scripts

use &lt;YourDatabase&gt;
go
set nocount on
declare @cmd varchar(max)=''
select
    @Cmd=@cmd + 'ALTER USER ' + dp.name + ' WITH LOGIN = ' + dp.name + ';' + char(10)
from
    sys.database_principals dp left join
    master.sys.server_principals sp on
        sp.name=dp.name
where
    dp.type='s' and
    dp.default_schema_name&lt;&gt;dp.name and
    sp.name is not null
exec (@cmd)