I am using the MS SQL Server Management Studio Express to create a stored procedure in one of my databases. I specify one of the parameters as OUTPUT as follows:
set ANSI_NULLS ON
set QUOTED_IDENTIFIER ON
GO
ALTER PROCEDURE [dbo].[ProcRetDbl]
@.Threshold real, @.Result real OUTPUT
AS
BEGIN
SET NOCOUNT ON;
SELECT @.Result = Channel1 FROM DataTable WHERE Channel2 < @.Threshold
END
But then when I look at the properties of the @.Result parameter in the Object Explorer's tree, it is shown as "Input/Output". Now, this seems like no problem at all since it will work fine as output, even though I don't need it to be able to do input as well, but I'm wondering why that is happening.
I am using ADO.Net on the other end to execute the procedure and I need to decide what parameter type to set to the SqlParameter object: "Output" or "InputOutput". I'm sure I can sort this out but I usually like to know what I'm doing. Thanks for the help.
KamenYou are probably thinking too hard :)
You need to supply a parameter in to give you something to read when the value comes out. I can't remember what I use for sqlParameters - probably inputoutput. Try both - what have you got to lose?|||The only pure output from a stored procedure is the return code value and any result sets. Procedure parameters must be input, and can optionally be output too.
-PatP
Showing posts with label direction. Show all posts
Showing posts with label direction. Show all posts
Monday, March 26, 2012
Wednesday, March 7, 2012
PAGEIOLATCH WAIT
Can someone help me understand the various causes of
pageio latch waits or point me in the direction of a good
resource on this subject (BOL info is not detailed
enough)? There are no other users on the system - and my
process is experiencing pageio latch waits. I'm guessing
that this issue is related to the disk subsystem, but
don't know for sure.superboy, you are right most times I have experienced pageiolatch issues hav
e been disk sub-system driver issues,
raid controller issue and usually anything related to H/W(disk) configuratio
n/problems|||See http://SQLDev.Net/misc/waittypes.htm
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"superboy" <anonymous@.discussions.microsoft.com> wrote in message
news:d5b601c3ef20$380b9160$a601280a@.phx.gbl...
> Can someone help me understand the various causes of
> pageio latch waits or point me in the direction of a good
> resource on this subject (BOL info is not detailed
> enough)? There are no other users on the system - and my
> process is experiencing pageio latch waits. I'm guessing
> that this issue is related to the disk subsystem, but
> don't know for sure.
pageio latch waits or point me in the direction of a good
resource on this subject (BOL info is not detailed
enough)? There are no other users on the system - and my
process is experiencing pageio latch waits. I'm guessing
that this issue is related to the disk subsystem, but
don't know for sure.superboy, you are right most times I have experienced pageiolatch issues hav
e been disk sub-system driver issues,
raid controller issue and usually anything related to H/W(disk) configuratio
n/problems|||See http://SQLDev.Net/misc/waittypes.htm
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright SQLDev.Net 1991-2004 All rights reserved.
"superboy" <anonymous@.discussions.microsoft.com> wrote in message
news:d5b601c3ef20$380b9160$a601280a@.phx.gbl...
> Can someone help me understand the various causes of
> pageio latch waits or point me in the direction of a good
> resource on this subject (BOL info is not detailed
> enough)? There are no other users on the system - and my
> process is experiencing pageio latch waits. I'm guessing
> that this issue is related to the disk subsystem, but
> don't know for sure.
PAGEIOLATCH WAIT
Can someone help me understand the various causes of
pageio latch waits or point me in the direction of a good
resource on this subject (BOL info is not detailed
enough)? There are no other users on the system - and my
process is experiencing pageio latch waits. I'm guessing
that this issue is related to the disk subsystem, but
don't know for sure.superboy, you are right most times I have experienced pageiolatch issues have been disk sub-system driver issues
raid controller issue and usually anything related to H/W(disk) configuration/problems|||See http://SQLDev.Net/misc/waittypes.htm
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2004 All rights reserved.
"superboy" <anonymous@.discussions.microsoft.com> wrote in message
news:d5b601c3ef20$380b9160$a601280a@.phx.gbl...
> Can someone help me understand the various causes of
> pageio latch waits or point me in the direction of a good
> resource on this subject (BOL info is not detailed
> enough)? There are no other users on the system - and my
> process is experiencing pageio latch waits. I'm guessing
> that this issue is related to the disk subsystem, but
> don't know for sure.
pageio latch waits or point me in the direction of a good
resource on this subject (BOL info is not detailed
enough)? There are no other users on the system - and my
process is experiencing pageio latch waits. I'm guessing
that this issue is related to the disk subsystem, but
don't know for sure.superboy, you are right most times I have experienced pageiolatch issues have been disk sub-system driver issues
raid controller issue and usually anything related to H/W(disk) configuration/problems|||See http://SQLDev.Net/misc/waittypes.htm
GertD@.SQLDev.Net
Please reply only to the newsgroups.
This posting is provided "AS IS" with no warranties, and confers no rights.
You assume all risk for your use.
Copyright © SQLDev.Net 1991-2004 All rights reserved.
"superboy" <anonymous@.discussions.microsoft.com> wrote in message
news:d5b601c3ef20$380b9160$a601280a@.phx.gbl...
> Can someone help me understand the various causes of
> pageio latch waits or point me in the direction of a good
> resource on this subject (BOL info is not detailed
> enough)? There are no other users on the system - and my
> process is experiencing pageio latch waits. I'm guessing
> that this issue is related to the disk subsystem, but
> don't know for sure.
Pageiolatch
Can anybody point me in the direction of some information on pageiolatch's?
Can't seem to find much info on them.
thanks
GavThere's not much public info on them right now. MS is working on a white
paper that describes this in more detail.
This type of latch indicates a wait on disk to memory transfers. You can
find out what object is being waited on by looking at the waitresource
column in master..sysprocesses. You'll need to use the dbcc page command to
figure out what the actual object is. The value in waitresource will be of a
format like this:
1:1:140
That's DBID:FileID:PageId.
I don't have the dbcc page command docs handy but you should be able to
google it easy enough.
DBCC PAGE will allow you to figure out what objectId owns the page so you'll
know which object was waiting on the pageiolatch to complete.
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Gav" <gavin.metcalfe@.portakabinnospam.com> wrote in message
news:bpcsdp$6k9$1@.sparta.btinternet.com...
> Can anybody point me in the direction of some information on
pageiolatch's?
> Can't seem to find much info on them.
> thanks
> Gav
>
Can't seem to find much info on them.
thanks
GavThere's not much public info on them right now. MS is working on a white
paper that describes this in more detail.
This type of latch indicates a wait on disk to memory transfers. You can
find out what object is being waited on by looking at the waitresource
column in master..sysprocesses. You'll need to use the dbcc page command to
figure out what the actual object is. The value in waitresource will be of a
format like this:
1:1:140
That's DBID:FileID:PageId.
I don't have the dbcc page command docs handy but you should be able to
google it easy enough.
DBCC PAGE will allow you to figure out what objectId owns the page so you'll
know which object was waiting on the pageiolatch to complete.
--
Brian Moran
Principal Mentor
Solid Quality Learning
SQL Server MVP
http://www.solidqualitylearning.com
"Gav" <gavin.metcalfe@.portakabinnospam.com> wrote in message
news:bpcsdp$6k9$1@.sparta.btinternet.com...
> Can anybody point me in the direction of some information on
pageiolatch's?
> Can't seem to find much info on them.
> thanks
> Gav
>
Subscribe to:
Posts (Atom)