Properties

Name: sa 
Friendly Name: English 
System:  
Default Database: master 
Deny Windows Security Authenticated Connections:  
Type: SQL Server standard 
Permissions to Access the Server:  

Users with this login

Database User
  master  dbo 
  tempdb  dbo 
  model  dbo 
  msdb  dbo 
  pubs  dbo 
  Northwind  dbo 
  aanf  dbo 
  almirante  dbo 
  antinucciIT  dbo 
  aspnetstore  dbo 
  B_INDA  dbo 
  BIC  dbo 
  cast  dbo 
  ciak  dbo 
  CompulsionAsset  dbo 
  distmodel  dbo 
  farmacia  dbo 
  immobiliare  dbo 
  isvema  dbo 
  ivd  dbo 
  juli  dbo 
  lportal  dbo 
  mb_pg  dbo 
  metamedica  dbo 
  mGiove  dbo 
  MTC  dbo 
  ofbiz_ap  dbo 
  ofbiz  dbo 
  ofbiz_mnet  dbo 
  ofbiz2  dbo 
  OLAP_REPOSOTORY_SPAIN  dbo 
  privacy  dbo 
  QM  dbo 
  regina  dbo 
  RIO_WEB  dbo 
  romesweethome  dbo 
  SICVE_TEST  dbo 
  student  dbo 
  sun_marte  dbo 
  sun_terra  dbo 
  sun_terra_door  dbo 
  sun_terra_terminal  dbo 
  sun_venus  dbo 
  sun2_marte  dbo 
  sun2_marte2  dbo 
  sun2_terra  dbo 
  SUSDB  dbo 
  Terra  dbo 
  Terra_copy  dbo 
  TERRA_DOOR  dbo 
  terra_v2  dbo 
  Test  dbo 
  UIPState  dbo 
  UIPstore  dbo 
  uVersion  dbo 
  WH_TEST  dbo 

Roles with this Login

Role
  sysadmin 

SQL

if not exists (select * from master.dbo.syslogins where loginname = N'sa')
BEGIN
    declare @logindb nvarchar(132), @loginlang nvarchar(132) select @logindb = N'master', @loginlang = N'us_english'
    if @logindb is null or not exists (select * from master.dbo.sysdatabases where name = @logindb)
        select @logindb = N'master'
    if @loginlang is null or (not exists (select * from master.dbo.syslanguages where name = @loginlang) and @loginlang <> N'us_english')
        select @loginlang = @@language
    exec sp_addlogin N'sa', null, @logindb, @loginlang
END
GO

See Also

Server overview
Logins list