SQL server Replication and snapshot
Hi All,
We are faced with a scenario where the Replication snapshot folder is corrupted.
We have the subscibers as SQL Server Compact(PDA) and dont want to re-install the PDA.
Is there a way to recreate a Snapshot folder, and the PDA's dont have to be re-setup.
Quick Advise is really appreciated.
Joji
Can you recreate the folder in windows?
You should be able to recreate the folder in windows and you will not need to reinitailize. If you do change the folder location in the publication properties a reinitialization will NOT be forced.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941
Similar Messages
-
TSQL Script to monitor SQL Server transactional and snapshot replication
Hi Team,
Could you please let me know do you have any TSQL script to monitor replication(Transactional, Snapshot) with current status ? I have tried below script but it giving error. could you please have a look at the below script or do you have any other new TSQL
script to monitor the replication status ?
"Msg 8164, Level 16, State 1, Procedure sp_MSload_tmp_replication_status, Line 80
An INSERT EXEC statement cannot be nested."
DECLARE @srvname VARCHAR(100)
DECLARE @pub_db VARCHAR(100)
DECLARE @pubname VARCHAR(100)
CREATE TABLE #replmonitor(status INT NULL,warning INT NULL,subscriber sysname NULL,subscriber_db sysname NULL,publisher_db sysname NULL,
publication sysname NULL,publication_type INT NULL,subtype INT NULL,latency INT NULL,latencythreshold INT NULL,agentnotrunning INT NULL,
agentnotrunningthreshold INT NULL,timetoexpiration INT NULL,expirationthreshold INT NULL,last_distsync DATETIME,
distribution_agentname sysname NULL,mergeagentname sysname NULL,mergesubscriptionfriendlyname sysname NULL,mergeagentlocation sysname NULL,
mergeconnectiontype INT NULL,mergePerformance INT NULL,mergerunspeed FLOAT,mergerunduration INT NULL,monitorranking INT NULL,
distributionagentjobid BINARY(16),mergeagentjobid BINARY(16),distributionagentid INT NULL,distributionagentprofileid INT NULL,
mergeagentid INT NULL,mergeagentprofileid INT NULL,logreaderagentname VARCHAR(100),publisher varchar(100))
DECLARE replmonitor CURSOR FOR
SELECT b.srvname,a.publisher_db,a.publication
FROM distribution.dbo.MSpublications a, master.dbo.sysservers b
WHERE a.publisher_id=b.srvid
OPEN replmonitor
FETCH NEXT FROM replmonitor INTO @srvname,@pub_db,@pubname
WHILE @@FETCH_STATUS = 0
BEGIN
INSERT INTO #replmonitor
EXEC distribution.dbo.sp_replmonitorhelpsubscription @publisher = @srvname
, @publisher_db = @pub_db
, @publication = @pubname
, @publication_type = 0
FETCH NEXT FROM replmonitor INTO @srvname,@pub_db,@pubname
END
CLOSE replmonitor
DEALLOCATE replmonitor
SELECT publication,publisher_db,subscriber,subscriber_db,
CASE publication_type WHEN 0 THEN 'Transactional publication'
WHEN 1 THEN 'Snapshot publication'
WHEN 2 THEN 'Merge publication'
ELSE 'Not Known' END,
CASE subtype WHEN 0 THEN 'Push'
WHEN 1 THEN 'Pull'
WHEN 2 THEN 'Anonymous'
ELSE 'Not Known' END,
CASE status WHEN 1 THEN 'Started'
WHEN 2 THEN 'Succeeded'
WHEN 3 THEN 'In progress'
WHEN 4 THEN 'Idle'
WHEN 5 THEN 'Retrying'
WHEN 6 THEN 'Failed'
ELSE 'Not Known' END,
CASE warning WHEN 0 THEN 'No Issues in Replication' ELSE 'Check Replication' END,
latency, latencythreshold,
'LatencyStatus'= CASE WHEN (latency > latencythreshold) THEN 'High Latency'
ELSE 'No Latency' END,
distribution_agentname,'DistributorStatus'= CASE WHEN (DATEDIFF(hh,last_distsync,GETDATE())>1) THEN 'Distributor has not executed more than n hour'
ELSE 'Distributor running fine' END
FROM #replmonitor
--DROP TABLE #replmonitor
Rajeev RINSERT INTO #replmonitor
Hi Rajeev,
Could you please use the following query and check if it is successful?
INSERT INTO #replmonitor
SELECT a.*
FROM OPENROWSET
('SQLNCLI', 'Server=DBServer;Trusted_Connection=yes;',
'SET FMTONLY OFF; exec distribution..sp_replmonitorhelpsubscription
@publisher = DBServer,
@publication_type = 0,
@publication=MyPublication') AS a;
There is a similar thread for your reference.
https://social.msdn.microsoft.com/Forums/sqlserver/en-US/634090bf-915e-4d97-b71a-58cf47d62a8a/msg-8164-level-16-state-1-procedure-spmsloadtmpreplicationstatus-line-80?forum=sqlreplication
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
SQL Server replication and size differences of source and destination databases
I set up snapshot replication for a DB between two SQL instances. On the source instance, the DB shows as 106612.56MB with 34663.75MB as available free space. I expected that the replica would then end up being 71948.81MB (106612.56 - 34663.75
because it wouldn't replicate the white space). The resultant replica database is showing as 35522.94MB. The required data appears to be present in the replicated DB as the SSRS reports that use it are able to find the data they look for. But
why the large discrepancy in size between the source and replicated DB? The replicated DB is less than 1/2 the size of the source DB. I've searched around and can't seem to find any explanation. I realize this isn't mirroring so the DBs will
not be identical in size but I did not expect to see such a large difference between the two. I am replicating all almost all articles (tables, stored procs, etc.) with the exception of a handful of stored procedures and user-defined functions that either
reference invalid column names in a table (vendor bug) or reference another DB that is not present on the replica's instance. I would expect these 4-5 articles can not account for a 37000 MB size difference between the two DBs.
Please note that this has nothing to do with transaction log size. I am specifically talking about the database size and am not looking at the size that combines both DB and TxLog size.
Any insight?Another factor could be that on the publisher the data is distributed through pages, paragraphs and extents. Depending on your fill factor and the amount of deletes and your datatype, there could be space in the pages, paragraphs and extents which have not
been reclaimed.
During the bcp process which is part of the snapshot application process on the subscriber all the data will be in the tables in a contiguous fashion. I would suspect this would be why you have the difference in space usage.
looking for a book on SQL Server 2008 Administration?
http://www.amazon.com/Microsoft-Server-2008-Management-Administration/dp/067233044X looking for a book on SQL Server 2008 Full-Text Search?
http://www.amazon.com/Pro-Full-Text-Search-Server-2008/dp/1430215941 -
Database engine services and sql server replication failed in installation
hi im trying to setup sql server on my laptop but it says the 'database engine services' and 'sql server replication' have failed due to some specified module being missing can anyone help me out?
log file:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2147467259
Start time: 2015-03-17 10:47:47
End time: 2015-03-17 11:08:11
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for Replication: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Machine Properties:
Machine name: SHARI
Machine processor count: 2
OS version: Future Windows Version
OS service pack:
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
SQL Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS Database Engine Services
1033 Express Edition 10.1.2531.0 No
SQL Server 2008 SQLEXPRESS MSSQL10.SQLEXPRESS SQL Server Replication
1033 Express Edition 10.1.2531.0 No
SQL Server 2012
Management Tools - Basic 1033 Express Edition
11.0.2100.60 No
SQL Server 2012
LocalDB 1033
Express Edition 11.0.2100.60 No
Package properties:
Description: Microsoft SQL Server 2012 Service Pack 1
ProductName: SQL Server 2012
Type: RTM
Version: 11
SPLevel: 0
Installation location: c:\efa3a640a9b59ee651913f55719bf3b1\x86\setup\
Installation edition: Express
Product Update Status:
None discovered.
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: true
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: MULTIDIMENSIONAL
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Manual
CLTCTLRNAME: <empty>
CLTRESULTDIR: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: <empty>
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE:
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
CTLRUSERS: <empty>
ENABLERANU: true
ENU: true
ERRORREPORTING: true
FEATURES: SQLENGINE, REPLICATION
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: true
INDICATEPROGRESS: false
INSTALLSHAREDDIR: c:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: c:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files (x86)\Microsoft SQL Server\
INSTANCEID: SHARIINSTANCE
INSTANCENAME: SHARIINSTANCE
ISSVCACCOUNT: NT AUTHORITY\Network Service
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
NPENABLED: 0
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE: AllFeatures_WithDefaults
RSINSTALLMODE: DefaultNativeMode
RSSHPINSTALLMODE: DefaultSharePointMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: <empty>
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT Service\MSSQL$SHARIINSTANCE
SQLSVCPASSWORD: <empty>
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: SHARI\Shari Donald
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: true
TCPENABLED: 0
UIMODE: AutoAdvance
UpdateEnabled: true
UpdateSource: MU
X86: true
Configuration file: C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20150317_104244\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x80004005
Error description: The specified module could not be found.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xEC717F7D%400xC24842DB&EvtType=0xEC717F7D%400xC24842DB
Feature: SQL Server Replication
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x80004005
Error description: The specified module could not be found.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3128.0&EvtType=0xEC717F7D%400xC24842DB&EvtType=0xEC717F7D%400xC24842DB
Feature: SQL Browser
Status: Passed
Feature: SQL Writer
Status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files (x86)\Microsoft SQL Server\110\Setup Bootstrap\Log\20150317_104244\SystemConfigurationCheck_Report.htmHello,
As per the log details shared, installing version is SQL server express. Please go to control panel - add and remove programs and uninstall the
SQL Server Database Engine Services Instance Features, and also Uninstall all SQL Services.
Reboot and start the start the installation with RUN as Administrator.
Thank You.
Regards, Pradyothana DP. Please Mark This As Helpful if it helps to solve your issue. ========================================================== http://www.dbainhouse.blogspot.in/ -
I ran SQL Server 2012 express setup as user with administrator privileges and still it's failing to install "Database Engine Service" and "SQL Server Replication".
Any and every ideas on how to resolve this issue is greatly appreciated.Three weeks passed and I am yet to find a fix for the the failed installation of the database engine on sql server 2012 express installation. I have tried various work-around including uninstalling, deleting all the directory paths, and reinstallation. Still
not able to successfully install sql server 2012 express.
I will greatly appreciate any and every contribution towards resolving this issue. Thanks in advance.
Here is the content of log file after the latest failed installation:
Overall summary:
Final result: Failed: see details below
Exit code (Decimal): -2061893607
Start time: 2013-12-23 14:42:45
End time: 2013-12-23 15:07:51
Requested action: Install
Setup completed with required actions for features.
Troubleshooting information for those features:
Next step for SQLEngine: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Next step for Replication: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Machine Properties:
Machine name: mymachine1
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x86
Process architecture: 32 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
SQL Server 2012 SQLEXPRESS_GT MSSQL11.SQLEXPRESS_GT Database Engine Services
1033 Express Edition 11.0.2100.60 No
SQL Server 2012 SQLEXPRESS_GT MSSQL11.SQLEXPRESS_GT SQL Server Replication
1033 Express Edition 11.0.2100.60 No
SQL Server 2012
Management Tools - Basic 1033 Express Edition
11.0.2100.60 No
Package properties:
Description: Microsoft SQL Server 2012 Service Pack 1
ProductName: SQL Server 2012
Type: RTM
Version: 11
Installation location: C:\9b6607e524727c7fe1defd80\x86\setup\
Installation edition: Express
Slipstream: True
SP Level 1
Product Update Status:
Success: KB 2674319
Product Updates Selected for Installation:
Title: Service Pack 1
Knowledge Based Article: KB 2674319
Version: 11.1.3000.0
Architecture: x86
Language: 1033
Update Source: MU
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: true
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSERVERMODE: MULTIDIMENSIONAL
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: <empty>
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CLTCTLRNAME: <empty>
CLTRESULTDIR: <empty>
CLTSTARTUPTYPE: 0
CLTSVCACCOUNT: <empty>
CLTSVCPASSWORD: <empty>
CLTWORKINGDIR: <empty>
COMMFABRICENCRYPTION: 0
COMMFABRICNETWORKLEVEL: 0
COMMFABRICPORT: 0
CONFIGURATIONFILE:
CTLRSTARTUPTYPE: 0
CTLRSVCACCOUNT: <empty>
CTLRSVCPASSWORD: <empty>
CTLRUSERS: <empty>
ENABLERANU: true
ENU: true
ERRORREPORTING: false
FEATURES: SQLENGINE, REPLICATION, CONN, BC, SDK, ADV_SSMS, SNAC_SDK
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: <empty>
FTSVCPASSWORD: <empty>
HELP: false
IACCEPTSQLSERVERLICENSETERMS: true
INDICATEPROGRESS: false
INSTALLSHAREDDIR: c:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: <empty>
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: SQLEXPRESS
INSTANCENAME: SQLEXPRESS
ISSVCACCOUNT: NT AUTHORITY\Network Service
ISSVCPASSWORD: <empty>
ISSVCSTARTUPTYPE: Automatic
MATRIXCMBRICKCOMMPORT: 0
MATRIXCMSERVERNAME: <empty>
MATRIXNAME: <empty>
NPENABLED: 0
PID: *****
QUIET: false
QUIETSIMPLE: false
ROLE: <empty>
RSINSTALLMODE: DefaultNativeMode
RSSHPINSTALLMODE: DefaultSharePointMode
RSSVCACCOUNT: <empty>
RSSVCPASSWORD: <empty>
RSSVCSTARTUPTYPE: Automatic
SAPWD: <empty>
SECURITYMODE: <empty>
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT Service\MSSQL$SQLEXPRESS
SQLSVCPASSWORD: <empty>
SQLSVCSTARTUPTYPE: Manual
SQLSYSADMINACCOUNTS: MH\gt038676t
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: false
TCPENABLED: 0
UIMODE: AutoAdvance
UpdateEnabled: true
UpdateSource: MU
X86: false
Configuration file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131223_144132\ConfigurationFile.ini
Detailed results:
Feature: Management Tools - Complete
Status: Passed
Feature: Client Tools Connectivity
Status: Passed
Feature: Client Tools SDK
Status: Passed
Feature: Client Tools Backwards Compatibility
Status: Passed
Feature: Management Tools - Basic
Status: Passed
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3000.0&EvtType=0xE53883A0%400xBE03358B%401306%4025&EvtType=0xE53883A0%400xBE03358B%401306%4025
Feature: SQL Server Replication
Status: Failed: see logs for details
Reason for failure: An error occurred for a dependency of the feature causing the setup process for the feature to fail.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=11.0.3000.0&EvtType=0xE53883A0%400xBE03358B%401306%4025&EvtType=0xE53883A0%400xBE03358B%401306%4025
Feature: SQL Browser
Status: Passed
Feature: SQL Writer
Status: Passed
Feature: SQL Client Connectivity
Status: Passed
Feature: SQL Client Connectivity SDK
Status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\110\Setup Bootstrap\Log\20131223_144132\SystemConfigurationCheck_Report.htm -
Hi,
Using SQL Server Replication, data pulling from Sybase to SQL Server is possible or not?
--sybase has publisher and sql has subscriber
ThanksHello,
Just as Hilary post, you should backup the following database and restore to the new server:
1.The publication database at the Publisher
2.The distribution database at the Distributor
3.The subscription database at each Subscriber
4.The master and msdb system databases at the Publisher, Distributor and all Subscribers
After restoring the publication database from a backup, you reinitialize all subscriptions to the publications.
Reference: Strategies for Backing Up and Restoring Merge Replication
Regards,
Fanny Liu
If you have any feedback on our support, please click here.
Fanny Liu
TechNet Community Support -
I've just tried to "Submit Feedback" but the page just gives me an error which means nothing to anyone which says "You are not authorized to submit the feedback for this connection.". Why am I not authorised how do I become authorised etc
etc. Anyway :-)
I've trying to report that the stored procedure in Sql Server Replication in 12.0.2000 has an issue with data type lengths. This procedure sp_MSdetect_nonlogged_shutdown uses data lengths of nvarchar(2048) but the MSDB sysjobhistory table has a message field
length of 4000. Which causes the above stored procedure to crash.
Best Regards
RichardThis is the work around
1. Stop SQL Server service.
2. On command prompt run the following command to run the server in single user mode – be sure to replace the MSSQLSERVER with the actual instance name
C:\>”C:\Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn\sqlservr.exe” -sMSSQLSERVER -m
3. Connect to SQL server with SSMS as the server administrator
4. Run the following to change the database to the system resource database: “USE mssqlsystemresource”
5. Run the following to update the stored procedure (only change is to make NVARCHAR(4000))
SET ANSI_NULLS OFF
GO
SET QUOTED_IDENTIFIER OFF
GO
ALTER procedure [sys].[sp_MSdetect_nonlogged_shutdown]
@subsystem nvarchar(60),
@agent_id int
as
begin
declare @job_id binary(16)
declare @agent_name sysname
declare @message nvarchar(4000)
declare @retcode int
declare @runstatus int
declare @run_date int
declare @run_time int
declare @run_date_orig int
declare @run_time_orig int
declare @merge_session_id int
-- security check
-- only db_owner can execute this
if (is_member ('db_owner') != 1)
begin
raiserror(14260, 16, -1)
return (1)
end
-- Detect if the agent was shutdown without a logged reason
if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'SNAPSHOT'
begin
if exists (select runstatus from MSsnapshot_history where
agent_id = @agent_id and
runstatus <> 2 and
--CAC runstatus <> 5 and
runstatus <> 6 and
timestamp = (select max(timestamp) from MSsnapshot_history where agent_id = @agent_id))
begin
select @job_id = job_id, @agent_name = name from MSsnapshot_agents where id = @agent_id
end
end
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'LOGREADER'
begin
if exists (select runstatus from MSlogreader_history where
agent_id = @agent_id and
runstatus <> 2 and
--CAC runstatus <> 5 and
runstatus <> 6 and
timestamp = (select max(timestamp) from MSlogreader_history where agent_id = @agent_id))
begin
select @job_id = job_id, @agent_name = name from MSlogreader_agents where id = @agent_id
end
end
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'DISTRIBUTION'
begin
if exists (select runstatus from MSdistribution_history where
agent_id = @agent_id and
runstatus <> 2 and
--CAC runstatus <> 5 and
runstatus <> 6 and
timestamp = (select max(timestamp) from MSdistribution_history where agent_id = @agent_id))
begin
select @job_id = job_id, @agent_name = name from MSdistribution_agents where id = @agent_id
end
end
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'MERGE'
begin
if exists (select runstatus from dbo.MSmerge_sessions where
agent_id = @agent_id and
runstatus <> 2 and
--CAC runstatus <> 5 and
runstatus <> 6 and
session_id = (select top 1 session_id from dbo.MSmerge_sessions where agent_id = @agent_id order by session_id desc))
begin
select @job_id = job_id, @agent_name = name from dbo.MSmerge_agents where id = @agent_id
select top 1 @merge_session_id = session_id from dbo.MSmerge_sessions
where agent_id = @agent_id
order by session_id desc
end
end
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'QUEUEREADER'
begin
if exists (select runstatus from MSqreader_history where
agent_id = @agent_id and
runstatus <> 2 and
--CAC runstatus <> 5 and
runstatus <> 6 and
timestamp = (select max(timestamp) from MSqreader_history where agent_id = @agent_id))
begin
select @job_id = job_id, @agent_name = name from MSqreader_agents where id = @agent_id
end
end
-- If no job_id assume shutdown was logged properly
if @job_id is null
return 0
-- Get last message from SQL Agent History table
create table #JobHistory (
instance_id int NOT NULL,
job_id uniqueidentifier NOT NULL,
job_name sysname NOT NULL,
step_id int NOT NULL,
step_name nvarchar(100) NOT NULL,
sql_message_id int NOT NULL,
sql_severity int NOT NULL,
message nvarchar(4000) NOT NULL,
run_status int NOT NULL,
run_date int NOT NULL,
run_time int NOT NULL,
run_duration int NOT NULL,
operator_emailed sysname NULL,
operator_netsent sysname NULL,
operator_paged sysname NULL,
retries_attempted int NOT NULL,
server sysname NOT NULL
if @@error <> 0
return 1
-- Insert last history for step_id 2 (Agent running)
insert TOP(2) into #JobHistory exec sys.sp_MSreplhelp_jobhistory @job_id = @job_id, @step_id = 2,
@mode = 'FULL'
declare cursorHistory cursor local fast_forward for
select message,
run_status,
run_date,
run_time
from #JobHistory
order by run_date desc,
run_time desc,
instance_id asc
open cursorHistory
fetch cursorHistory into @message, @runstatus, @run_date, @run_time
select @run_date_orig = @run_date,
@run_time_orig = @run_time
while @@fetch_status <> -1
begin
-- as long as we are looking at the history for the same run
-- date and time then we should log all rows. there should
-- be 2 rows since we perform a TOP on exec sp_help_jobhistory
if @run_date_orig = @run_date
and @run_time_orig = @run_time
begin
-- Map SQL Agent runstatus to Replication runstatus
set @runstatus =
case @runstatus
when 0 then 6 -- Fail mapping
when 1 then 2 -- Success mapping
when 2 then 5 -- Retry mapping
when 3 then 2 -- Shutdown mapping
when 4 then 3 -- Inprogress mapping
when 5 then 0 -- Unknown is mapped to never run
end
-- If no message, provide a default message
-- Also overwrite all inprogress messages to be "See SQL Agent history log".
-- This is to prevent "Agent running. See monitor" to be logged into repl monitor.
-- In this case (the last job history message is InProgress), we know that
-- there have been failures of SQL Server Agent history logging.
-- In fact, the only possible "in progress" msg in SQL Agent job step
-- history for push jobs is "Agent running. See monitor". It is confusing that those
-- messages showed up in repl monitor.
if @message is null or @runstatus = 3
begin
raiserror(20557, 10, -1, @agent_name)
select @message = formatmessage(20557, @agent_name)
end
if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'SNAPSHOT'
exec @retcode = sys.sp_MSadd_snapshot_history @agent_id = @agent_id, @runstatus = @runstatus,
@comments = @message
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'LOGREADER'
exec @retcode = sys.sp_MSadd_logreader_history @agent_id = @agent_id, @runstatus = @runstatus,
@comments = @message
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'DISTRIBUTION'
exec @retcode = sys.sp_MSadd_distribution_history @agent_id = @agent_id, @runstatus = @runstatus,
@comments = @message
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'MERGE'
exec @retcode = sys.sp_MSadd_merge_history @agent_id = @agent_id, @runstatus = @runstatus,
@comments = @message, @called_by_nonlogged_shutdown_detection_agent = 1, @session_id_override = @merge_session_id
else if UPPER(@subsystem collate SQL_Latin1_General_CP1_CS_AS) = 'QUEUEREADER'
exec @retcode = sys.sp_MSadd_qreader_history @agent_id = @agent_id, @runstatus = @runstatus,
@comments = @message
if @@error <> 0 or @retcode <> 0
return 1
end
fetch cursorHistory into @message, @runstatus, @run_date, @run_time
end
close cursorHistory
deallocate cursorHistory
drop table #JobHistory
end
6. Return the system resource database to read-only – “alter database mssqlsystemresource set read_only”
7. Shutdown the instance – “shutdown”
8. Start the instance using the service as usual -
Hello,
I am trying to install Microsoft SQL Server 2008 R2. I get the error bellow (Database Services Engine Failed, SQL Server Replication Failed, Full Text Search Failed, Reporting Services Failed). I already have a copy of SQL Server 2008 R2 on the machine.
I want to create a new named instance of SQL Server for some software I'm installing.
The error is below.
Any help would be much appreciated, thanks!
Overall summary:
Final result: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Exit code (Decimal): -595541211
Exit facility code: 1152
Exit error code: 49957
Exit message: SQL Server installation failed. To continue, investigate the reason for the failure, correct the problem, uninstall SQL Server, and then
rerun SQL Server Setup.
Start time: 2014-02-06 09:14:09
End time: 2014-02-06 11:18:16
Requested action: Install
Log with failure: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Exception help link: http%3a%2f%2fgo.microsoft.com%2ffwlink%3fLinkId%3d20476%26ProdName%3dMicrosoft%2bSQL%2bServer%26EvtSrc%3dsetup.rll%26EvtID%3d50000%26ProdVer%3d10.50.2500.0%26EvtType%3d0x44D4F75E%400xDC80C325
Machine Properties:
Machine name: BAHPBZ52TY
Machine processor count: 4
OS version: Windows 7
OS service pack: Service Pack 1
OS region: United States
OS language: English (United States)
OS architecture: x64
Process architecture: 64 Bit
OS clustered: No
Product features discovered:
Product Instance Instance ID
Feature Language
Edition Version Clustered
Sql Server 2008 R2 SQLEXPRESS MSSQL10_50.SQLEXPRESS Database Engine Services
1033 Express Edition 10.50.1600.1 No
Sql Server 2008 R2
Management Tools - Basic 1033 Express Edition
10.50.1600.1 No
Package properties:
Description: SQL Server Database Services 2008 R2
ProductName: SQL Server 2008 R2
Type: RTM
Version: 10
Installation location: c:\c7ced2c86d6b9813b28186cc831c2054\x64\setup\
Installation edition: EXPRESS_ADVANCED
Slipstream: True
SP Level 1
User Input Settings:
ACTION: Install
ADDCURRENTUSERASSQLADMIN: True
AGTSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
AGTSVCPASSWORD: *****
AGTSVCSTARTUPTYPE: Disabled
ASBACKUPDIR: Backup
ASCOLLATION: Latin1_General_CI_AS
ASCONFIGDIR: Config
ASDATADIR: Data
ASDOMAINGROUP: <empty>
ASLOGDIR: Log
ASPROVIDERMSOLAP: 1
ASSVCACCOUNT: <empty>
ASSVCPASSWORD: *****
ASSVCSTARTUPTYPE: Automatic
ASSYSADMINACCOUNTS: <empty>
ASTEMPDIR: Temp
BROWSERSVCSTARTUPTYPE: Disabled
CONFIGURATIONFILE:
CUSOURCE:
ENABLERANU: True
ENU: True
ERRORREPORTING: False
FARMACCOUNT: <empty>
FARMADMINPORT: 0
FARMPASSWORD: *****
FEATURES: SQLENGINE,REPLICATION,FULLTEXT,RS,SSMS,SNAC_SDK,OCS
FILESTREAMLEVEL: 0
FILESTREAMSHARENAME: <empty>
FTSVCACCOUNT: NT AUTHORITY\LOCAL SERVICE
FTSVCPASSWORD: *****
HELP: False
INDICATEPROGRESS: False
INSTALLSHAREDDIR: c:\Program Files\Microsoft SQL Server\
INSTALLSHAREDWOWDIR: c:\Program Files (x86)\Microsoft SQL Server\
INSTALLSQLDATADIR: <empty>
INSTANCEDIR: C:\Program Files\Microsoft SQL Server\
INSTANCEID: aedt2bSQL
INSTANCENAME: AEDT2BSQL
ISSVCACCOUNT: NT AUTHORITY\NetworkService
ISSVCPASSWORD: *****
ISSVCSTARTUPTYPE: Automatic
NPENABLED: 0
PASSPHRASE: *****
PCUSOURCE: c:\c7ced2c86d6b9813b28186cc831c2054\PCUSOURCE
PID: *****
QUIET: False
QUIETSIMPLE: False
ROLE: AllFeatures_WithDefaults
RSINSTALLMODE: DefaultNativeMode
RSSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
RSSVCPASSWORD: *****
RSSVCSTARTUPTYPE: Automatic
SAPWD: *****
SECURITYMODE: SQL
SQLBACKUPDIR: <empty>
SQLCOLLATION: SQL_Latin1_General_CP1_CI_AS
SQLSVCACCOUNT: NT AUTHORITY\NETWORK SERVICE
SQLSVCPASSWORD: *****
SQLSVCSTARTUPTYPE: Automatic
SQLSYSADMINACCOUNTS: BAH\568385
SQLTEMPDBDIR: <empty>
SQLTEMPDBLOGDIR: <empty>
SQLUSERDBDIR: <empty>
SQLUSERDBLOGDIR: <empty>
SQMREPORTING: False
TCPENABLED: 0
UIMODE: AutoAdvance
X86: False
Configuration file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\ConfigurationFile.ini
Detailed results:
Feature: Database Engine Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: SQL Client Connectivity SDK
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: SQL Server Replication
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: Full-Text Search
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: Reporting Services
Status: Failed: see logs for details
MSI status: Passed
Configuration status: Failed: see details below
Configuration error code: 0xDC80C325
Configuration error description: Access is denied
Configuration log: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\Detail.txt
Feature: Management Tools - Basic
Status: Passed
MSI status: Passed
Configuration status: Passed
Feature: Microsoft Sync Framework
Status: Passed
MSI status: Passed
Configuration status: Passed
Rules with failures:
Global rules:
Scenario specific rules:
Rules report file: C:\Program Files\Microsoft SQL Server\100\Setup Bootstrap\Log\20140206_091302\SystemConfigurationCheck_Report.htmHello,
If you see error descriptioon it gives access denied so basically it is because of some access issue.I guess You must be using some domin account for installation make sure it is added as local administrator also instead of using NT Authority network
service as SQL server service account use local system account .
Below link would help
http://serverfault.com/questions/212135/access-is-denied-error-installing-sql-server-2008-on-windows-7
You can also browse to setup.exe file and RK on it and select run as administrator
Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers -
Sql Server Replication Advice - In desperate need of good advice
I am a new developer and have written an application which solves some very important problems for my company. At the moment, I am stuck on replication. I believe what I need is merge replication but before I waste any more valuable
time I wanted to ask for advice. The specific problem I am trying to solve is this. The company has around thirty marine vessels which frequently lose internet connection. The application I have written writes to a sqlserver 2012 database installed locally
on each marine vessel. When the vessels have connection, it also writes to a sqlserver 2012 database which currently resides on an azure vm. What I need to happen is this. I need the databases on the marine vessels to replicate with the remote database. I
believe that I need the local databases on the marine vessels to be the publisher and distributor and that I want the changes to be pushed to the remote server residing on the azure vm. The setup has been so hard to implement (probably because I'm still dealing
with the learning curve) that I am wondering if this is the best way to go. Any advice on whether this is the correct way to go or if there are better alternatives is greatly appreciated.
I have also tried using the sync framework, and the sql azure sync agent. I have gotten both to achieve exactly what I am after, except for one thing. The application residing on the marine vessels will create new tables. I have not found anyway to
add the new tables to the sync schema, without manually going in and setting them up. Since I will not be on these vessels, it's not really an option. If there is a way to add the new tables programmatically then the sync agent would work perfectly for me.
Thanks to all for any help.Hi,
Yes, you can configure the SQL Server replication. Replication processing resumes at the point at which it left off if a connection is dropped. If you are using merge replication over an unreliable network, consider using logical records,
which ensures related changes are processed as a unit. For more information, see
Group Changes to Related Rows with Logical Records.
These articles may be helpful:
Synchronize two tables using SQL Server Integration Services (SSIS)–Part I of II
http://blogs.msdn.com/b/jorgepc/archive/2010/12/07/synchronize-two-tables-using-sql-server-integration-services-ssis-part-i-of-ii.aspx
Synchronize SQL Server databases in different remote sources
http://solutioncenter.apexsql.com/synchronize-sql-server-databases-in-different-remote-sources/
Thanks.
Tracy Cai
TechNet Community Support -
Golden Gate SQL Server Replication
Hello Friends..
I need your help in getting some information about Golden Gate SQL Server replication. Could you guys please help me in finding an answers on how a highly transactional sql server does with clustering and replication ? How long does it take to get replica online to users ? Is there any good reading material about Golden gate sql replication? Please helpDocumentation is always a nice place to start reading:
http://www.oracle.com/technetwork/middleware/goldengate/documentation/index.html
Regarding replication, please take into account that DDL replication is only supported between oracle databases.
As for your main question, it is all based on the configuration you use. If you have much going on on the source you might add replicats to process the workload in parallel
Greetings,
NK -
SQL Server Replication with MYSQL DB on web
Hi Friends,
I want to inquire that using sqlserver 2012 we can configure transactional replication between MYSQL DB on web to sqlserver 2012. Tables will be residing on MYSQL DB web to SQLSERVER 2012. using sqlserver replication as option (publisher and subscriber)
thank you.
regards,
asad
asadHi Asad,
I suspect you want the replication done using a SSIS package, this is why you posted your question here.
I then need to disappoint you, neither SSIS nor anything in the standard SQL Server distribution exists that will make this happen.
In the field the devs typically use 3rd party tools, or write a lot of custom code which results in a custom tailored application
Thread https://social.msdn.microsoft.com/Forums/sqlserver/en-US/fbfeb2a8-9875-4590-b367-018bb7777b3c/is-it-possible-to-set-up-a-replication-between-sql-server-2008r2-and-mysql-v4?forum=transactsql has many such options listed.
Arthur
MyBlog
Twitter -
Network requirements for SQL Server Replication
Hi,
Can any one tell me what is network requirements for SQL Server replication.
I have successfully configured the replication on LAN with active directory but I am unable to configure it on WAN.
Can anyone tell me how WAN can be configured for sql server replication.
Any help in this regard will be highly appreciated.
Regards,
Muhammad ImranHi Muhammad,
In addition to Prashanth’s post, please also check the following things to optimize SQL Server replication with a WAN link.
• Initialize the Subscriber from a backup.
Publishing the execution of stored procedures as opposed to replicating each operation performed by the stored procedure.
Leveraging Subscription Streams.
For more information, please review the following blog:
http://sqlblog.com/blogs/argenis_fernandez/archive/2011/05/31/transactional-replication-and-wan-links.aspx
Thanks,
Lydia Zhang
Lydia Zhang
TechNet Community Support -
SQL Server Replication Monitoring
I wanted to enable SQL server Replication monitoring
I checked online and found
http://blogs.catapultsystems.com/cfuller/archive/2010/11/10/enabling-sql-replication-monitoring-%E2%80%93-what-to-expect-in-the-replication-views-in-opsmgr.aspx
After i setup monitoring by enabling the discover by overrides the Distributor state became healthy and being monitored. However it shows Not Monitored state for Publication, Publisher and subscriber state
do i have to configure something else as wellIf the discovery jobs are enabled they should appear as monitored.
Could be that the discovery did not yet fully run.
I would:
Review the health explorer for the systems
Review the discovery status
Another view on the subject:
http://www.sqlmag.com/article/monitoring-and-analysis/monitor-sql-server-2008-with-opsmgr
After reviewing the management pack guide here:
http://www.microsoft.com/en-us/download/details.aspx?id=10631
It is stating on page 51 you need to enable the discovery for the different objects seperately. So maybe check into that as well...
It's doing common things uncommonly well that brings succes. -
Unable to install SQL server 2000 and 2005 on Satellite A205-s5831
Hello everyone.
I Needs some helps from all of you.
I have Toshiba Laptop Satellite A205-S5831.
Its Have Windows Vista Home Premium.
And I am unable to install SQL server 2000 and 2005.
I also Unable to Install Windows XP SP2.
Problem is SATA driver.
Plz Help me ...!
Response meHi
The Windows XP needs a SATA driver if you want to install it on the notebook with SATA HDD controller.
The SATA driver can be found in the Intel Storage Manager.
I would recommend using the nLite program to include a SATA driver into the new Windows XP CD and then to boot from the new created XP CD.
Here you will find all details regarding the nLite:
http://www.nliteos.com/
Regarding SQL server issue;
Maybe you will be able to install in on Windows XP. Possibly there is a compatibility issue between the Vista and the SQL server software -
Install AD / SQL Server 2012 and SharePoint 2013 on a single server as Development Environment
Hi All,
I'm planning to prepare a SharePoint 2013 development environment. The current idea is to install Domain controller, SQL Server 2012 and SharePoint 2013 all on a single server. Even though this is for development purposes,
would there be any limitations specially when it comes to SP 2013 functionalities according to your experience?
Some articles i referred.
http://sharepoint-tutorial.net/post/2012/07/18/install-sharepoint-2013-domain-controller.aspx
http://social.technet.microsoft.com/Forums/en-US/f438c9a6-02e8-43d3-9963-7a0608f0b961/sharepoint2013-on-domain-controller
Thanks,
DilipHi
i understand this is a sandbox environment but you should be able to install everything.
http://sharepoint-tutorial.net/post/2012/07/18/install-sharepoint-2013-domain-controller.aspx
Hope this helps. Please remember to click “Mark as Answer” on the post that helps you, and to click “Unmark as Answer” if a marked post does not actually answer your question. This can be beneficial to other community members reading the thread.
Maybe you are looking for
-
Firefox 3.6.8 still having problems loading heavy Flash websites
Upgraded to latest 3.6.8 Firefox version and noting it is still having issues loading heavy flash websites. Takes 5 to 6 times longer to load a webpage if there is Flash on it. I do have the latest version of Flash installed according to Adobe's webs
-
Classpath and DataSource within Tomcat
Used software: - Tomcat 5.5.11 - JDK 5.0 - Windows XP SP2 Problem statement: I have a webapplication, called monitorclient, which uses a connection to a database using a JNDI bound DataSource object through my context.xml file. To connect to the data
-
Creating Client 800 For ECC 6.0
Hi, I have installed ECC 6.0 IDES in my PC,i able use 001 client with DDIC user name but iam unable to open 800 client. Can you please tell me how to create client 800 in ECC. Thanks in Advance, Regards, Balu.
-
Cross company transactions customization Help - Urgent...
Hi All, Can anyone tell me where I have to do the customization for cross company transactions, In the scenarios 1. for materials shipped to the customer of company code BBBB, by company code AAAA on behalf of company code BBBB or vice versa 2. For m
-
My complete list of bookmarks is doubled
firefox 12 - windows xp fully up to date My complete list of bookmarks (all folder and bookmarks)is repeated including the get bookmarks addon tab. What happened and how do I fix it? Do I need to go and edit the entire list back to single entries?