Showing posts with label build. Show all posts
Showing posts with label build. Show all posts

Tuesday, March 27, 2012

Enumerate SQL Server built-in functions

Hi

I am trying to build a tree similar to the one in SQL Server Management Studio for the system functions in the SQL language.

I would like to group them by type (e.g. string functions) and display information about the parameters and return types, etc.

Is there a way to get these programmatically? I would like to avoid typing them out by hand.

Thanks

Chris

Hi Chris,

I'm not sure this is the right forum for this question. You can retrieve this information from the sytem views. E.g.:

select

ob.name as func,

parms.name as parm,

parms.parameter_id as pid,

ty.name as type

from

sys.all_objects ob,

sys.all_parameters parms,

sys.types as ty

where

ob.type = 'FN'

and ob.object_id = parms.object_id

and parms.user_type_id = ty.user_type_id

You can tweak this to get exactly what you're looking for.

Cheers,

-Isaac

|||I guess he means the really builtin functions like CHARINDEX and so on. Otherwise I would have suggested him to use the INFORMATION_SCHEMA views to retrieve the data.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Jens

that's right. I do mean the really built-in functions.

Thanks anyway.

Chris

|||

I asked some of the gurus here. Alas, it looks like there really isn't a way to do this.

Sorry,

-Isaac

|||

Thanks anyway Isaac.

Chris

Enumerate SQL Server built-in functions

Hi

I am trying to build a tree similar to the one in SQL Server Management Studio for the system functions in the SQL language.

I would like to group them by type (e.g. string functions) and display information about the parameters and return types, etc.

Is there a way to get these programmatically? I would like to avoid typing them out by hand.

Thanks

Chris

Hi Chris,

I'm not sure this is the right forum for this question. You can retrieve this information from the sytem views. E.g.:

select

ob.name as func,

parms.name as parm,

parms.parameter_id as pid,

ty.name as type

from

sys.all_objects ob,

sys.all_parameters parms,

sys.types as ty

where

ob.type = 'FN'

and ob.object_id = parms.object_id

and parms.user_type_id = ty.user_type_id

You can tweak this to get exactly what you're looking for.

Cheers,

-Isaac

|||I guess he means the really builtin functions like CHARINDEX and so on. Otherwise I would have suggested him to use the INFORMATION_SCHEMA views to retrieve the data.

HTH; Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Jens

that's right. I do mean the really built-in functions.

Thanks anyway.

Chris

|||

I asked some of the gurus here. Alas, it looks like there really isn't a way to do this.

Sorry,

-Isaac

|||

Thanks anyway Isaac.

Chris

EnumAvailableSqlServers() fails to detect LOCAL installed instance when disconnected from networ

I am using EnumAvailableSqlServer to build the standard select Sql Server dialog with controls to select the server, instance and database. This all works fine - other than the well reported problem of detected multiple instances - however I have noticed that when disconnected from the network the call fails to even detect the locally installed sql servers.

What is the recommended method of determine whether an instance of sql server is installed locally. I can call Server->Databases, but this leads to a timeout / excpetion if no instances are detected which is slow. Is there a recommended registry key I can check that won't change between versions or another API I can try.

hx, Nick

Checking registry seems the simplest ...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

with InstalledInstances value.

Thx, Nick

EnumAvailableSqlServers() fails to detect LOCAL installed instance when disconnected from ne

I am using EnumAvailableSqlServer to build the standard select Sql Server dialog with controls to select the server, instance and database. This all works fine - other than the well reported problem of detected multiple instances - however I have noticed that when disconnected from the network the call fails to even detect the locally installed sql servers.

What is the recommended method of determine whether an instance of sql server is installed locally. I can call Server->Databases, but this leads to a timeout / excpetion if no instances are detected which is slow. Is there a recommended registry key I can check that won't change between versions or another API I can try.

hx, Nick

Checking registry seems the simplest ...

HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server

with InstalledInstances value.

Thx, Nick

Thursday, March 22, 2012

Enterprise Manager-like application

I wanted to build my own custom version of Enterprise Manager using vb.net.
Where can I get the icons/pictures that enterprise manager uses (eg the
icons used in the treeviews for database, table, user, stored procedure,
user-defined function etc)I wouldn't think that would be legal.
But you can always make your own.
<arch> wrote in message news:42f7ef77@.funnel.arach.net.au...
>I wanted to build my own custom version of Enterprise Manager using vb.net.
>Where can I get the icons/pictures that enterprise manager uses (eg the
>icons used in the treeviews for database, table, user, stored procedure,
>user-defined function etc)
>|||Shane,

>I wouldn't think that would be legal.
AFAIK is it in most countries illegal.
(Before somebody ask it, I don't know any country where it is legal).
Just my 2 eurocents
Cor|||Unless arch is planning on redistributing his custom app, I think that using
the icons on his own machine (very easy to create GIFs using a screen shot)
would come under fair use...
"Shane Story" <nospam@.nothanks.com> wrote in message
news:ehewDsHnFHA.1948@.TK2MSFTNGP12.phx.gbl...
>I wouldn't think that would be legal.
> But you can always make your own.
>
> <arch> wrote in message news:42f7ef77@.funnel.arach.net.au...
>|||You can go to download.com and find several shareware / freeware
applications for extracting icons from .exe and .dll files. Also worth
mentioning is that the sample applications that come with SQL Server include
a VB 6.0 project that uses DMO to create a simplistic Enterprise Manager
style application.
<arch> wrote in message news:42f7ef77@.funnel.arach.net.au...
>I wanted to build my own custom version of Enterprise Manager using vb.net.
>Where can I get the icons/pictures that enterprise manager uses (eg the
>icons used in the treeviews for database, table, user, stored procedure,
>user-defined function etc)
>|||Have you looked at the available alternatives?
http://www.aspfaq.com/show.asp?id=2442
At least one (myLittleAdmin) provides an API for further
customisations.
David Portas
SQL Server MVP
--sql