[dba-SQLServer] Testing UDFs

Francisco Tapia fhtapia at gmail.com
Sat Jul 4 13:08:49 CDT 2009


John,  rather than throwing things into the master database I advise you to
create a master procedure database and drop in your sprocs and udfs in
there.  Next time you need to rebuild your system it will be much easier to
have your sprocs and udf's easily backed up and restorable.  the simplicity
of not having to explicitly call master in front of each call is out weighed
by having a reliable backup imho.

so your calls would be something like

mysysdb.dbo.myudfname


-Francisco
http://sqlthis.blogspot.com | Tsql and More...


On Sat, Jul 4, 2009 at 7:01 AM, jwcolby <jwcolby at colbyconsulting.com> wrote:

> Well... I put master.dbo.MyUDFName and it worked just fine.
>
> John W. Colby
> www.ColbyConsulting.com
>
>
> jwcolby wrote:
> > BTW I designed the UDF in the Master database in the hopes that it would
> be visible from any other
> > database when it was time to do an update query.
> >
> > John W. Colby
> > www.ColbyConsulting.com
> >
> >
> > Doris Manning wrote:
> >> Dbo.uf_AddrValid
> >>
> >> -----Original Message-----
> >> From: dba-sqlserver-bounces at databaseadvisors.com
> >> [mailto:dba-sqlserver-bounces at databaseadvisors.com] On Behalf Of
> jwcolby
> >> Sent: Saturday, July 04, 2009 9:36 AM
> >> To: Dba-Sqlserver
> >> Subject: [dba-SQLServer] Testing UDFs
> >>
> >> I am jumping into writing UDFs this morning.  I need to test the
> results.
> >> When I write a query to pull data from a table using the UDF as one of
> the
> >> columns (just to display what happens) I get:
> >>
> >> "uf_AddrValid not a recognized built-in function name."
> >>
> >> Is there a naming convention to allow SQL Server (2005) to understand my
> UDF
> >> and use them?  I know that there was a prefix I had to use in stored
> >> procedures.
> >>
> >> --
> >> John W. Colby
> >> www.ColbyConsulting.com
> >> _______________________________________________
> >> dba-SQLServer mailing list
> >> dba-SQLServer at databaseadvisors.com
> >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> >> http://www.databaseadvisors.com
> >>
> >>
> >>
> >> _______________________________________________
> >> dba-SQLServer mailing list
> >> dba-SQLServer at databaseadvisors.com
> >> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> >> http://www.databaseadvisors.com
> >>
> >>
> > _______________________________________________
> > dba-SQLServer mailing list
> > dba-SQLServer at databaseadvisors.com
> > http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> > http://www.databaseadvisors.com
> >
> >
> _______________________________________________
> dba-SQLServer mailing list
> dba-SQLServer at databaseadvisors.com
> http://databaseadvisors.com/mailman/listinfo/dba-sqlserver
> http://www.databaseadvisors.com
>
>



More information about the dba-SQLServer mailing list