How to clear Rappelz databases to make fresh copy

04/28/2017 15:27 serafincro#1
Hi,
I would like to cleanup user data from rappelz databases.

Is there already some tool / sql script to do it, or just list of tables that needs to be cleaned=?

I have files from already used server, but it perform rather slow, and I was thinking to clear all not needed data and start fresh.

best regards,
S.
when :rtfm: does not help !!!
04/28/2017 18:30 mongreldogg#2
Right click on database table -> Script table as -> DROP and CREATE.

Exception:

dbo.Dungeon -> there are a bunch of rows that are recommended to set default values manually, you'll see it clearly where you have to do this.

P.S. [Only registered and activated users can see links. Click Here To Register...]
04/29/2017 18:15 XavierDeFawks#3
Here is a script to completely clean telecaster.

Code:
DECLARE [MENTION=424982]table[/MENTION] VARCHAR(256)
DECLARE [Tables] CURSOR FOR
SELECT TABLE_NAME FROM INFORMATION_SCHEMA.TABLES
WHERE TABLE_TYPE = 'BASE TABLE'
AND TABLE_NAME <> 'AllowedCommandsForPermission'
AND TABLE_NAME <> 'Dungeon'

OPEN [Tables]
FETCH NEXT FROM [Tables] INTO [MENTION=424982]table[/MENTION]


WHILE @@FETCH_STATUS = 0
BEGIN
	EXEC ('TRUNCATE TABLE ' + [MENTION=424982]table[/MENTION])
	FETCH NEXT FROM [Tables] INTO [MENTION=424982]table[/MENTION]
END

CLOSE [Tables]
DEALLOCATE [Tables]
GO