SQL Change Automation 4

SQL Change Automation and Amazon RDS

You can use the SQL Change Automation development and deployment tools with Amazon RDS the same way you use it with on-premise SQL Server. 

There is one adjustment that is necessary to get baselining working from RDS to a local development database - the baseline script contains this in addition to the expected script:


  1. DECLARE @associate bit 
  2.  
  3. SELECT @associate = CASE SERVERPROPERTY('EngineEdition') WHEN 5 THEN 1 ELSE 0 END 
  4.  
  5. IF @associate = 0 EXEC sp_executesql N'SELECT @count = COUNT(*) FROM master.dbo.syslogins WHERE loginname = N''sca''', N'@count bit OUT', @associate OUT 
  6.  
  7. IF @associate = 1 
  8.  
  9. BEGIN 
  10.  
  11.     PRINT N'Creating user [sca] and mapping to the login [sca]' 
  12.  
  13.     CREATE USER [sca] FOR LOGIN [sca] 
  14.  
  15. END 
  16.  
  17. ELSE 
  18.  
  19. BEGIN 
  20.  
  21.     PRINT N'Creating user [sca] without login' 
  22.  
  23.     CREATE USER [sca] WITHOUT LOGIN 
  24.  
  25. END 
  26.  
  27. GO 
  28.  
  29. PRINT N'Altering members of role db_owner' 
  30.  
  31. GO 
  32.  
  33. ALTER ROLE [db_owner] ADD MEMBER [sca] 
  34.  
  35. GO 

To get the project working with this baseline script you need to manually modify it to remove the extra statements.


Didn't find what you were looking for?