We have a stored procedure that needs to be updated at a customer site. Basically we will be emailing the changed sp to customer. What is the easiest way a non tech user can install update this sp in sql server express 2005 ? I would ideally like to create some bat file or exe that the user can just double click and the sp gets installed. I know c#, t-sql and basic dos script commands. OS is win xp. Please do not propose any fancy solutions using powershell since that may not be installed on customer machine. Note this is sql EXPRESS 2005. The sp itself is like any standard sp that has below structure. Worst case I plan to create a word doc with step by step screenshots on how to open sql management studio , open file, execute....
use [dbname]
GO
IF EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[sp_name]')
AND type in (N'P', N'PC'))
DROP PROCEDURE [dbo].[sp_name]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
CREATE PROCEDURE [dbo].[sp_name]
AS blah blah
thank you
If the user has SQL Server Management Studio, then they also have SQLCMD which is a command line utility for connecting to the database. You could put your sql script in to a .sql file and then create a .bat file that calls SQLCMD with the appropriate command line switches.