Showing posts with label inthe. Show all posts
Showing posts with label inthe. Show all posts

Monday, March 19, 2012

Displaying the table owner

Hi,
How can I display the table owner and the table name in
the form of 'tableowner.tablename' from the 'sysobjects'
table. Another words, I want to add the table
owner 'sqlapp' to the table names in my select query.
Thanks for help.You'd be better off using information_Schema views.. try this
select table_schema + '.' + table_name from information_Schema.tables
where table_type = 'base table'
"Rick" <anonymous@.discussions.microsoft.com> wrote in message
news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
quote:

> Hi,
> How can I display the table owner and the table name in
> the form of 'tableowner.tablename' from the 'sysobjects'
> table. Another words, I want to add the table
> owner 'sqlapp' to the table names in my select query.
> Thanks for help.
|||I found it Thanks...This was what I needed...
select 'sqlapp.' + name from sysobjects
where xtype = 'U' and name <> 'dt_properties'
quote:

>--Original Message--
>You'd be better off using information_Schema views.. try

this
quote:

>select table_schema + '.' + table_name from

information_Schema.tables
quote:

>where table_type = 'base table'
>"Rick" <anonymous@.discussions.microsoft.com> wrote in

message
quote:

>news:89e501c3e9be$3a804a10$a001280a@.phx.gbl...
>
>.
>

Sunday, February 19, 2012

Display obsolete database names in restore panel

There are still a few obsolete databases showing in the SQL restore panel in
the field "Show backups of database".
Properly when someone drop the obsolete databases without selecting "delete
backup history".
How can I get rid of the database names in the backup history ?
SQL : SQL Server 2000/SP3a
Hi
Do you want to delete the backup history for a specific database? Then use:
EXECUTE msdb.dbo.sp_delete_database_backuphistory N'Test'
John
"Johnny" wrote:

> There are still a few obsolete databases showing in the SQL restore panel in
> the field "Show backups of database".
> Properly when someone drop the obsolete databases without selecting "delete
> backup history".
> How can I get rid of the database names in the backup history ?
> SQL : SQL Server 2000/SP3a

Friday, February 17, 2012

Display obsolete database names in restore panel

There are still a few obsolete databases showing in the SQL restore panel in
the field "Show backups of database".
Properly when someone drop the obsolete databases without selecting "delete
backup history".
How can I get rid of the database names in the backup history ?
SQL : SQL Server 2000/SP3aHi
Do you want to delete the backup history for a specific database? Then use:
EXECUTE msdb.dbo.sp_delete_database_backuphistory N'Test'
John
"Johnny" wrote:

> There are still a few obsolete databases showing in the SQL restore panel
in
> the field "Show backups of database".
> Properly when someone drop the obsolete databases without selecting "delet
e
> backup history".
> How can I get rid of the database names in the backup history ?
> SQL : SQL Server 2000/SP3a