vSRO Çözüldü Database temizleme query

QueenDagmar

.
Aktiflik: 3%
1 Mesaj
Katılım
18 Ağu 2025
Mesajlar
233
Çözümler
3
Tepkime puanı
64
Puan
28
Yaş
32
Thread owner
Herkese iyi akşamlar dilerim. Aşağıdaki db temizleme sorgusunu kullandığımda ekte yer alan hatayı alıyorum. Sebebi nedir, düzgün çalışan bir temizleme sorgusu var mıdır, yardımcı olabilecek birileri varsa çok memnun olurum.

USE [SRO_VT_SHARD]
GO
truncate table _CharSkill
truncate table _CharSkillMastery
truncate table _GuildMember
truncate table _BlockedWhisperers
truncate table _OpenMarket
truncate table _Inventory
truncate table _InventoryForAvatar
truncate table _InventoryForLinkedStorage
truncate table _TrainingCampMember
truncate table _TrainingCampSubMentorHonorPoint
truncate table _TrainingCampBuffStatus
delete from _TrainingCamp
truncate table _StaticAvatar
truncate table _User
truncate table _Friend
truncate table _Memo
truncate table _TimedJob
truncate table _CharTrijobSafeTrade
delete from _CharTrijob
truncate table _InvCOS
delete from _CharCOS where ID > 0
delete from _Char where charid > 0
truncate table _Chest
truncate table _ChestInfo
truncate table _ItemPool
delete from _Items where ID64 > 0
delete from _AccountJID
truncate table _GuildChest
update _AlliedClans set Ally1 = 0, Ally2 = 0, Ally3 = 0, Ally4 = 0, Ally5 = 0, Ally6 = 0, Ally7 = 0, Ally8 = 0
truncate table _GuildWar
delete from _Guild where ID > 0
delete from _AlliedClans where ID > 0
truncate table _CharNameList
truncate table _CharQuest
truncate table _ClientConfig
truncate table _DeletedChar
truncate table _SiegeFortressStoneState
truncate table _SiegeFortressRequest
truncate table _SiegeFortressObject
truncate table _SiegeFortressItemForge
truncate table _SiegeFortressBattleRecord
delete from _SiegeFortress

(222 row(s) affected)

(6527 row(s) affected)

(1444 row(s) affected)

(6600 row(s) affected)

(174626 row(s) affected)

(3943 row(s) affected)

(15 row(s) affected)
Msg 547, Level 16, State 0, Line 31
The DELETE statement conflicted with the REFERENCE constraint "FK__SiegeFortress__Guild". The conflict occurred in database "SRO_VT_SHARD", table "dbo._SiegeFortress", column 'GuildID'.
The statement has been terminated.
Msg 547, Level 16, State 0, Line 32
The DELETE statement conflicted with the REFERENCE constraint "FK__Guild__AlliedClans". The conflict occurred in database "SRO_VT_SHARD", table "dbo._Guild", column 'Alliance'.
The statement has been terminated.
Msg 547, Level 16, State 0, Line 42
The DELETE statement conflicted with the REFERENCE constraint "FK__SiegeFortressStruct__SiegeFortress". The conflict occurred in database "SRO_VT_SHARD", table "dbo._SiegeFortressStruct", column 'FortressID'.
The statement has been terminated.
 
Çözüm
Farklı vSRO pack’lerinde FK yapıları değiştiği için bu script FK’si olmayan veya disabled olan sistemlerde sorunsuz çalışır, FK aktif pack’lerde ise TRUNCATE yerine DELETE tercih edilebilir. Yine de düzelttiğin için teşekkürler
Delete yaptığınız tabloların identity id'leri 1'den başlamaz bu sebepten truncate yapmak zorundayız. Arkadaş vsro için destek talep ettiği için prosedür sorunsuz olarak çalışır. Vsro dışında ki dosyalarda durum ne olur bilemem dediğiniz vsro dışında ki dosyalarda doğru olabilir.
Farklı vSRO pack’lerinde FK yapıları değiştiği için bu script FK’si olmayan veya disabled olan sistemlerde sorunsuz çalışır, FK aktif pack’lerde ise TRUNCATE yerine DELETE tercih edilebilir. Yine de düzelttiğin için teşekkürler
Delete yaptığınız tabloların identity id'leri 1'den başlamaz bu sebepten truncate yapmak zorundayız. Arkadaş vsro için destek talep ettiği için prosedür sorunsuz olarak çalışır. Vsro dışında ki dosyalarda durum ne olur bilemem dediğiniz vsro dışında ki dosyalarda doğru olabilir.
 
Oyla 0
Çözüm

Bu konuyu görüntüleyen kullanıcılar

Geri
Üst Alt