How to make a query on character.dbo.user_character SQL server.

04/19/2009 23:33 conquer93#1
Hello,

I found that GM fix. but doesnt work for me i make a character with a error.
can any ppl help me?
04/19/2009 23:35 florida18#2
He wants to make a query on character.dbo.user_character to find all characters names with theis criteria <']'
Help ^^
04/19/2009 23:44 PapaHarni#3
Create a new Job in SQL Server Agent ( Open Enterprise Manager --> Your SQL Server --> Managment --> SQL Server Agent --> Jobs )
right click --> New Job...

Name : Set Coins
Go to Steps --> New -->
Step name : Set Coins 1
Type : TSQL
Database : cash
Command :
Code:
DELETE FROM character.dbo.user_character
WHERE character_name < ']'
AND character_name <> '[GM]Your Character Name'
AND character_name <> '[GM]Your Character Name'
If you need more GMs , you can add more lines with
Code:
AND character_name <> '[GM]Your Character Name'
Go to Advanced -->
On success / failure flow : "Goto the step next step
On failure action : "Goto the next step"

Press Apply ---> OK

Press again to New...
Step name : Set Coins 2
Type : TSQL
Database : cash
Command :
Code:
Must be the self code who you have used in Step 1
Go to Advanced -->
On success / failure flow : "Goto step : [1]Set Coins 1"
On failure action : "Goto step : [1] Set Coins 1"
Press Apply --> OK


Go to Schedules --> New Schedule... -->
Name : Start set Coins
Set -> Start automatically when SQL Server Agent starts
Press OK
Press OK again
Press Yes

Right click to the Job in the list and start Job.


Dont forget to add the automatically start service SQL Server Agent in SQL Status Menu in your Taskbar.
04/19/2009 23:46 conquer93#4
Quote:
Originally Posted by PapaHarni View Post
Create a new Job in SQL Server Agent ( Open Enterprise Manager --> Your SQL Server --> Managment --> SQL Server Agent --> Jobs )
right click --> New Job...

Name : Set Coins
Go to Steps --> New -->
Step name : Set Coins 1
Type : TSQL
Database : cash
Command :
Code:
DELETE FROM character.dbo.user_character
WHERE character_name < ']'
AND character_name <> '[GM]Your Character Name'
AND character_name <> '[GM]Your Character Name'
If you need more GMs , you can add more lines with
Code:
AND character_name <> '[GM]Your Character Name'
Go to Advanced -->
On success / failure flow : "Goto the step next step
On failure action : "Goto the next step"

Press Apply ---> OK

Press again to New...
Step name : Set Coins 2
Type : TSQL
Database : cash
Command :
Code:
Must be the self code who you have used in Step 1
Go to Advanced -->
On success / failure flow : "Goto step : [1]Set Coins 1"
On failure action : "Goto step : [1] Set Coins 1"
Press Apply --> OK


Go to Schedules --> New Schedule... -->
Name : Start set Coins
Set -> Start automatically when SQL Server Agent starts
Press OK
Press OK again
Press Yes

Right click to the Job in the list and start Job.


Dont forget to add the automatically start service SQL Server Agent in SQL Status Menu in your Taskbar.
Hi

I have no account i cant make a account. i cant run job's
04/19/2009 23:52 florida18#5
He ran a command to delete all <']'
without changing the data first, so now he has no account. so everything lost? lol
04/19/2009 23:55 conquer93#6
Quote:
Originally Posted by florida18 View Post
He ran a command to delete all <']'
without changing the data first, so now he has no account. so everything lost? lol
No i make a new server. and now i have no GM char. I cant make a another. its give a error with no message and my server says : error hack or somthings
04/20/2009 06:31 gedimazs#7
Quote:
Originally Posted by conquer93 View Post
No i make a new server. and now i have no GM char. I cant make a another. its give a error with no message and my server says : error hack or somthings
Dude I said you to restore database again, and do everything from the beginning, cause you can't restore deleted chars.
04/20/2009 08:21 conquer93#8
i run that script and it says this :(

[Only registered and activated users can see links. Click Here To Register...]
04/20/2009 12:47 gedimazs#9
Quote:
Originally Posted by conquer93 View Post
i run that script and it says this :(

[Only registered and activated users can see links. Click Here To Register...]
This is because you ran the script without changing names who could not allowed to delete. First you need to change all names with criteria "<]" And only then run the script. Now you can restore your DB and start over again. Good luck