how to deploy stored procedures onsite

S

scott

Hi,

I created an sql script for my stored procedures. How can i execute this
script on customers sites ?

At the moment i can use the query analyser but its not going to be available
at customer sites.

What are my options ?

Many thanks for any information.
Scott
 
G

Guest

You can give a VB Script file as below.

Dim cn
Dim cmd
Dim rs
Dim params
Dim param
set cn=createobject("ADODB.Connection")
set cmd=createobject("ADODB.Command")
set rs=createobject("ADODB.Recordset")
cn.Provider = "SQLOLEDB"
cn.Open "Data Source = <SQL Server Name>", "testlogin"
Set cmd.ActiveConnection = cn
cmd.CommandType = &H0004
cmd.CommandText = "mainproc"
cmd.CommandTimeout = 0
' Prepare the command
cmd.Prepared = True
Set rs = cmd.Execute
Wscript.echo rs(0)
cn.Close
Set cmd = Nothing
Set cn = Nothing
 
E

Eliyahu Goldin

Scott,

You will need to have an access to the database server with enough rights
for creating stored procedures. You, or your customer, need to talk to IT
guys who are in charge of the database server and ask them to provide an
access for you. That's the down side of using stored procedures.

Eliyahu
 
B

Bruce Barker

the most common approach is a bat file and the osql utility.

-- bruce (sqlwork.com)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,983
Messages
2,570,187
Members
46,747
Latest member
jojoBizaroo

Latest Threads

Top