[Sorun] Failed Creating Database Hatası [Yardım]

  • Konbuyu başlatan Konbuyu başlatan Admin
  • Başlangıç tarihi Başlangıç tarihi
  • Cevaplar Cevaplar 0
  • Görüntüleme Görüntüleme 65

Admin

Knight Lobby
Yönetici
Founder
Katılım
6 Mayıs 2022
Mesajlar
45,967
QR8AQv.jpg




Resimde ki hatayı almaktayım çözümünü bilen var mı ? lütfen db değiştir harici yazacaklar yazsın.



Version 1299 / SQL Server r2 2008 x64



Denediğim yöntemler query analyzere kod girdim. Yararı olmadı



Kod:
ALTER PROCEDURE CREATE_NEW_CHAR @nRet smallint OUTPUT,  @AccountID char(21),  @index tinyint, @CharIDchar(21), @Race tinyint,  @class smallint,  @Hair tinyint, @Face tinyint,  @Str tinyint,  @Sta tinyint,  @Dex tinyint, @Intel tinyint,  @Cha tinyint AS DECLARE @Row tinyint, @Nation tinyint, @zone tinyint, @PosX int, @PosZ int SET @Row = 0SET @Nation = 0 SET zone = 0 SET @PosX = 0 SET @PosZ = 0 SELECT @Nation = bNation, @Row = bCharNum FROM ACCOUNT_CHAR WHERE strAccountID = @AccountID IF @Row >= 5SET @nRet = 1 IF @Nation = 1 AND @Race > 10SET @nRet = 2 ELSE IF @Nation = 2 AND @Race < 10SET @nRet = 2 ELSE IF @Nation <>1 AND @Nation <> 2SET @nRet = 2 IF @nRet > 0 RETURN SELECT @Row = COUNT(*) FROM USERDATA WHERE strUserId = @CharID IF @Row > 0  BEGIN SET @nRet = 3 RETURN END --SET zone = @Nation SET zone =21 SELECT @PosX = InitX, @PosZ = InitZ FROM ZONE_INFO WHERE ZoneNo = zone BEGIN TRAN IF @index = 0 UPDATE ACCOUNT_CHAR SET strCharID1 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID ELSE IF @index = 1 UPDATE ACCOUNT_CHAR SET strCharID2 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID ELSE IF @index = 2 UPDATE ACCOUNT_CHAR SET strCharID3 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID ELSE IF @index = 3 UPDATE ACCOUNT_CHAR SET strCharID4 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID ELSE IF @index = 4 UPDATE ACCOUNT_CHAR SET strCharID5 = @CharID, bCharNum = bCharNum + 1 WHERE strAccountID = @AccountID INSERT INTO USERDATA (strUserId, Nation, Race, Class, HairColor, Face, Strong, Sta, Dex, Intel, Cha, Zone, PX, PZ )  VALUES (@CharID, @Nation, @Race, @class, @Hair, @Face, @Str, @Sta, @Dex, @Intel, @Cha, @zone, @PosX, @PosZ ) IF @@ERROR <> 0 BEGIN ROLLBACK TRAN  SET @nRet = 4 RETURN END COMMIT TRAN SET @nRet = 0 GO



Databasenin loglarını kayıt ettiği logical name değiştirdim işe yaramadı.
Failed Creating Database Hatası Nedir?

Knight Online özel sunucularında geliştirme yaparken ya da sunucu başlatma işlemleri sırasında karşılaşılan 'Failed Creating Database' hatası oldukça yaygın bir sorundur. Bu hata genellikle veritabanı bağlantılarında veya yapılandırma dosyalarındaki eksikliklerden kaynaklanır. Bu yazıda bu hatanın nedenlerini ve çözüm yollarını detaylıca ele alacağız.

Hatanın Genel Nedenleri

1. Veritabanı Yetkilendirme Sorunları: Kullanıcı adı, şifre ya da veritabanı adı yanlış girilmiş olabilir.
2. SQL Sunucusu Erişimi: Sunucuya erişim sağlanamıyor ya da port kapalı olabilir.
3. Eksik Veritabanı Dosyaları: Gerekli .sql dosyaları eksik veya doğru şekilde import edilmemiştir.
4. Emülatör Yapılandırması: Emülatördeki config dosyası doğru ayarlanmamıştır.

Detaylı Hata Analizi ve Çözüm Yolları

SQL Server ve Veritabanı Bağlantısı
Knight Online özel sunucularında genellikle MSSQL veya MySQL veritabanları kullanılır. Emülatörün yapılandırma dosyasında belirtilen kullanıcı adı, şifre, host adresi ve veritabanı ismi doğru olmalıdır. Örneğin, emulator config dosyasında şu şekilde bir bölüm bulunur:

Kod:
[B]DB_IP = localhost[/B][BR][/BR][B]DB_USER = sa[/B][BR][/BR][B]DB_PASS = 123456[/B][BR][/BR][B]DB_NAME = KO_DBA[/B]


Bu bilgilerin SQL Server'da tanımlı olanla birebir aynı olduğundan emin olunmalıdır.

Veritabanı Import İşlemi
Gerekli tüm veritabanı dosyalarının doğru şekilde import edildiğinden emin olmak gerekir. Bu dosyalar genellikle KO_DBA.sql, Account.sql, GameServer.sql gibi dosyalardır. Import işlemi sırasında hata oluşmuşsa, veritabanı eksik kalabilir ve 'Failed Creating Database' hatası alınabilir.

Windows Güvenlik Ayarları
Windows güvenlik duvarı veya antivirüs yazılımları bazen SQL bağlantısını engelleyebilir. SQL Server'ın çalıştığı portun (genellikle 1433) açık olduğundan ve erişime açık olduğundan emin olunmalıdır.

Sunucu Loglarını Kontrol Etme
Emülatör logları, hatanın tam olarak nerede oluştuğunu gösterir. Log dosyaları genellikle emülatör klasöründe bulunur ve detaylı hata mesajları içerir. Buradan hangi aşamada hata alındığına dair bilgi edinilebilir.

Knight Online Emülatör Geliştirme İçin Tavsiyeler

- Her zaman güncel ve test edilmiş emülatör dosyaları kullanın.
- Veritabanı bağlantılarını kontrol etmek için SQL Management Studio gibi araçlar kullanın.
- Yapılandırmaları yaparken örnek config dosyalarını temel alın.
- Hata durumunda logları okuyarak çözüme ulaşmaya çalışın.

Sonuç

Failed Creating Database hatası, Knight Online özel sunucu geliştirme sürecinde sıkça karşılaşılan bir sorundur. Ancak doğru yapılandırma ve detaylı log analizi ile kolayca çözülebilir. Bu yazıda anlatılan adımları takip ederek hatayı ortadan kaldırabilir ve sunucunuzu başarıyla çalıştırabilirsiniz.

Kaynaklar
KnightLobby - Knight Online Özel Sunucu Rehberleri


What is Failed Creating Database Error?

The 'Failed Creating Database' error is a common issue encountered while developing Knight Online private servers or during server startup processes. This error typically arises from database connection issues or misconfigurations in configuration files. In this article, we will examine the causes and solutions of this error in detail.

General Causes of the Error

1. Database Authorization Issues: Incorrect username, password, or database name might have been entered.
2. SQL Server Access: The server may not be accessible or the port could be closed.
3. Missing Database Files: Required .sql files may be missing or incorrectly imported.
4. Emulator Configuration: The config file in the emulator may not be properly configured.

Detailed Error Analysis and Solutions

SQL Server and Database Connection
Knight Online private servers generally use MSSQL or MySQL databases. The username, password, host address, and database name specified in the emulator's configuration file must be correct. For example, the following section appears in the emulator config file:

Kod:
[B]DB_IP = localhost[/B][BR][/BR][B]DB_USER = sa[/B][BR][/BR][B]DB_PASS = 123456[/B][BR][/BR][B]DB_NAME = KO_DBA[/B]


It is crucial that these details match exactly with those defined in SQL Server.

Database Import Process
It is important to ensure all necessary database files are correctly imported. These files usually include KO_DBA.sql, Account.sql, GameServer.sql. If errors occur during the import process, the database may remain incomplete, resulting in the 'Failed Creating Database' error.

Windows Security Settings
Windows firewall or antivirus software can sometimes block SQL connections. Ensure that the port used by SQL Server (usually 1433) is open and accessible.

Checking Server Logs
Emulator logs indicate where the error occurs exactly. Log files are usually located in the emulator folder and contain detailed error messages. You can gather information on which stage the error occurred from here.

Suggestions for Knight Online Emulator Development

- Always use updated and tested emulator files.
- Use tools like SQL Management Studio to check database connections.
- Base your configurations on sample config files.
- When encountering errors, read logs to find solutions.

Conclusion

The Failed Creating Database error is a frequently encountered issue in the Knight Online private server development process. However, with proper configuration and detailed log analysis, it can be easily resolved. By following the steps outlined in this article, you can eliminate the error and successfully run your server.

Resources
KnightLobby - Knight Online Private Server Guides
 

Şuan Bu Konuyu Görüntüleyen Kullanıcılar (Toplam : 0, Üye : 0, Misafir : 0)

Benzer konular

Geri
Üst Alt