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

Similar Messages

  • SQL Server 2008 R2 - Connection from multiple sources makes the database drop.

    Hey,
    I have a database being accesses from multiple sources - IIS and WPF application.
    Once a user enters the website(which is connected to the database through a Connection String), The WPF application stops its communication with the database, or vise versa.
    The problem being solved once I restart the IIS service or the SQL instance service.
    Thanks in advanced.
    Nir.

    Hello Nir,
    Thank you for your question. I am trying to involve someone more familiar with this topic for a further look at this issue. Sometime delay might be expected from the job transferring. Your patience is greatly appreciated. 
    Thank you for your understanding and support.
    If you have any feedback on our support, please click
    here.
    Regards,
    Elvis Long
    TechNet Community Support

  • SQL Server 2012 express istallation failing to install "Database Engine Service" and "SQL Server Replication"

    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

  • 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.htm

    Hello,
    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/

  • SQL Server Replication: Sybase as publisher and SQL Server as Subscriber possible or not?

    Hi,
    Using SQL Server Replication, data pulling from Sybase to SQL Server is possible or not?
    --sybase has publisher and sql has subscriber
    Thanks  

    Hello,
    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

  • Sql server replication server SLOW

    My team has been troubleshooting this for months now.  Sql Server 2008 r2
    Our Main DB & server is on "server A" and is a physical machine with a single virtual instance on it, it does not share with anyone, it has its own physical hard drives and has 20 gb memory and hosts our 1 terabyte DB and is very fast which
    is perfect.  It performs nightly loads of data which users access throughout the day.  it is not a transactional db, more of a data warehouse db.
    our second sql server, "Server B", has the exact same specs, actually we doubled the memory since it was slow to 40 gb memory and its still 4 times slower than server A!!!  only difference is the hard drive is on a SAN, which I am told is
    state of the art, fast, etc...
    we setup replication on ServerA to replicate to ServerB.  The distribution DB is on ServerB as well.
    We did a test where we shut down the distribution DB since it seems like that takes up about 30% of the cpu usage, and the queries we ran are still 4 times slower!
    Our next step is we are going to try and put the Distribution DB which is on ServerB on its own volume.
    and then next step is to try and put Server B on its own server (not sharing with any other companies) with its own physical hard drives like server A is.
    Can anyone offer some insight, help, thoughts, etc.  thank you.

    Hi Hilary,
    This is most likely due to IO. SANs are NOT all the same. Typically you should not use ISCI for SQL Server deployments. As the number of NICs required, the number of HOPs, management, network configuration and server configuration can be difficult
    to align and defend in support of SQL Server deployments. Note: this is true of ALL database servers..
    However, the first thing you need to do in order to identify if there are any Disk Related IO Bottlenecks is to collect performance metrics on the 2 environments. Start with Server A and then implement the same performance counters on Server B then perform
    the 4 queries capture the information from both servers and compare.
    Data to Collect
    There are numerous counters available in perfmon. We recommend that you collect data from the following counters when you are analyzing characteristics of a SQL Server workload. These disk-specific counters are listed under the LogicalDisk
    section of the available counters. (The PhysicalDisk counter object may show the same values if there is a 1:1 relationship between a logical volume and disk.) The LogicalDisk object reports volume letters or mount point names (rather than disk numbers) and
    it can provide a finer level of granularity if there are multiple volumes on a single Windows disk.
    Counter Description LogicalDisk Perfmon Object
    Disk Reads/sec - Disk Writes/sec = Measures the number of IOPs.You should discuss the expected IOPs per disk for different type and rotational speeds with your storage hardware vendor.
    Typical sizing at the per disk level are listed below:
    10K RPM disk – 100 to 120 IOPs
    15K RPM disk – 150 to 180 IOPs
    Enterprise-class solid state devices (SSDs) 5,000+ IOPs
    Average Disk sec/ Average Disk sec/Write = Measures disk latency. Numbers vary, but here are the optimal values for averages over time:
    1 - 5 milliseconds (ms) for Log (ideally 1 ms or less on average)
    Note: For modern storage arrays, log writes should ideally be less than or equal to 1-2 ms on average if writes are occurring to a cache that guarantees data integrity (that is, battery backed up and mirrored). Storage-based replication and disabled write
    caching are two common reasons for log latencies in the range of 5 or more milliseconds.
    5 - 20 ms for Database Files (OLTP) (Ideally 10 ms or less on average)
    Less than or equal to 25-30 ms for Data (decision support or data warehouse)
    Note: The value for decision support or data warehouse workloads is affected by the size of the I/O being issued. Larger I/O sizes naturally incur more latency. When interpreting this counter, consider whether the aggregate throughput potential of the
    configuration is being realized. SQL Server scan activity (read-ahead operations) issues transfer sizes up to 512K, and it may push a large amount of outstanding requests to the storage subsystem. If the realized throughput is reasonable for the particular
    configuration, higher latencies may be acceptable for heavy workload periods.
    If SSD is used, the latency of the transfers should be much lower than what is noted here. It is not uncommon for latencies to be less than 5 ms for any data access. This is especially true of read operations.
    Average Disk Bytes/Read - Average Disk Bytes/Write = Measures the size of I/Os being issued. Larger I/Os tend to have higher latency (for example, BACKUP/RESTORE operations issue 1 MB transfers by default).
    Current Disk Queue Length = Displays the number of outstanding I/Os waiting to be read or written from the disk. Deep queue depths can indicate a problem if the latencies are also high. However, if the queue is deep, but latencies are low
    (that is, if the queue is emptied and then refilled very quickly), deep queue depths may just indicate an active and efficient system. A high queue length does not necessarily imply a performance problem.
    Note: This value can be hard to interpret due to virtualization of storage in modern storage environments, which abstract away the physical hardware characteristics; this counter is therefore limited in its usefulness.
    Disk Read Bytes/sec - Disk Write Bytes/sec = Measures total disk throughput. Ideally larger block scans should be able to heavily utilize connection bandwidth. This counter represents the aggregate throughput at any given point in time.
    SQL Server Buffer Manager Perfmon Object = The Buffer Manager counters are measured at the SQL Server instance level and are useful in characterizing a SQL Server system that is running to determine the ratio of scan type activity to seek
    activity.
    Checkpoint pages/sec = Measures the number of 8K database pages per second being written to database files during a checkpoint operation.
    Page Reads/sec = Pages reads/sec measures the number of physical page reads being issued per second.
    Readahead pages/sec = Read-ahead pages/sec measures the number of physical page reads that are performed using the SQL Server read-ahead mechanism. Read-ahead operations are used by SQL Server for scan activity (which is common for data
    warehouse and decision support workloads). These can vary in size in any multiple of 8 KB, from 8 KB through 512 KB. This counter is a subset of Pages reads/sec and can be useful in determining how much I/O is generated by scans as opposed to seeks in mixed
    workload environments.
    Cheers,
    -Ivan

  • 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 help

    Documentation 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 Express 2014 Installation Completes with Failures and Repair Does Nothing to Help

    I am attempting to install SQL Server Express 2014 on a development machine and as usual old versions of SQL and the remnants of them are a plague to the installation.
    I have used to Revo Uninstaller to scrub the old installations and with my first attempt after some additional work on the registry I was able to get an instance to install and remarkably I was able to connect to the instance. However, I removed an application
    reference to SQL Server 2008 after the SQL Express 2014 installation (through Control Panel > Programs > Programs and Features) and it stopped working immediately.
    So I removed (uninstalled using Revo Uninstaller) every reference to any SQL Server application as well as removed all of the registry references (using Revo) and I can now install SQL Server Express 2014 with 
    "Feature" failures [Reporting Services, Database Engine Services, Full-Text and Semantic Extractions for Search and SQL
    Server Replication]  and of course it doesn't work.
    Now when I attempt "Repair" the installation the process ends normally (no errors) and reports  "Success" however SQL still has no instance and the services are not running nor are they visible when I open the "SQL Server Configuration
    Manager".
    This is the "Repair" log:
    Overall summary:
    Final result: Passed
    Exit code (Decimal): 0
    Start time: 2014-12-21 17:21:37
    End time: 2014-12-21 17:29:10
    Requested action: Repair
    Machine Properties:
    Machine name: EDWARD-PC2
    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 Configured
    SQL Server 2014 Management Tools - Basic 1033 Express Edition 12.0.2000.8 No Yes
    SQL Server 2014 Management Tools - Complete 1033 Express Edition 12.0.2000.8 No Yes
    SQL Server 2014 Client Tools Connectivity 1033 Express Edition 12.0.2000.8 No Yes
    SQL Server 2014 Client Tools Backwards Compatibility 1033 Express Edition 12.0.2000.8 No Yes
    SQL Server 2014 Client Tools SDK 1033 Express Edition 12.0.2000.8 No Yes
    SQL Server 2014 LocalDB 1033 Express Edition 12.0.2000.8 No Yes
    Package properties:
    Description: Microsoft SQL Server 2014
    ProductName: SQL Server 2014
    Type: RTM
    Version: 12
    SPLevel: 0
    Installation location: C:\Users\Edward\Downloads\SQLEXPRADV_x86_ENU\x86\setup\
    Installation edition:
    User Input Settings:
    ACTION: Repair
    AGTDOMAINGROUP: <empty>
    AGTSVCACCOUNT: <empty>
    AGTSVCPASSWORD: <empty>
    AGTSVCSTARTUPTYPE: Manual
    ASCONFIGDIR: Config
    ASSVCACCOUNT: <empty>
    ASSVCPASSWORD: <empty>
    CLTSTARTUPTYPE: 0
    CLTSVCACCOUNT: <empty>
    CLTSVCPASSWORD: <empty>
    CONFIGURATIONFILE:
    CTLRSTARTUPTYPE: 0
    CTLRSVCACCOUNT: <empty>
    CTLRSVCPASSWORD: <empty>
    ENU: true
    FAILOVERCLUSTERGROUP: <empty>
    FAILOVERCLUSTERNETWORKNAME: <empty>
    FTSVCACCOUNT: <empty>
    FTSVCPASSWORD: <empty>
    HELP: false
    IACCEPTSQLSERVERLICENSETERMS: false
    INDICATEPROGRESS: false
    INSTANCENAME: <empty>
    ISSVCACCOUNT: NT AUTHORITY\Network Service
    ISSVCPASSWORD: <empty>
    ISSVCSTARTUPTYPE: Automatic
    QUIET: false
    QUIETSIMPLE: false
    SQLSVCACCOUNT: <empty>
    SQLSVCPASSWORD: <empty>
    UIMODE: AutoAdvance
    X86: false
    Configuration file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20141221_172135\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: SQL Browser
    Status: Passed
    Feature: Documentation Components
    Status: Passed
    Feature: SQL Writer
    Status: Passed
    Feature: LocalDB
    Status: Passed
    Feature: SQL Client Connectivity
    Status: Passed
    Feature: SQL Client Connectivity SDK
    Status: Passed
    Feature: Setup Support Files
    Status: Passed
    Rules with failures:
    Global rules:
    There are no scenario-specific rules.
    Rules report file: C:\Program Files\Microsoft SQL Server\120\Setup Bootstrap\Log\20141221_172135\SystemConfigurationCheck_Report.htm
    However this is what the "SQL Sever Configuration Manager" look like:
    Why does this appear to not be working properly? I can not connect the the "local" instance and I would guess that the service either does not exist or is not running.
    Edward Walker

    Hello,
    To my knowledge, Revo is not a supported way to uninstall SQL Server.
    Please try to uninstall all you can using Control Panel -> Programs and Features, then perform a manual uninstall to
    remove remnants. Try the following procedure:
    1. Uninstall all SQL Server 2012 components you can using Control Panel -> Programs and Features
    2. Backup the registry.
    3. Delete the following keys in regedit:
    --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server
    --HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer
    4. Go to HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall and delete all the sub-keys referencing
    SQL Server.
    5. Go to HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services and delete all the keys referencing SQL Server.
    6. Rename all the SQL Server folders in the computer like C:\Program Files\Microsoft SQL Server and subfolders.
    After performing above procedure, try to reinstall SQL Server again.
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Database Services Engine Failed, SQL Server Replication Failed, Full Text Search Failed, Reporting Services Failed

    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.htm

    Hello,
    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

  • Trying to report bug in SQL Server Replication with sp_MSdetect_nonlogged_shutdown stored procedure

    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
    Richard

    This 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

  • 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 Imran

    Hi 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 well

    If 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.

  • Sql server replication from SQL SERVER VERSION(7.0) to SQL SERVER 2005

    Hi All,
    We are trying to create a replication between Sql server 7.0 data to SQL server 2005 data . We tried to create a local subscription in Sql server ,when tried to connect to publisher  running in Sql server 7.0 it is showing an error message
    like "This Sql server vresion(7.0) is not supported" .
    Could any one please help us with this issue ?
    Thanks
    Sandy

    Hi CRM_Learner,
    SQL Server version 7.0 Service Pack 4 (SP4) is the earliest version that can participate in a replication topology with SQL Server 2005. We need to verify the version of SQL Server. If you configure transactional replication with updating subscribers,
    for a SQL Server 7.0 Publisher, only SQL Server 7.0 Subscribers are supported. SQL Server 7.0, 2000 was out of support in the SQL Server Forums. I suggest you install SQL Server 2005 or later version to configure the SQL Server replication.
    For more information, there is a detail about using multiple Versions of SQL Server in a replication topology.
    http://technet.microsoft.com/en-us/library/ms143241(v=sql.90).aspx
    Regards,
    Sofiya Li
    If you have any feedback on our support, please click here.
    Sofiya Li
    TechNet Community Support

  • Sql server replication

    hi,
    what  sql server replication? Differenent type  server replication?
    thanx
    subodha

    For SQL Server, I'd start looking through the MSDN documentation which is available here: [SQL Server Replication|http://msdn.microsoft.com/en-us/library/ms151198(SQL.90).aspx]
    Hope that is helpful,
    J. Haynes

Maybe you are looking for