Showing posts with label generating. Show all posts
Showing posts with label generating. Show all posts

Friday, March 23, 2012

Listing Size of all user Databases in SQL2005

Can anyone please tell me of a way of generating a list of all user databases and their size with one command or view?

Thanks,

Refer to Books Online, Topic: sys.database_files

This will return the size as the number of 8K pages, so do the math in your query.

|||sp_helpdb will generate info about the dbname and size|||

select * from sys.master_files

Will also give you useful information.

Listing Size of all user Databases in SQL2005

Can anyone please tell me of a way of generating a list of all user databases and their size with one command or view?

Thanks,

Refer to Books Online, Topic: sys.database_files

This will return the size as the number of 8K pages, so do the math in your query.

|||sp_helpdb will generate info about the dbname and size|||

select * from sys.master_files

Will also give you useful information.

Friday, March 9, 2012

List of running stored procedures

Is there any way of generating a list of running stored procedures?
Thanks, Jim
Hi Jim
I assume you mean currently being run, or do you mean are accessed by an
application? You could get a list by running profiler for a (long) time but
this may not be a complete one.
John
"Jim" wrote:

> Is there any way of generating a list of running stored procedures?
> --
> Thanks, Jim
|||John,
We have a lot of procedures that run in batch and some tend to run over 8
hours. I am trying to get a list of what is still running so we can monotor
it.
Thanks, Jim
"John Bell" wrote:
[vbcol=seagreen]
> Hi Jim
> I assume you mean currently being run, or do you mean are accessed by an
> application? You could get a list by running profiler for a (long) time but
> this may not be a complete one.
> John
> "Jim" wrote:
|||Hi
Profiler would show you the SQL being sent to your server and DBCC
INPUTBUFFER may give you the last command for a given SPID.
John
"Jim" wrote:
[vbcol=seagreen]
> John,
> We have a lot of procedures that run in batch and some tend to run over 8
> hours. I am trying to get a list of what is still running so we can monotor
> it.
> --
> Thanks, Jim
>
> "John Bell" wrote:
|||thanks, I'll check it out.
Thanks, Jim
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Profiler would show you the SQL being sent to your server and DBCC
> INPUTBUFFER may give you the last command for a given SPID.
> John
> "Jim" wrote:
|||Jim wrote:
> John,
> We have a lot of procedures that run in batch and some tend to run over 8
> hours. I am trying to get a list of what is still running so we can monotor
> it.
Can you get what you need by querying the sysprocesses table?
Tracy McKibben
MCDBA
http://www.realsqlguy.com
|||Hi Tracy
sysprocesses only returns nchar(16) for the cmd, DBCC INPUTBUFFER returns
nvarchar(255) for eventinfo.
John
"Tracy McKibben" wrote:

> Jim wrote:
> Can you get what you need by querying the sysprocesses table?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>
|||John Bell wrote:
> Hi Tracy
> sysprocesses only returns nchar(16) for the cmd, DBCC INPUTBUFFER returns
> nvarchar(255) for eventinfo.
>
Yes, I know, I was asking the OP if he could get his SPIDs from
sysprocesses as opposed to Profiler...
Tracy McKibben
MCDBA
http://www.realsqlguy.com

List of running stored procedures

Is there any way of generating a list of running stored procedures?
--
Thanks, JimHi Jim
I assume you mean currently being run, or do you mean are accessed by an
application? You could get a list by running profiler for a (long) time but
this may not be a complete one.
John
"Jim" wrote:

> Is there any way of generating a list of running stored procedures?
> --
> Thanks, Jim|||John,
We have a lot of procedures that run in batch and some tend to run over 8
hours. I am trying to get a list of what is still running so we can monotor
it.
--
Thanks, Jim
"John Bell" wrote:
[vbcol=seagreen]
> Hi Jim
> I assume you mean currently being run, or do you mean are accessed by an
> application? You could get a list by running profiler for a (long) time bu
t
> this may not be a complete one.
> John
> "Jim" wrote:
>|||Hi
Profiler would show you the SQL being sent to your server and DBCC
INPUTBUFFER may give you the last command for a given SPID.
John
"Jim" wrote:
[vbcol=seagreen]
> John,
> We have a lot of procedures that run in batch and some tend to run over 8
> hours. I am trying to get a list of what is still running so we can monoto
r
> it.
> --
> Thanks, Jim
>
> "John Bell" wrote:
>|||thanks, I'll check it out.
--
Thanks, Jim
"John Bell" wrote:
[vbcol=seagreen]
> Hi
> Profiler would show you the SQL being sent to your server and DBCC
> INPUTBUFFER may give you the last command for a given SPID.
> John
> "Jim" wrote:
>|||Jim wrote:
> John,
> We have a lot of procedures that run in batch and some tend to run over 8
> hours. I am trying to get a list of what is still running so we can monoto
r
> it.
Can you get what you need by querying the sysprocesses table?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Hi Tracy
sysprocesses only returns nchar(16) for the cmd, DBCC INPUTBUFFER returns
nvarchar(255) for eventinfo.
John
"Tracy McKibben" wrote:

> Jim wrote:
> Can you get what you need by querying the sysprocesses table?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||John Bell wrote:
> Hi Tracy
> sysprocesses only returns nchar(16) for the cmd, DBCC INPUTBUFFER returns
> nvarchar(255) for eventinfo.
>
Yes, I know, I was asking the OP if he could get his SPIDs from
sysprocesses as opposed to Profiler...
Tracy McKibben
MCDBA
http://www.realsqlguy.com

List of running stored procedures

Is there any way of generating a list of running stored procedures?
--
Thanks, JimHi Jim
I assume you mean currently being run, or do you mean are accessed by an
application? You could get a list by running profiler for a (long) time but
this may not be a complete one.
John
"Jim" wrote:
> Is there any way of generating a list of running stored procedures?
> --
> Thanks, Jim|||John,
We have a lot of procedures that run in batch and some tend to run over 8
hours. I am trying to get a list of what is still running so we can monotor
it.
--
Thanks, Jim
"John Bell" wrote:
> Hi Jim
> I assume you mean currently being run, or do you mean are accessed by an
> application? You could get a list by running profiler for a (long) time but
> this may not be a complete one.
> John
> "Jim" wrote:
> > Is there any way of generating a list of running stored procedures?
> > --
> > Thanks, Jim|||Hi
Profiler would show you the SQL being sent to your server and DBCC
INPUTBUFFER may give you the last command for a given SPID.
John
"Jim" wrote:
> John,
> We have a lot of procedures that run in batch and some tend to run over 8
> hours. I am trying to get a list of what is still running so we can monotor
> it.
> --
> Thanks, Jim
>
> "John Bell" wrote:
> > Hi Jim
> >
> > I assume you mean currently being run, or do you mean are accessed by an
> > application? You could get a list by running profiler for a (long) time but
> > this may not be a complete one.
> >
> > John
> >
> > "Jim" wrote:
> >
> > > Is there any way of generating a list of running stored procedures?
> > > --
> > > Thanks, Jim|||thanks, I'll check it out.
--
Thanks, Jim
"John Bell" wrote:
> Hi
> Profiler would show you the SQL being sent to your server and DBCC
> INPUTBUFFER may give you the last command for a given SPID.
> John
> "Jim" wrote:
> > John,
> >
> > We have a lot of procedures that run in batch and some tend to run over 8
> > hours. I am trying to get a list of what is still running so we can monotor
> > it.
> > --
> > Thanks, Jim
> >
> >
> > "John Bell" wrote:
> >
> > > Hi Jim
> > >
> > > I assume you mean currently being run, or do you mean are accessed by an
> > > application? You could get a list by running profiler for a (long) time but
> > > this may not be a complete one.
> > >
> > > John
> > >
> > > "Jim" wrote:
> > >
> > > > Is there any way of generating a list of running stored procedures?
> > > > --
> > > > Thanks, Jim|||Jim wrote:
> John,
> We have a lot of procedures that run in batch and some tend to run over 8
> hours. I am trying to get a list of what is still running so we can monotor
> it.
Can you get what you need by querying the sysprocesses table?
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||Hi Tracy
sysprocesses only returns nchar(16) for the cmd, DBCC INPUTBUFFER returns
nvarchar(255) for eventinfo.
John
"Tracy McKibben" wrote:
> Jim wrote:
> > John,
> >
> > We have a lot of procedures that run in batch and some tend to run over 8
> > hours. I am trying to get a list of what is still running so we can monotor
> > it.
> Can you get what you need by querying the sysprocesses table?
>
> --
> Tracy McKibben
> MCDBA
> http://www.realsqlguy.com
>|||John Bell wrote:
> Hi Tracy
> sysprocesses only returns nchar(16) for the cmd, DBCC INPUTBUFFER returns
> nvarchar(255) for eventinfo.
>
Yes, I know, I was asking the OP if he could get his SPIDs from
sysprocesses as opposed to Profiler...
Tracy McKibben
MCDBA
http://www.realsqlguy.com