Ask Your Question
0

sqlserver module svrroles

asked 2015-08-15 08:44:44 -0500

Diablo gravatar image

Hello All,

I'm trying to use the puppetlabs/sqlserver module on a windows 2012 Server installing SQL 2014. I have everything except a login creation working the way it should:

sqlserver::login{ $sql_server_user:
  password => $sql_user_pwd,
  instance => $instance_name,
  svrroles => [ { 'sysadmin' => 1  } ],
  check_policy => false,
  require    => Sqlserver_instance[$instance_name],
 }

The problem seems to be the svrroles attribute. If I leave it out, the user gets created as expected, but obviously has no permissions to do anything. I can't seem to find an example of someone using this particular attribute. When I run a SQL trace I noticed the following:

IF IS_SRVROLEMEMBER('{"sysadmin"=>"1"}','sitecore_user') !=  THROW 51000, 'ERROR: a role is not correct for {"sysadmin"=>"1"}', 10

So it looks like the role is passing incorrectly, but I can't seem to find the right syntax. This looks like it should be easy to address, if someone can point me in the right direction.

Thanks in advance for any help.

edit retag flag offensive close merge delete

1 Answer

Sort by ยป oldest newest most voted
0

answered 2015-08-18 13:05:25 -0500

Diablo gravatar image

updated 2015-08-18 13:06:30 -0500

I found the answer, so I'm putting this here for posterity:

sqlserver::login{ $sql_server_user:
  password => $sql_user_pwd,
  instance => $instance_name,
  svrroles => { 'sysadmin' => 1 },
  check_policy => false,
  require    => Sqlserver_instance[$instance_name],
 }
edit flag offensive delete link more

Your Answer

Please start posting anonymously - your entry will be published after you log in or create a new account.

Add Answer

Question Tools

1 follower

Stats

Asked: 2015-08-15 08:44:44 -0500

Seen: 32 times

Last updated: Aug 18 '15