Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Next challenges

Recent achievements

Recognition

  • Give kudos
  • My kudos

Leaderboard

  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage
Highlighted

Migrate local group memberships between directories (SQL)

There is a KB article titled "Migrate local group memberships between directories" (https://confluence.atlassian.com/jirakb/migrate-local-group-memberships-between-directories-289277867.html) 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 cu.id=cm.child_id 
      JOIN cwd_group cg ON cm.parent_id=cg.id 
   WHERE cu.directory_id=<souce_directory_id> AND cg.directory_id=<souce_directory_id>
      INTO OUTFILE '/tmp/outfile.csv'
         FIELDS TERMINATED BY ','
         ENCLOSED BY ''
         LINES TERMINATED BY '\n';

 

0 comments

Comment

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

How to create Jira issus from Excel file?

When to use CSV importer When managing your processes in Jira, there are many occasions where you need to create a lot of tasks. Creating them one by one will cost you a lot of time and effort and i...

4,642 views 22 33
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