| Author |
Database Owner and Name
|
|
|
| Hello,
Can anyone tell me how to retrieve the database name (the actual name of
it on the server) and the owner name for Sybase SQL Server? I am using an
ODBC connection.
Thanks,
Stacy
| |
| Mark A. Parsons 2005-04-28, 8:26 pm |
| To get the name of the dataserver (if it's been defined):
select @@servername
To get a list of databases and their owners:
sp_helpdb
If you're already using/in a database:
select db_name() -- get current database name
sp_helpuser dbo -- find out who owns the database
-- owner will be aliased to 'dbo'
Stacy wrote:
> Hello,
>
> Can anyone tell me how to retrieve the database name (the actual name of
> it on the server) and the owner name for Sybase SQL Server? I am using an
> ODBC connection.
>
> Thanks,
> Stacy
| |
|
| Will the
select db_name()
work for all types of database users? (i.e. with all types of permissions?)
Thanks for all your help!
Take care,
Stacy
"Mark A. Parsons" <iron_horse@no_spam.compuserve.com> wrote in message
news:42714DD1.D799C0E2@no_spam.compuserve.com...
> To get the name of the dataserver (if it's been defined):
>
> select @@servername
>
> To get a list of databases and their owners:
>
> sp_helpdb
>
> If you're already using/in a database:
>
> select db_name() -- get current database name
>
> sp_helpuser dbo -- find out who owns the database
> -- owner will be aliased to 'dbo'
>
> Stacy wrote:
>
name of[color=darkred]
an[color=darkred]
>
| |
| Jeffrey R. Garbus 2005-04-29, 11:26 am |
| Yes, everybody can run that function.
"Stacy" <sdudas@lynchval.com> wrote in message
news:427234d8$3@foru
ms-1-dub...
> Will the
> select db_name()
> work for all types of database users? (i.e. with all types of
permissions?)
>
> Thanks for all your help!
>
> Take care,
> Stacy
>
>
> "Mark A. Parsons" <iron_horse@no_spam.compuserve.com> wrote in message
> news:42714DD1.D799C0E2@no_spam.compuserve.com...
> name of
using[color=darkred]
> an
>
>
|
|
|
|