Forum
Merhabalar;
Sql server 2005 içine database attach yaparken şu hata ile karşılaşıyorum ne yapmam gerekir? bilen yardımcı olursa minnettar kalırım şimdiden teşekkürler.
Karşılaştığım hata :
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'OKYANUS03\SQLEXPRESS'. (Microsoft.SqlServer.Smo)
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The log scan number (333:2653:1) passed to log scan in database 'analist' is not valid. This error may indicate data corruption or that the log file (.ldf) does not match the data file (.mdf). If this error occurred during replication, re-create the publication. Otherwise, restore from backup if the problem results in a failure during startup.
Could not open new database 'analist'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 9003)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=9003&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
DB yi log dosyasız attach etmeyi dener misin? aşağıdaki makalede nasıl yapıldığını inceleyebilirsin.
Hemen bakıyorum ilgine teşekkürler..[:)]
Hemen bakıyorum ilgine teşekkürler [:)]
Teşekkürler tuygay be sorunum çözüldü...
Rica ederim geçmiş olsun 🙂
merhaba bende benzer bir durumla karşılaştım yani hata aldım,ama ben northwind db i eklemek istedim
aşağıda errorr logu yazıyorum yarım rica ederim
teşekkürler
===================================
Attach database failed for Server 'EMRE-PC'. (Microsoft.SqlServer.Smo)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.0.2531.0+((Katmai_PCU_Main).090329-1015+)&EvtSrc=Microsoft.SqlServer.Management.Smo.ExceptionTemplates.FailedOperationExceptionText&EvtID=Attach+database+Server&LinkId=20476
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files)
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabaseData.PrimaryFile.Attach()
at Microsoft.SqlServer.Management.SqlManagerUI.AttachDatabase.SendDataToServer()
===================================
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
Program Location:
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(StringCollection sqlCommands, ExecutionTypes executionType)
at Microsoft.SqlServer.Management.Smo.ExecutionManager.ExecuteNonQuery(StringCollection queries)
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabaseWorker(String name, StringCollection files, String owner, AttachOptions attachOptions)
at Microsoft.SqlServer.Management.Smo.Server.AttachDatabase(String name, StringCollection files)
===================================
Unable to open the physical file "C:\SQL2000.Sample.Databases.(Northwind,pubs)\northwnd.mdf". Operating system error 5: "5(failed to retrieve text for this error. Reason: 15105)". (.Net SqlClient Data Provider)
------------------------------
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=10.00.2531&EvtSrc=MSSQLServer&EvtID=5120&LinkId=20476
------------------------------
Server Name: EMRE-PC
Error Number: 5120
Severity: 16
State: 101
Line Number: 1
------------------------------
Program Location:
at System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection)
at System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj)
at System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj)
at System.Data.SqlClient.SqlCommand.RunExecuteNonQueryTds(String methodName, Boolean async)
at System.Data.SqlClient.SqlCommand.InternalExecuteNonQuery(DbAsyncResult result, String methodName, Boolean sendToPipe)
at System.Data.SqlClient.SqlCommand.ExecuteNonQuery()
at Microsoft.SqlServer.Management.Common.ServerConnection.ExecuteNonQuery(String sqlCommand, ExecutionTypes executionType)
C:\SQL2000.Sample.Databases.(Northwind,pubs)\northwnd.mdf dosyası üzerindeki yetkileri kontrol eder misiniz? Attach i yapmaya çalıştığınız win acc nin bu dosyada yetkisi yokmuş gibi gözüküyor.
tesekkurler 🙂
DB yi log dosyasız attach etmeyi dener misin? aşağıdaki makalede nasıl yapıldığını inceleyebilirsin.
TITLE: Microsoft SQL Server Management Studio
------------------------------
Attach database failed for Server 'FATMASERDAROĞLU\DATABASEM'. (Microsoft.SqlServer.Smo)
------------------------------
ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The file "D:\AcikAkademi\AdventureWorksLT2012_Database\AdventureWorksLT2012_Data.mdf" is compressed but does not reside in a read-only database or filegroup. The file must be decompressed.
Could not open File Control Block (FCB) for invalid file ID 2 in database 'AdventureWorksLT2012'. Verify the file location. Execute DBCC CHECKDB.
Could not open new database 'AdventureWorksLT2012'. CREATE DATABASE is aborted. (Microsoft SQL Server, Error: 5118)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=5118&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
Hocam benim hatamda bu ancak bir türlü cevap bulamadım. Yardımcı olursanız çok sevinirim.