Difference between revisions of "Database Hacks"

From GWAVA Technologies Training
Jump to: navigation, search
(Created page with "Database Hacks are considered quite dangerous and care must be taken to prevent customer data loss. Backing up the database first is strongly recommended. ==Floating Message=...")
 
 
Line 9: Line 9:
 
1) Find the message:
 
1) Find the message:
 
  <nowiki>
 
  <nowiki>
SELECT * FROM retain.t_message WHERE f_subject = '[subject text]';
+
SELECT * FROM retain.t_message  
 +
WHERE f_subject = '[subject text]';
 
</nowiki>
 
</nowiki>
  
Line 17: Line 18:
 
3) Find all of the folders and their IDs pertaining to the user:
 
3) Find all of the folders and their IDs pertaining to the user:
 
  <nowiki>
 
  <nowiki>
SELECT * FROM retain.t_folder WHERE uuid_mapping_id = [uuid_mapping_id obtain in step #2];
+
SELECT * FROM retain.t_folder  
 +
WHERE uuid_mapping_id = [uuid_mapping_id obtain in step #2];
 
</nowiki>
 
</nowiki>
  
Line 24: Line 26:
 
5) Update the message record from step #1 with the folder ID obtained in step #4:
 
5) Update the message record from step #1 with the folder ID obtained in step #4:
 
  <nowiki>
 
  <nowiki>
UPDATE retain.t_message SET folder_id = [desired folder ID] WHERE message_id = [message ID from message_id field of message found in step #1];  
+
UPDATE retain.t_message SET folder_id = [desired folder ID]  
 +
WHERE message_id = [message ID from message_id field of message found in step #1];  
 
</nowiki>
 
</nowiki>

Latest revision as of 22:44, 5 November 2014

Database Hacks are considered quite dangerous and care must be taken to prevent customer data loss. Backing up the database first is strongly recommended.

[edit] Floating Message

A message is not in the correct folder, and can only be found via search in Retain.

Go into the database

1) Find the message:

SELECT * FROM retain.t_message 
WHERE f_subject = '[subject text]';


2) Get the uuid_mapping_id and message_id from that message.

3) Find all of the folders and their IDs pertaining to the user:

SELECT * FROM retain.t_folder 
WHERE uuid_mapping_id = [uuid_mapping_id obtain in step #2];

4) Get the folder ID for the desired destination folder. The folder name can be found in the f_name field from the query results in step #3.

5) Update the message record from step #1 with the folder ID obtained in step #4:

UPDATE retain.t_message SET folder_id = [desired folder ID] 
WHERE message_id = [message ID from message_id field of message found in step #1]; 

Personal tools
Namespaces

Variants
Actions
Home
Exchange
GroupWise
JAVA
Linux
MTK
Retain
GW Monitoring and Reporting (Redline)
GW Disaster Recovery (Reload)
GW Forensics (Reveal)
GWAVA
Secure Messaging Gateway
GW Mailbox Management (Vertigo)
Windows
Other
User Experience
Toolbox
Languages
Toolbox