To Private Server administrators/DBA

08/03/2012 16:35 JohnHeatz#1
Hello community,

This post is to gather some information that I am needing to know right now, the question is simple, can you -administrators/GM/database administrators- let me know which are the most used scripts you all use on your daily tasks on the database?

With this I mean, for example that you say "Ban an account/IP ban someone", this with all the ones you use the most.

Hopefully I will get all the information I am needed by now, and in the case I need some further information I will let you all know.

Gathered so far:

Accounts Characters Items Guilds Mobs Logs
Give Points Stat Pad check
Look for account GM Enchants  
Look for IP GM Links  
Password Change Look for Toon  
Character Resurrection  
Remove Guild Penalty  
Change Name  
 
 
 
 
08/03/2012 19:16 thetruestarr1337#2
Every 12h Database Backup
Everyday Stadpadder Search
and DP Give Querie :D

Those 3 Scripts im using mostly
08/03/2012 21:19 [Boss]FemmeFatale#3
GM Enchants

SELECT TOP (20000000) CharID, ItemID, Type, TypeID, Bag, Craftname
FROM CharItems
WHERE (CharID = ???) AND (Bag = ?)

OR

SELECT TOP (20000000) UserUID, ItemID, Type, TypeID, Slot, Craftname, Del
FROM UserStoredItems
WHERE (UserUID = ???) AND (Slot < ?)<------ i have used the < sign as we do our Enchants from WH with Forum posts

USE PS_UserData;
UPDATE Users_Master
SET Point = (Point + ?)
WHERE UserID = '?'

the above can have Gems included too if you do GM links

these are probably our most used scripts.
08/03/2012 21:36 STIV123#4
SELECT * FROM PS_Gamedata.dbo.Chars WHERE CharName='charname'

SELECT * FROM PS_UserData.dbo.Users_Master WHERE UserID='UserID'

SELECT * FROM PS_GameLog.dbo.actionlog WHERE CharName='charname'


SELECT * FROM PS_UserData.dbo.Users_Master WHERE UserIp='IPHere'

This what i use when i server restart: UPDATE PS_UserData.dbo.Users_Master SET Leave = 0

I use this scripts most.
08/03/2012 22:43 JohnHeatz#5
I don't need the script itself, just what they do, still wouldn't say no if you post the full script though.

Thanks for the information so far, hopefully I will be able to gather the information I am needing soon.

Update

I have added a table containing what I see could be more used from all the information given, will be updating every time someone provides any query/script
08/06/2012 16:37 JohnHeatz#6
Wouldn't like to not get any more replies in here, if there is any script/query that you think is useful and something that is used on "daily tasks" let me know
08/07/2012 00:03 _-Phoenix-_#7
there is also the toon res,
08/07/2012 00:14 STIV123#8
Remove Guild Penalty
Password Change
Name Change
Script for deleteing items from invertory, WH, GWH. ^
08/07/2012 16:37 JohnHeatz#9
Haven't thought about deleting items from inventory, how often do you use that script?
08/13/2012 08:15 [Admin]Snuggle#10
This thread needs a...
-Snuggle Bump- >.>

(hell yea I'm naming my own bumps after myself..got an issue with it?)
10/09/2012 05:13 JohnHeatz#11
Let's bump this thread, more answers would be greatly appreciated.

Let's think about every important script you all would like to have ready to be used for any circumstance; thinking about:
  • Accounts
  • Characters
  • Guilds
  • Mobs
  • Items
  • Logs

Let's see if I can get some more replies in here
10/09/2012 05:22 [Admin]Snuggle#12
Checking for corrupt GMs would be a good one. o.o
10/09/2012 08:36 TeddyBear94#13
char change

deleating duped items with originals

tag adding

search charname with inventory infos


having lapis linked wich got a special ID ( this lapis are on my server 31 + and i use that to check if some1 used a prog to link them in a lower gear)


ip bann


that are my most used quiery´s :o
10/09/2012 13:46 RebeccaBlack#14
I have a function I use (named "BackupDB") that will backup any and all databases when executed (apart from the sys databases). Quite useful for a python script I threw together that backs everything up (including server files), makes a RAR archive and uploads it.

A simple query to check GM commands (bit different since I log them to a different table, same as kills)

I can't think of others offhand, maybe later.
10/09/2012 15:34 STIV123#15
There are also:

Script for checking drops: Example, you wanna check what drops under grade 02, and runnin the script will show you what all Items drop from It. It's what I use sometimes to search the not used ones.


Script for checking logs, action type.

Quote:
Haven't thought about deleting items from inventory, how often do you use that script?
Just seen this that you asked me before, lol. Anyway, well not really often, but let's say some of your staff quits or you fire him, you would want to remove he's name changes stones or messages to server, so you would just type ItemID and CharID, execute and done. that was an example.

There Is script for rerroll as well.

SELECT CharName, ActionTime, Text1
FROM PS_GameLog.dbo.ActionLog
WHERE ActionType = 107 and charname = 'charname' This would be IP checker..