DEFINITIONS

Definitions More Info.
Definition ID106
TitleSQL
CategorySCRIPT
DefinitionReplicationda_log_sorun_olan_tabloyu_bulma
Definition Description
--Replication hatasini replication monitordan view detail bakarak oradaki transaction numberi aliyorsun
ornek:
Transaction sequence number: 0x001E677B00001822000100000000

--sonra replikasyonda hata olan tabloyu ya da obejecti buluyorsun

use distribution
select * from dbo.MSarticles where article_id in ( select article_id from MSrepl_commands where xact_seqno = 0x001E677B00001822000100000000)


--sonra server uzerindeki cmd promptdan asagidaki komutu giriyorsun.(path degisik olabilir

C:\Program Files\Microsoft SQL Server\100\COM>tablediff -sourceserver HYDRA -sourcedatabase ANKA -sourcetable CompanyAccount -sourceuser sa -sourcepassword 1qaz2wsx -destinationserver ARION -destinationdatabase ANKA -destinationtable CompanyAccount -destinationuser sa -destinationpassword 1qaz2wsx


--hangi sorgularin kimlerin cektigini,gecici gosteren sorgular

--Most Recently Queries..
select st.text, client_net_address FROM sys.dm_exec_connections c
CROSS APPLY sys.dm_exec_sql_text(most_recent_sql_handle) AS st
--where LOWER(st.text) like '%companyaccount%'
order by connect_time

--Recently Executed Queries..
SELECT
DMExQryStats.last_execution_time AS [Executed At],
DMExSQLTxt.text AS [Query]
FROM
sys.dm_exec_query_stats AS DMExQryStats
CROSS APPLY
sys.dm_exec_sql_text(DMExQryStats.sql_handle) AS DMExSQLTxt
where lower(DMExSQLTxt.text) like '%delete%companyaccount%'
ORDER BY DMExQryStats.last_execution_time DESC
RecordBycunay
Record Date20-02-2012 17:01:59
Düzenle
Kopyala
Sil