Video Screencast Help
Scheduled Maintenance: Symantec Connect is scheduled to be down Saturday, April 19 from 10am to 2pm Pacific Standard Time (GMT: 5pm to 9pm) for server migration and upgrades.
Please accept our apologies in advance for any inconvenience this might cause.

SQL Query to move group in SEPM into another group

Created: 14 Jan 2013 | 12 comments

Ok, I totally understand that Symantec does not support the use of SQL queries to manage its interface, and it is a "use at your own risk".

If I want to move one group, into another group in the SEPM (SEP 12 RU2), what is the SQL query for this?

 

For example, to move a SEP client to a group in SEPM, I simply update the Group ID of the SEP client:

 

UPDATE SEM_CLIENT
SET SEM_CLIENT.GROUP_ID = '$Name_of_Group_You_Want_to_Move_SEP_Client_to'
WHERE SEM_CLIENT.COMPUTER_NAME = '$Computer_Name_of_SEP_Client'
AND SEM_CLIENT.COMPUTER_ID = '$Computer_ID_of_SEP_Client'

 

Can you tell me what query to run to move one group into another group. I'm trying this on the test system, of course angel

Comments 12 CommentsJump to latest comment

_Brian's picture

Out of curiousity, have you checked the MoveClient utility?

It's found on the DVD under the Tools\NoSupport folder

Unless of course you want to do this with a SQl query

How do I move a large number of SEP clients to a new group at once?

Article:TECH98302  |  Created: 2009-01-29  |  Updated: 2011-11-04  |  Article URL http://www.symantec.com/docs/TECH98302

 

Please click the "Mark as solution" link at bottom left on the post that best answers your question. This will benefit admins looking for a solution to the same problem.

RSASKA's picture

Yes Brian, I checked the MoveClient utility. It proved to be too cumbersome and clunky because all clients you want to move have to go to default group first, before you can run the script.

 

I created an updated moveclient script custom-made for our environment. This script looks for SEP clients in the SEPM (regardless of what group they are currently in), and will move SEP Clients that are Servers into a Server group, otherwise it will look at IP address and move it to group based on it's IP address.

 

The script is still a work in progress.

The Enemy's greatest fear is that you'll discover who you really are, what you're really worth, and where you're headed.

 

Trey Watts's picture

You can define the group you want the MoveClient script to run against. I've used the script to move over 40,000 endpoins to 200+ groups with multiple domains without issues.

RSASKA's picture

Trey can you can an example of this type of code, or point out where I can do this, i.e. move one group into another group, I'm not talking about individual clients, I am concerned about moving groups.

The Enemy's greatest fear is that you'll discover who you really are, what you're really worth, and where you're headed.

 

Trey Watts's picture

 

The first thing I recommend is checking to make sure you have the latest moveclient.vbs script. This should be in the SEP 12.1 RU2 download under the nosupport directory.

You can set the name of your Temp group in the following line. By default it uses the SEPM default Group Name as seen below.

Dim TempGroupName : TempGroupName = "Default Group"

 

The next setting determines if the moveclient.vbs script will process clients from all groups or just from the defined TempGroupName

Dim OnlyCheckClientsInTempGroup : OnlyCheckClientsInTempGroup = False

You can't use this to move SEPM group named GroupA to SEPM group named GroupB but you could get creative and use the options available in the script such as IPGroups to move all clients in GroupA to GroupB.

 

IPgroups.txt
This file contains a list of IP addresses (IP ranges or IP addresses with subnet notation) and 
group names separated by a comma.  The script will search for clients with the IP address listed
and move them to the associated group.  This supports single IP addresses, IP ranges and IP 
subnet notations.
Format:
IP,GroupName
IP,GroupName,DomainName
IP,GroupName,DomainName,Description
Sample text file:
172.24.20.171,Marketing
10.0.0.4,Group1
192.168.0.1-192.168.0.254,Group1\subgroup1
192.168.0.1/24,Group1\subgroup1
172.16.0.2,Group2\subgroup1
207.33.111.27,Group3

Please always test before making production changes. I cannot recommend changes in your production environment.

 

 

RSASKA's picture

but you could get creative and use the options available in the script such as IPGroups to move all clients in GroupA to GroupB.

 

Oh Dear, that is not what I was looking for, but thank you anyway frown

The Enemy's greatest fear is that you'll discover who you really are, what you're really worth, and where you're headed.

 

Trey Watts's picture

If your only wanting to move one group to another you can use the IPgroups option and define the IP range as 1.0.0.0-255.255.255.255

This would move all of the clients within the group you set it up to check since all clients would match the IP range.

Can you give me more details of what your trying to do?

RSASKA's picture

I am trying to move an entire group into another group. Whether the group has clients or not is irrelevant. See picture below:

 

 

I am trying to move all the blue nodes into the pink node. When I expand the pink node, I want to see all the blue nodes intact.

The Enemy's greatest fear is that you'll discover who you really are, what you're really worth, and where you're headed.

 

Trey Watts's picture

Is this a one time process or something that will be ongoing? Are there groups outside of these that you don't want touched? How many "blue groups" do you have?

If this is a one time move you could set the moveclient script up using my suggestions and after you run it you would only need to change the name of the default group as you move through the groups highlighed in blue.

If you need something that is ongoing I would have to think of something else.

What about just highlighting all of the clients in each blue group, right clicking, move to new pink group? I understand you may not want this if this isn't a one time move.

If it is an ongoing type of process you could set the group to block new clients from joining and they will go to the default group in SEPM and then you could setup the moveclient script to run automatically every 30 minutes and process against that...

RSASKA's picture

Is this a one time process or something that will be ongoing?

This is a one-time process

 

What about just highlighting all of the clients in each blue group, right clicking, move to new pink group?

How to highlight multiple groups at once? If I can do this, problem solved!

The Enemy's greatest fear is that you'll discover who you really are, what you're really worth, and where you're headed.

 

Trey Watts's picture

You would basically click on each blue group and repeat the process.

example.

Click the first blue group, highlight all clients within that group. Right Click, move to pink group.

Click the second blue group, highlight all clients within that group. Right Click, move to pink group.

Click the third group.....

Repeat as needed

RSASKA's picture

Click the first blue group, highlight all clients within that group. Right Click, move to pink group.

Click the second blue group, highlight all clients within that group. Right Click, move to pink group.

Click the third group.....

 

This is more cumbersome than what I am doing now. For each blue group, I right click, select move, and choose the pink group.

I was hoping you would explain a way to select all blue groups at once, right click, select move, and choose pink group.

 

Alas, this is Symantec's trademark  broken heart

No worries, I appreciate your help though :-)

 

 

The Enemy's greatest fear is that you'll discover who you really are, what you're really worth, and where you're headed.