Come for the products,
stay for the community

The Atlassian Community can help you and your team get more value out of Atlassian products and practices.

Atlassian Community about banner
Community Members
Community Events
Community Groups

Migrate local group memberships between directories (SQL)

There is a KB article titled "Migrate local group memberships between directories" ( and it gives the MySQL query to output the needed CSV file for migrating groups between directories (step 1). Is anyone able to translate this MySQL into SQL that can be used on Microsoft SQL Server? Or does anyone know how the CSV should be formatted so I can populate it manually? Thanks!


SELECT cu.lower_user_name, cg.lower_group_name 
  FROM cwd_user cu 
      JOIN cwd_membership cm ON 
      JOIN cwd_group cg ON 
   WHERE cu.directory_id=<souce_directory_id> AND cg.directory_id=<souce_directory_id>
      INTO OUTFILE '/tmp/outfile.csv'
         ENCLOSED BY ''
         LINES TERMINATED BY '\n';




Log in or Sign up to comment
Community showcase
Published in Jira Software

Upcoming changes to epic fields in company-managed projects

👋 Hi there Jira Community! A few months ago we shared with you plans around renaming epics in your company-managed projects. As part of these changes, we highlighted upcoming changes to epics on...

14,104 views 34 44
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you