Is it possible to retrieve the resultset of a stored procedure from another procedure in sql server 2000.
Basically I am calling proc2 from the inside of proc1.
proc2 returns 2 resultsets. I want to process these two resultsets
from within proc1.
If its possible , please provide sample code.
thanks in advance,
Alok.Yes, with temporary tables for instance. But it will be easier if you can convert proc2 to two UDF table functions. Your code will be much clearer and simpler to maintain.
Showing posts with label inside. Show all posts
Showing posts with label inside. Show all posts
Tuesday, March 20, 2012
Wednesday, March 7, 2012
Process on Linked Server doesn't stop
Hello,
I have the same problem with Linked Server. I receive recordset from stored
procedure, which executes inside it stored procedure on the Linked Server. If
the application, that run stored procedure work successfully, then everything
is OK, but if there are some troubles (e.g. I close the parent application,
before I get recordset), I have the problem: the process on the Linked Server
doesn’t stop itself. It’s continuing executing for eternity and locks other
processes. The only way to stop it – is to kill it. I’ll try to set timeouts
in the configuration of my application
and Query Timeout in the Server Options of Linked Server, but it doesn’t
help. This problem shows itself only if I work through Linked Server.
Thanks for your help.
Boris.
Seems to me that if you were to close the application "unexpectedly", then
it leaves an orphaned transaction which probably would explain the
behaviour you are seeing. You might want to consider making some
application code changes that has some sort of logic on open transactions
from the client end, and to close them on an exit, or some such thing.
HTH!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
I have the same problem with Linked Server. I receive recordset from stored
procedure, which executes inside it stored procedure on the Linked Server. If
the application, that run stored procedure work successfully, then everything
is OK, but if there are some troubles (e.g. I close the parent application,
before I get recordset), I have the problem: the process on the Linked Server
doesn’t stop itself. It’s continuing executing for eternity and locks other
processes. The only way to stop it – is to kill it. I’ll try to set timeouts
in the configuration of my application
and Query Timeout in the Server Options of Linked Server, but it doesn’t
help. This problem shows itself only if I work through Linked Server.
Thanks for your help.
Boris.
Seems to me that if you were to close the application "unexpectedly", then
it leaves an orphaned transaction which probably would explain the
behaviour you are seeing. You might want to consider making some
application code changes that has some sort of logic on open transactions
from the client end, and to close them on an exit, or some such thing.
HTH!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Process on Linked Server doesn't stop
Hello,
I have the same problem with Linked Server. I receive recordset from stored
procedure, which executes inside it stored procedure on the Linked Server. If
the application, that run stored procedure work successfully, then everything
is OK, but if there are some troubles (e.g. I close the parent application,
before I get recordset), I have the problem: the process on the Linked Server
doesnâ't stop itself. Itâ's continuing executing for eternity and locks other
processes. The only way to stop it â' is to kill it. Iâ'll try to set timeouts
in the configuration of my application
and Query Timeout in the Server Options of Linked Server, but it doesnâ't
help. This problem shows itself only if I work through Linked Server.
Thanks for your help.
Boris.Seems to me that if you were to close the application "unexpectedly", then
it leaves an orphaned transaction which probably would explain the
behaviour you are seeing. You might want to consider making some
application code changes that has some sort of logic on open transactions
from the client end, and to close them on an exit, or some such thing.
HTH!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
I have the same problem with Linked Server. I receive recordset from stored
procedure, which executes inside it stored procedure on the Linked Server. If
the application, that run stored procedure work successfully, then everything
is OK, but if there are some troubles (e.g. I close the parent application,
before I get recordset), I have the problem: the process on the Linked Server
doesnâ't stop itself. Itâ's continuing executing for eternity and locks other
processes. The only way to stop it â' is to kill it. Iâ'll try to set timeouts
in the configuration of my application
and Query Timeout in the Server Options of Linked Server, but it doesnâ't
help. This problem shows itself only if I work through Linked Server.
Thanks for your help.
Boris.Seems to me that if you were to close the application "unexpectedly", then
it leaves an orphaned transaction which probably would explain the
behaviour you are seeing. You might want to consider making some
application code changes that has some sort of logic on open transactions
from the client end, and to close them on an exit, or some such thing.
HTH!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Process on Linked Server doesn't stop
Hello,
I have the same problem with Linked Server. I receive recordset from stored
procedure, which executes inside it stored procedure on the Linked Server. I
f
the application, that run stored procedure work successfully, then everythin
g
is OK, but if there are some troubles (e.g. I close the parent application,
before I get recordset), I have the problem: the process on the Linked Serve
r
doesn’t stop itself. It’s continuing executing for eternity and locks ot
her
processes. The only way to stop it – is to kill it. I’ll try to set time
outs
in the configuration of my application
and Query Timeout in the Server Options of Linked Server, but it doesn’t
help. This problem shows itself only if I work through Linked Server.
Thanks for your help.
Boris.Seems to me that if you were to close the application "unexpectedly", then
it leaves an orphaned transaction which probably would explain the
behaviour you are seeing. You might want to consider making some
application code changes that has some sort of logic on open transactions
from the client end, and to close them on an exit, or some such thing.
HTH!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
I have the same problem with Linked Server. I receive recordset from stored
procedure, which executes inside it stored procedure on the Linked Server. I
f
the application, that run stored procedure work successfully, then everythin
g
is OK, but if there are some troubles (e.g. I close the parent application,
before I get recordset), I have the problem: the process on the Linked Serve
r
doesn’t stop itself. It’s continuing executing for eternity and locks ot
her
processes. The only way to stop it – is to kill it. I’ll try to set time
outs
in the configuration of my application
and Query Timeout in the Server Options of Linked Server, but it doesn’t
help. This problem shows itself only if I work through Linked Server.
Thanks for your help.
Boris.Seems to me that if you were to close the application "unexpectedly", then
it leaves an orphaned transaction which probably would explain the
behaviour you are seeing. You might want to consider making some
application code changes that has some sort of logic on open transactions
from the client end, and to close them on an exit, or some such thing.
HTH!
Vikram Jayaram
Microsoft, SQL Server
This posting is provided "AS IS" with no warranties, and confers no rights.
Subscribe to MSDN & use http://msdn.microsoft.com/newsgroups.
Monday, February 20, 2012
procedures inside a package
I have 48 procedures sitting in a PL/SQL package. when I execute the package I have to select one procedure at a time to get it executed. What could I do to execute the package once and get all the procedures executed at the same time sequencially.A package is just a bag of routines and stuff, somewhat like a library. You cannot execute a package, only the procedures within it.
You need to write another procedure, or anonymous PL/SQL block, like this:
BEGIN
pkg.proc1;
pkg.proc2;
...
pkg.proc48;
END;
/|||Thank you very much
You need to write another procedure, or anonymous PL/SQL block, like this:
BEGIN
pkg.proc1;
pkg.proc2;
...
pkg.proc48;
END;
/|||Thank you very much
Subscribe to:
Posts (Atom)