SQL Server - **replication - Asked By Rajeeivf Ratha on 05-Dec-11 12:09 AM

i installed Sql server 2005 Management studio express...i need to create replication....when i create new subscription sql server shows errors "replication components are not installed on the server"..pls help me immediately...

then i went to Add/remove program " select-->sql server 2005 --->clock on change button. if u install components,which asks "missing Sqlrun_tools.msi file" .so how to install sqlrun_tools.msi file...


pls help me
Jitendra Faye replied to Rajeeivf Ratha on 05-Dec-11 12:11 AM
You may have any incomplete installation of SQL Server Replication. I would recommend running "SQL Server Installed Features Discovery Report" tool as mentioned in http://blogs.msdn.com/b/chaitanya_medikonduri/archive/2011/04/26/sql-server-installation-useful-tools.aspx. If it shows as not installed, you can run setup.exe of SQL Server and add SQL Server Replication feature. If it shows as installed, please run a repair of SQL Server or reinstall (remove and add) SQL Server Replication feature which should be able to resolve this issue.
Reena Jain replied to Rajeeivf Ratha on 05-Dec-11 12:14 AM
Hi,

We have successfully fixed same issue on our Production Environment.

Here is the command line parameter fix for adding replication/other components on cluster environment.

C:\Software\SQL 2005 STD\Standard_x86\Servers>start /wait setup.exe /qb VS=SQL1 INSTANCENAME=SQL1 ADDNODE="xxxx1,xxxx2" GROUP="GROUP 0" IP="xxx.xx.xxx.xxx,Public" ADDLOCAL=SQL_Replication ADMINPASSWORD=xxxxx INSTALLSQLDIR="C:\ Program Files\Microsoft SQL Server\MSSQL.1\MSSQL\Binn"

Post installation Check - Check the registry key

‘HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.1\Replication\IsInstalled’ for the value 1 post installation.

Once the above command completes successfully, replication components automatically gets upgraded to SP2/SP3. It automatically applies SP2/SP3 on the replication components if installed by the above method.

Default location for the replication components.

You could check the version of the replication dlls at the location below: “C:\Program Files\Microsoft SQLServer\90\COM”

or run setup throguh cammand line to install the replication.  The solution that worked was to remove SQL server completely and reinstall.  The second installation will fix the replication
Riley K replied to Rajeeivf Ratha on 05-Dec-11 12:19 AM

First things first, you need to check if replication is already installed on your SQL Server.

 To do this, right click on the Replication tree node in the SQL Server Management Studio (SSMS) Object Explorer window:
Check if Replication is Installed on SQL Server 2005
Now click on the Configure Distribution menu item. If replication has not been installed on the SQL Server, the following message will appear:
SQL Server Error 21028

http://
Regards
Chintan Vaghela replied to Rajeeivf Ratha on 05-Dec-11 12:32 AM
HEllo

To install replication on a base instance of SQL Server 2005, you ideally need to pop the original installation CD or DVD into its original drive, that is the same drive you used when SQL Server was initially installed.

If you do not have the original media (CD or DVD), or the original drive from which SQL Server was installed has changed or is unknown, simply copy the SQL Server 2005 "Servers" folder from an installation DVD onto the root directory of a local hard disk drive. This will then allow you to install from a location other than the original.

Once you've done this, run the following command from a DOS (or "command") prompt, assuming that the original SQL Server installation media is located on the X: drive:
Anoop S replied to Rajeeivf Ratha on 05-Dec-11 01:36 AM
Use sp_MS_replication_installed system stored procedure, this stored procedure is simple enough in that it returns a 0 if the replication components are installed and a 1 if they aren’t.

   1: USE [master]
   2: GO
   3: /******Object:  StoredProcedure [sys].[sp_MS_replication_installed]******/
   4: SET ANSI_NULLS ON
   5: GO
   6: SET QUOTED_IDENTIFIER ON
   7: GO
   8:  
   9: --
  10: -- Name: sp_MS_replication_installed
  11: --
  12: -- Descriptions: 
  13: --
  14: -- Parameters: as defined in create statement
  15: --
  16: -- Returns: 0 - success
  17: --          1 - Otherwise
  18: --
  19: -- Security: 
  20: -- Requires Certificate signature for catalog access
  21: --
  22: ALTER procedure [sys].[sp_MS_replication_installed]
  23: as
  24:     set nocount on
  25:     declare @isinstalled int
  26:     select @isinstalled = 0
  27:     declare @retcode int
  28:     
  29:     EXECUTE @retcode = master.dbo.xp_instance_regread 'HKEY_LOCAL_MACHINE', 
  30:         'SOFTWARE\Microsoft\MSSQLServer\Replication',
  31:         'IsInstalled',
  32:         @param = @isinstalled OUTPUT
  33:  
  34:     IF ( @retcode <> 0 ) or ( @@ERROR <> 0 ) 
  35:     begin
  36:         raiserror (21028, 16, -1)
  37:         return (0)
  38:     end
  39:     
  40:     if (@isinstalled is null or @isinstalled = 0)
  41:     begin
  42:         raiserror (21028, 16, -1)
  43:         return (0)
  44:     end
  45:  
  46:     return (1)

refer this for more details
http://www.dogspots.com/DSBE/post/2009/10/02/AreReplicationComponentsInstalled.aspx