Posts Tagged ‘MSSQL’

[MSSQL] 授權-SQL Server Integration Services

2011 年 04 月 28 日

參考資料:
http://nickliao1.blogspot.com/2010/11/client-mssms-ssisdcom.html
http://support.microsoft.com/kb/940232/zh-tw
http://msdn.microsoft.com/zh-tw/library/ms141053.aspx

USE [master]
GO
CREATE LOGIN [STC\db_ssisadmin] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
USE [msdb]
GO
CREATE USER [STC\db_ssisadmin] FOR LOGIN [STC\db_ssisadmin]
GO
exec sp_addrolemember @rolename=’db_ssisadmin’, @membername=’STC\db_ssisadmin’
go

USE [master]
GO
CREATE LOGIN [STC\db_ssisltduser] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
USE [msdb]
GO
CREATE USER [STC\db_ssisltduser] FOR LOGIN [STC\db_ssisltduser]
GO
exec sp_addrolemember @rolename=’db_ssisltduser’, @membername=’STC\db_ssisltduser’
go

USE [master]
GO
CREATE LOGIN [STC\db_ssisoperator] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
USE [msdb]
GO
CREATE USER [STC\db_ssisoperator] FOR LOGIN [STC\db_ssisoperator]
GO
exec sp_addrolemember @rolename=’db_ssisoperator’, @membername=’STC\db_ssisoperator’
go

廣告

[MSSQL] 授權-SQL Server Profiler

2011 年 04 月 28 日

參考資料: http://msdn.microsoft.com/zh-tw/library/ms187611.aspx

USE [master] 

GO
CREATE LOGIN [STC\SQLProfilerTrace] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
GRANT ALTER TRACE TO [STC\SQLProfilerTrace]
GO

[MSSQL] 授權-SQL Server Agent Job

2011 年 04 月 28 日

參考資料: http://technet.microsoft.com/zh-tw/library/ms188283.aspx

USE [master] 

GO
CREATE LOGIN [STC\SQLAgentOperatorRole] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
USE [msdb]
GO
CREATE USER [STC\SQLAgentOperatorRole] FOR LOGIN [STC\SQLAgentOperatorRole]
GO
exec sp_addrolemember @rolename='SQLAgentOperatorRole', @membername='STC\SQLAgentOperatorRole'
go

USE [master]
GO
CREATE LOGIN [STC\SQLAgentReaderRole] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
USE [msdb]
GO
CREATE USER [STC\SQLAgentReaderRole] FOR LOGIN [STC\SQLAgentReaderRole]
GO
exec sp_addrolemember @rolename='SQLAgentReaderRole', @membername='STC\SQLAgentReaderRole'
go

USE [master]
GO
CREATE LOGIN [STC\SQLAgentUserRole] FROM WINDOWS WITH DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[繁體中文]
GO
USE [msdb]
GO
CREATE USER [STC\SQLAgentUserRole] FOR LOGIN [STC\SQLAgentUserRole]
GO
exec sp_addrolemember @rolename='SQLAgentUserRole', @membername='STC\SQLAgentUserRole'
go