显示标签为“network”的博文。显示所有博文
显示标签为“network”的博文。显示所有博文

2012年2月13日星期一

Any command list the tables in the Databsae

Please help. In my Enterprise Manager, there is some local database, some
other (is in another network)
IN SQL Analyzer , what command I can list out the tablelist for each
database'
ThanksSee:
http://groups-beta.google.com/group...1d?dmode=source
Anith|||check for stored procedure sp_tables in BOL
or u can make use of sysobjects table available in Master Database
best Regards,
Chandra
http://groups.msn.com/SQLResource/
http://chanduas.blogspot.com/
---
*** Sent via Developersdex http://www.examnotes.net ***|||You can use an undocumented sp (not recommended in production dbs) or declar
e
a cursor to traverse databases and execute stored procedure sp_tables in eac
h
db context.
use northwind
go
exec sp_msforeachdb 'select ''?''; use [?]; exec sp_tables @.table_type =
'''table''
go
declare @.sql nvarchar(4000)
declare @.db sysname
declare dbs_cursor cursor local fast_forward
for
select
catalog_name
from
information_schema.schemata
open dbs_cursor
while 1 = 1
begin
fetch next from dbs_cursor into @.db
if @.@.error != 0 or @.@.fetch_status != 0 break
select @.db
set @.sql = N'use ' + quotename(@.db) + N' exec sp_tables @.table_type =
'''table''
print @.sql
exec sp_executesql @.sql
end
close dbs_cursor
deallocate dbs_cursor
go
AMB
"Agnes" wrote:

> Please help. In my Enterprise Manager, there is some local database, some
> other (is in another network)
> IN SQL Analyzer , what command I can list out the tablelist for each
> database'
> Thanks
>
>

AntiVirus Software on SQL Server?

As a DBA, I was taught that running Anti-virus software on a database server
was not a very good thing to do. My network admin is planning a Windows 2000
migration and would like all machines across the domain to run AV software.
Can anyone tell me about their experience running AV software on their
database server, and whether this is a good idea or not.
The box runs SQL 6.5sp5a (soon to be 2k) and does not touch the outside
world at all.
Thanks for your help,
CurtisAs much as you may want to keep anti-virus software away
from a SQL box, you'll soon realize that that's a lost
battle. When there is a virus crisis, whatever arguments
you may have to avoid anti-virus on your SQL box, you'll
end being defeated badly.
My experience is to simply give up on avoiding virus scan
completely, and ask for the SQL files being excluded from
the virus scan. I typically ask the security folks to
exclude the following files from being scanned: *.MDF,
*.LDF, *.NDF, *.BAK, *.TRN, and *.BKP.
The primary reason you don't want anti-virus scanning is
that the virus scan software may get hold of a SQL
data/log file and prevents SQL Server from opening it,
resulting in the database being put into the suspect mode.
Usually, these data/log files are open all the time, and
therefore not an issue. But sometimes we may need to shut
down SQL Server instance or detach a database. Before we
restart SQL Server or attach the database, if the virus
software gets ahead of us, we are screwed.
There are also some issues with SQL Server running in a
cluster.
Check out: Q309422 and Q250355
Linchi
>--Original Message--
>As a DBA, I was taught that running Anti-virus software
on a database server
>was not a very good thing to do. My network admin is
planning a Windows 2000
>migration and would like all machines across the domain
to run AV software.
>Can anyone tell me about their experience running AV
software on their
>database server, and whether this is a good idea or not.
>The box runs SQL 6.5sp5a (soon to be 2k) and does not
touch the outside
>world at all.
>Thanks for your help,
>Curtis
>
>.
>