delete "group"

felix.nielsen's Avatar

felix.nielsen

23 Oct, 2017 11:04 AM

Hi

How do I remove/delete an non active group?

Thanks

  1. Support Staff 1 Posted by Anton Gogolev on 23 Oct, 2017 11:11 AM

    Anton Gogolev's Avatar

    Felix,

    Currently, there's no way to delete a Group short of deleting it directly
    from within Microsoft SQL Server Management Studio.

  2. 2 Posted by felix.nielsen on 23 Oct, 2017 11:16 AM

    felix.nielsen's Avatar

    Ok :( - can you send med a TSQL to remove the group? - I guess the table "group" is not enough? - there is no permissions or projects assigned

    Felix

  3. Support Staff 3 Posted by Anton Gogolev on 23 Oct, 2017 11:29 AM

    Anton Gogolev's Avatar

    Felix,

    It goes as follows:

    begin tran
    delete from [Group] where Name = 'YOUR-GROUP-NAME-HERE'
    rollback tran

    You can double-check that everything is fine and then replace "rollback"
    with "commit" and re-run the script.

  4. 4 Posted by felix.nielsen on 23 Oct, 2017 11:35 AM

    felix.nielsen's Avatar

    ok thanks - but I see there is a reference in GroupPermissionJunction also?

  5. Support Staff 5 Posted by Anton Gogolev on 23 Oct, 2017 11:57 AM

    Anton Gogolev's Avatar

    Felix,

    There could very well be. In this case,

    declare @name nvarchar(200) = 'YOUR-GROUP-NAME-HERE'

    begin tran
    delete g from [Group] g inner join GroupPermissionJunction gpj on
    gpj.GroupID = g.ID and g.Name = @name
    delete from [Group] where Name = @name
    rollback tran

  6. 6 Posted by felix.nielsen on 23 Oct, 2017 12:04 PM

    felix.nielsen's Avatar

    thx will try it

Reply to this discussion

Internal reply

Formatting help / Preview (switch to plain text) No formatting (switch to Markdown)

Attaching KB article:

»

Attached Files

You can attach files up to 10MB

If you don't have an account yet, we need to confirm you're human and not a machine trying to post spam.

Keyboard shortcuts

Generic

? Show this help
ESC Blurs the current field

Comment Form

r Focus the comment reply box
^ + ↩ Submit the comment

You can use Command ⌘ instead of Control ^ on Mac

Recent Discussions

18 Feb, 2019 09:20 AM
26 Nov, 2018 01:47 PM
16 Nov, 2018 07:51 PM
06 Nov, 2018 04:30 PM
24 Oct, 2018 07:57 AM

 

20 Jul, 2018 11:07 PM
05 Jul, 2018 10:53 AM
27 May, 2018 01:33 AM
14 May, 2018 03:38 PM
04 May, 2018 07:45 AM
28 Feb, 2018 07:08 AM