Re: How do I backup functions and procedures in database?

From: jefftyzzer <>
Date: Thu, 17 Jan 2008 10:06:53 -0800 (PST)
Message-ID: <>

On Jan 16, 6:07 pm, Sasha <> wrote:
> On Jan 16, 6:02 pm, jefftyzzer <> wrote:
> > On Jan 16, 5:15 pm, Sasha <> wrote:
> > > I've wrote some function and procedures(create function etc.) on PL/
> > > SQL
> > > How can I back up/save them in case I lose my DB? Is there any tool
> > > for that?
> > > Thanks
> > Since UDFs and SPs are database objects, they're stored in the data
> > dictionary and backed up along with the rest of the database. In
> > addition to this, I'd recommend version-controlling your UDFs and SPs
> > separately (as you would any code).
> > --Jeff
> Thanks for your help.
> How do version control UDFs and SPs? Without manually coping them into
> cvs or similar version control programs?
> Thanks

When I write SPs and UDFs, it's usually in some kind of editor, with each SP or UDF stored in a separate text file. It is these files that you would then have to manually archive to your source code control environment. This is just an extra layer of protection--as I said above, you can rest assured that your SPs and UDFs--as schema "objects"--are backed up as part of the database. Also, as Joel mentions below, the bodies of your SPs and UDFs are extractable via export, or even a direct query of the catalog views.

--Jeff Received on Thu Jan 17 2008 - 12:06:53 CST

Original text of this message