I have inherited a project that uses a local Microsoft SQL Server 2012 Express Edition and a central SQL Server 2012 as a backup.
There may be multiple local "machines"/databases that all are linked to the same server.
I have a script (query) that creates the linked server and the remote user.
Do I need to create a new user for each machine or can all machines use the save remote user?
The script looks like this:
USE [master]
GO
/****** Object: LinkedServer [FOODB001] Script Date: 2015-04-16 21:36:49 ******/
EXEC master.dbo.sp_addlinkedserver @server = N'FOODB001',
@srvproduct = N'SQL Server'
EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname = N'FOODB001',
@useself = N'False',
@locallogin = NULL,
@rmtuser = N'MyUser',
@rmtpassword = 'password'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'collation compatible',
@optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'data access',
@optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'dist',
@optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'pub',
@optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'rpc',
@optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'rpc out',
@optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'sub',
@optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'connect timeout',
@optvalue = N'0'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'collation name',
@optvalue = NULL
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'lazy schema validation',
@optvalue = N'false'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'query timeout',
@optvalue = N'0'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'use remote collation',
@optvalue = N'true'
GO
EXEC master.dbo.sp_serveroption @server = N'FOODB001',
@optname = N'remote proc transaction promotion',
@optvalue = N'true'
GO