|
|
Question : Read Stored procedure text from java code.
|
|
Hello all, Is there an API available in java, to read the contents of a Stored proc in an SQL server DB? We have about 3000 stored procs and want to create a backup of all of them. Thanks in advance
|
Answer : Read Stored procedure text from java code.
|
|
I do what I said above and just copy it all to a text file, then search all I want. But if you have to do it with a program see below.
create proc foo as --1. select o.id, o.name, o.uid, user_name(o.uid) as username into #temptable from dbo.sysobjects o where o.type = 'P'
--2. cursor to iterate through all proc names and put the text into another table.
--3. use dts to export to a file
go
Duane
|
|
|
|
|