Semaphores on SQL-database: stored procedure mc_chk_sema_timeout
Hi there!
We do run this environment:
Microsoft Server 2008 R2
Microsoft SQL server /2008 R2 / driver 10.50.4000
Identity-Management 7.2, SP6 Patch 1
We`re discovered a (strange?) behavior in our SQL-database cache.
As we look to the top most executions per minute,the IdM stored procedure "mx_chk_sema_timeout" gets the highscore (is the number one procedure that hast most cpu, time, reads, and so on)... It is executed 161 (in average) per minute.
This is executed this often:
USE [db]
GO
/****** Object: StoredProcedure [dbo].[mc_chk_sema_timeout] Script Date: 13.01.2015 13:37:24 ******/
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[mc_chk_sema_timeout]
@Ptimeout int,
@Status as int OUTPUT,
@Statustext as varchar(256) OUTPUT
AS
Declare @Lrowcount int
Declare @Lbuf varchar(256)
-- LOCK
EXEC sp_getapplock 'mc_chk_sema_timeout','Exclusive','session'
delete from mc_semaphore where (DATEADD(s, @Ptimeout, Sematime)<getdate());
select @Status = @@ERROR, @Lrowcount = @@ROWCOUNT
-- UNLOCK
EXEC sp_releaseapplock 'mc_chk_sema_timeout','session'
IF @Status = 0
BEGIN
set @Statustext = 'OK'
IF @Lrowcount > 0
BEGIN
set @Lbuf = convert(varchar,@Lrowcount) + ' stale semaphores released'
execute mc_write_syslog @Lbuf,'',1,'',0
END
END
ELSE
BEGIN
set @Statustext = 'Unable to release staled semaphore';
END
GO
My questions:
1. Is this maybe a normal behavior (seen on DB time and execution) and we should not be worried?
If not, what can we do to lower the executions per minute?
I did some searchs:
The table mc_semaphore shows no special behavior. Looks good for me: Some (1-6 semaphore go in, 1-6 leave immediately). I had expected, that this table would maybe be overflowed. But it wasnt...
I also read this SCN entry of Per Krabsetsve (at the end of the entry): Dispatchers Deadlock Issue
He talks (in case of a about contacting the SAP-Support in order to get a different (altered?) procedure of "mc_chk_sema_timeout".
2. Maybe this would be a solution?
3. Are there any further suggestions/experiences you can give us?
Thank you for your replies!
Michael
If I recall correctly... The check sema timeout is called by the dispatcher(s) every check interval, so if you have 2 dispatchers checking every 5 seconds you'll have about 24 checks a minute. Which makes little sense considering the timeout is 300 seconds.
The updated procedures that you refer to changes the behaviour of the semaphore handling from deleting the rows to just continously updating them with dispatcherId/timestamps. This was part of a patch or SP at some point. This reduces the number of locks used in the semaphor handling procedures and the size of the transactions. I believe there was also added a check to see if there were any expired semaphores first before running the delete, which also helps the system a bit. Not sure if those updated procedures are handed out any longer, but you should check.
Br,
Chris
Similar Messages
-
I have used a tool to convert my sql 2000 stored procedure to Oracle 10g PL/SQL, here is an example
SQL 2000 Stored Procedure
CREATE PROCEDURE [GetEmployees]
AS
Select * from EMPMST ORDER BY emp_name
GO
After Transformation i got 2 files, one was a procedure and other a package
CREATE OR REPLACE PACKAGE GLOBALPKG
AS
TYPE RCT1 IS REF CURSOR;
TRANCOUNT INTEGER := 0;
IDENTITY INTEGER;
END;
CREATE OR REPLACE PROCEDURE GetEmployees
RCT1 IN OUT GLOBALPKG.RCT1
AS
BEGIN
OPEN RCT1 FOR
SELECT *
FROM EMPMST
ORDER BY emp_name;
END;
When i execute the procedure GetEmployees i got this error :
SQL> execute GetEmployees;
BEGIN GetEmployees; END;
ERROR at line 1:
ORA-06550: line 1, column 7:
PLS-00306: wrong number or types of arguments in call to 'GETEMPLOYEES'
ORA-06550: line 1, column 7:
PL/SQL: Statement ignored
Please Help me in debugging this error. Thanks in advance.As the poster above mentioned you cannot call "GetEmployees" without a parameter.
Note that the procedure declaration has the following line
RCT1 IN OUT GLOBALPKG.RCT1
This means that whenever you want to call the procedure you must pass it a variable of type GLOBALPKG.RCT1
However unless this is merely a homework or learning exercise (i.e. you are not porting the code of a production application) i would strongly recommend that you do not attempt to simply convert the code to PL/SQL.
The reasoning behind this is that Oracle's architecture will be completely different to the source of the original code and if you attempt to simply port the code (especially using an automatic tool) you will almost certainly hit problems.
For example the SQL Server's 2000 code may (should be) be written based on SQL Server's locking strategy. Oracle's locking strategy is completly different if you try to use the same techniques as you do in SQL Server the performance will suffer.
Porting a code or a database schema from one platform to another involves a lot of analysis in order to take advantage of the features of the destination platform.
As I said this may not be important to you depending on why you are attempting a port.
Good Luck. -
How to call a sql server stored procedure from oracle
Hi all,
Please anybody tell me how to call a sql server stored procedure from oracle.
I've made an hsodbc connection and i can do insert, update, fetch data in sql server from oracle. But calling SP gives error. when I tried an SP at oracle that has line like
"dbo"."CreateReceipt"@hsa
where CreateReceipt is the SP of sql server and hsa is the DSN, it gives the error that "dbo"."CreateReceipt" should be declared.
my database version is 10g
Please help me how can i call it... I need to pass some parameters too to the SP
thanking youhi,
thank you for the response.
when i call the sp using DBMS_HS_PASSTHROUGH, without parameters it works successfully, but with parameters it gives the following error
ORA-28500: connection from ORACLE to a non-Oracle system returned this message:
[Generic Connectivity Using ODBC][Microsoft][ODBC SQL Server Driver]Invalid parameter number[Microsoft][ODBC SQL Server Driver]Invalid Descriptor Index (SQL State: S1093; SQL Code: 0)
my code is,
declare
c INTEGER;
nr INTEGER;
begin
c := DBMS_HS_PASSTHROUGH.OPEN_CURSOR@hsa;
DBMS_HS_PASSTHROUGH.PARSE@hsa(c, 'Create_Receipt(?,?)');
DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,1,'abc');
DBMS_HS_PASSTHROUGH.BIND_VARIABLE@hsa(c,2,'xyz');
nr:=DBMS_HS_PASSTHROUGH.EXECUTE_NON_QUERY@hsa(c);
DBMS_HS_PASSTHROUGH.CLOSE_CURSOR@hsa(c);
end;
Create_Receipt is the sp which requires two parameters.
please give me a solution
thanking you
sreejith -
Can a SQL Server stored procedure call an SAP function module?
Can a SQL Server stored procedure call an SAP function module.? The stored procedure will be called via a trigger when data records are added to a Z table.
You have two options:
- the other software can use the RFC SDK and call directly in the system
- the other software can use a database connect
Markus -
Converting SQL Server Stored Procedure to Oracle
Hi there,
I tried to use SwisSQL to convert my SQL Server stored procedure to Orcale without much success.
Is there anyone who could help me out with this?
My SQL Server Stored Procedure is:
CREATE PROCEDURE [dbo].[SP_BackgroundCheckRequest]
--MASTER Table
@MASTER_ID int,
@PERSONNEL_ID int = NULL,
@DATE_OF_BIRTH datetime = NULL,
@GENDER varchar(1) = NULL,
@COUNTRY_OF_BIRTH varchar(3) = NULL,
@TOWN_OF_BIRTH varchar(100) = NULL,
@STATE_OF_BIRTH varchar(50) = NULL,
@CHECK_CATEGORY varchar(10) = NULL,
@CHECK_TYPE varchar(10) = NULL,
@PRIORITY varchar(10) = NULL,
@PRIORITY_REASON varchar(100) = NULL,
@SCREENING_LEVEL nchar(1) = NULL,
@POSITION nchar(50) = NULL,
@REQUEST_SOURCE varchar(60) = NULL,
--NAME_TYPE Table
@NAME_TYPE varchar(5) = NULL,
@FAMILY_NAME varchar(50) = NULL,
@FIRST_NAME varchar(50) = NULL,
@MIDDLE_NAME varchar(50) = NULL,
@TITLE varchar(10) = NULL,
@PREFFERED_NAME varchar(40) = NULL,
@PREVIOUS_NAME varchar(140) = NULL,
--ADDRESS_TYPE Table
@ADDRESS_TYPE varchar(10) = NULL,
@ADDRESS_LINE_1 varchar(30) = NULL,
@ADDRESS_LINE_2 varchar(30) = NULL,
@ADDRESS_LINE_3 varchar(30) = NULL,
@COUNTRY varchar(3) = NULL,
@SUBURB varchar(50) = NULL,
@STATE varchar(50) = NULL,
@POSTCODE varchar(15) = NULL,
@START_DATE varchar(10) = NULL,
@END_DATE varchar(10) = NULL,
--LICENSE_TYPE Table
@LICENSE_TYPE varchar(5) = NULL,
@LICENSE_AGENCY varchar(15) = NULL,
@LICENSE_NUMBER varchar(100) = NULL,
@LICENSE_SIGHTED varchar(1) = NULL,
--PHONE_TYPE Table
@TELEPHONE_TYPE varchar(5) = NULL,
@TELEPHONE_NUMBER varchar(20) = NULL,
@MOBILE_TYPE varchar(5) = NULL,
@MOBILE_NUMBER varchar(20) = NULL,
@EXTENSION_TYPE varchar(5) = NULL,
@EXTENSION_NUMBER varchar(20) = NULL,
--PASSPORT_TYPE Table
@PASSPORT_TYPE varchar(5) = NULL,
@PASSPORT_NUMBER varchar(50) = NULL,
@PASSPORT_COUNTRY varchar(3) = NULL,
@PASSPORT_SIGHTED varchar(1) = NULL
AS
BEGIN TRANSACTION
INSERT into MASTER (MASTER_ID, PERSONNEL_ID, DATE_OF_BIRTH, GENDER, COUNTRY_OF_BIRTH,
TOWN_OF_BIRTH, STATE_OF_BIRTH, CHECK_CATEGORY, CHECK_TYPE, PRIORITY, PRIORITY_REASON,
SCREENING_LEVEL, POSITION, REQUEST_SOURCE)
VALUES (@MASTER_ID, @PERSONNEL_ID, @DATE_OF_BIRTH, @GENDER, @COUNTRY_OF_BIRTH,
@TOWN_OF_BIRTH, @STATE_OF_BIRTH, @CHECK_CATEGORY, @CHECK_TYPE, @PRIORITY, @PRIORITY_REASON,
@SCREENING_LEVEL, @POSITION, @REQUEST_SOURCE)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting values into MASTER table!', 16, 1)
RETURN
END
INSERT into NAME_TYPE (MASTER_ID,NAME_TYPE,FAMILY_NAME,FIRST_NAME,MIDDLE_NAME,TITLE)
VALUES (@MASTER_ID,@NAME_TYPE,@FAMILY_NAME,@FIRST_NAME,@MIDDLE_NAME,@TITLE)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting values into NAME_TYPE table!', 16, 1)
RETURN
END
INSERT into ADDRESS_TYPE (MASTER_ID,TYPE,ADDRESS_LINE_1,ADDRESS_LINE_2,ADDRESS_LINE_3,
COUNTRY,SUBURB,STATE,POSTCODE,START_DATE,END_DATE)
VALUES (@MASTER_ID,@ADDRESS_TYPE,@ADDRESS_LINE_1,@ADDRESS_LINE_2,@ADDRESS_LINE_3,
@COUNTRY,@SUBURB,@STATE,@POSTCODE,@START_DATE,@END_DATE)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting values into ADDRESS_TYPE table!', 16, 1)
RETURN
END
INSERT into LICENSE_TYPE (MASTER_ID,TYPE,AGENCY,NUMBER,SIGHTED_YN)
VALUES (@MASTER_ID,@LICENSE_TYPE,@LICENSE_AGENCY,@LICENSE_NUMBER,@LICENSE_SIGHTED)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting values into LICENSE_TYPE table!', 16, 1)
RETURN
END
INSERT into PHONE_TYPE (MASTER_ID,TYPE,NUMBER)
VALUES (@MASTER_ID,@TELEPHONE_TYPE,@TELEPHONE_NUMBER)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting Telephone number into PHONE_TYPE table!', 16, 1)
RETURN
END
IF ((@MOBILE_TYPE <> NULL) AND (@MOBILE_NUMBER <> NULL))
BEGIN
INSERT into PHONE_TYPE (MASTER_ID,TYPE,NUMBER)
VALUES (@MASTER_ID,@MOBILE_TYPE,@MOBILE_NUMBER)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting Mobile number into PHONE_TYPE table!', 16, 1)
RETURN
END
END
IF ((@EXTENSION_TYPE <> NULL) AND (@EXTENSION_NUMBER <> NULL))
BEGIN
INSERT into PHONE_TYPE (MASTER_ID,TYPE,NUMBER)
VALUES (@MASTER_ID,@EXTENSION_TYPE,@EXTENSION_NUMBER)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting Extension number into PHONE_TYPE table!', 16, 1)
RETURN
END
END
INSERT into PASSPORT_TYPE (MASTER_ID,NUMBER,COUNTRY,SIGHTED_YN)
VALUES (@MASTER_ID,@PASSPORT_NUMBER,@PASSPORT_COUNTRY,@PASSPORT_SIGHTED)
IF @@ERROR <> 0
BEGIN
ROLLBACK
RAISERROR ('Error inserting values into PASSPORT_TYPE table!', 16, 1)
RETURN
END
COMMITFirst, a basic concept. That also illustrates how different Oracle is (and PL/SQL) from SQL-Server (and T-SQL).
PL/SQL integrates two different languages. The PL language. The SQL language. It allows you to code SQL source code natively inside the PL language. The PL compiler is clever enough to do the rest - make calls to the SQL engine to create SQL cursors, bind PL variable values to bind variables in the SQL code. Etc.
PL is a "proper" programming language. It is much like Pascal (it is based on Ada, a close family member of Pascal). It is nothing at all like T-SQL.
Okay, now for the very basic rule for Oracle development.
Maximize SQL. This means using the SQL language to crunch data. It is the "closest" to the data. It is designed and optimised for dealing with data. Do your data processing using SQL.
Minimize PL/SQL. This means using the PL language not to crunch data, but to provide the conditional logic. Implement business rules. And then have the SQL language crunch the data as the data processing language.
Attempting to directly translate T-SQL code into PL/SQL is flawed. It is like trying to make coffee with teabags. Yeah, the tea may have caffeine it, but it is not coffee.
To do what that T-SQL script does, insert a row into a table, a typical PL/SQL equivalent will look as follows:
create or replace procedure InsertMaster( masterRow master%rowtype ) authid definer is
.. types and variables declared here
begin
-- masterRow is a record structure that matches the actual MASTER table
.. apply business rules and validation to the data.. raising user exceptions as needed
-- e.g. the POSITION column must be upper case
masterRow.position := upper(masterRow.position);
-- after the business logic and data validation we can add the row to the table
-- (PL will make the INSERT call to the SQL engine)
insert into master values masterRow;
end;No commit. The caller does the business transaction. It needs to decide when to commit to maintain the integrity of the data in the database. It may need to do several more calls, before committing.
With this approach, we can give the application schema (the caller) execute privs on this procedure. This procedure is defined with definer rights. This means it runs with the privs of owner of that procedure and MASTER table. It is trusted code. It does all the correct stuff to add a valid and checked row to the MASTER table. So we give the app schema execute privs on the procedure and no insert priv on the MASTER table.
The only way the caller can add row to the MASTER table is via this trusted procedure of ours.
And this is a typical approach in Oracle - using the PL/SQL (both PL language and SQL language) code to create an interface to a logical database in Oracle. Abstracting the complexities of SQL from the caller. Moving business and validation into PL. Allowing us the flexibility of modifying business and validation logic, without touching a single byte of caller/client code. Allowing us to manage and tune SQL performance without dealing with (badly designed and coded) SQL from a client - as the SQL resides in PL/SQL packages and procedures and functions. -
How to run a SQL Server Stored Procedure
I need to run a SQL Server Stored Procedure in answer, the stored procedure use a hash table (temporary table) and I nedd to pass a parameter to stored procedure
anyone know if is it possible in OBIEE, if yes how.
thank you
maxthank you, but I'm not understand what you mean. I need to run this command in answer "direct access database"
exec storedprocedure 1,1,1
if I run this I receive thi error:
error : [nQSError: 16001] ODBC error state: S0002 code: 208 message: [Microsoft][ODBC SQL Server Driver][SQL Server]object name '#TempList' not valid.. [nQSError: 16002] Cannot obtain number of columns for the query result. (HY000).
here is the code of stored procedure:
ROC [dbo].[GetOrderListmax]
@OrderList varchar(500)
AS
BEGIN
SET NOCOUNT ON
CREATE TABLE #TempList
OrderID int
DECLARE @OrderID varchar(10), @Pos int
SET @OrderList = LTRIM(RTRIM(@OrderList))+ ','
SET @Pos = CHARINDEX(',', @OrderList, 1)
IF REPLACE(@OrderList, ',', '') <> ''
BEGIN
WHILE @Pos > 0
BEGIN
SET @OrderID = LTRIM(RTRIM(LEFT(@OrderList, @Pos - 1)))
IF @OrderID <> ''
BEGIN
INSERT INTO #TempList (OrderID) VALUES (CAST(@OrderID AS int)) --Use Appropriate conversion
END
SET @OrderList = RIGHT(@OrderList, LEN(@OrderList) - @Pos)
SET @Pos = CHARINDEX(',', @OrderList, 1)
END
END
SELECT o.OrderID, CustomerID, EmployeeID, OrderDate
FROM dbo.Orders AS o
JOIN
#TempList t
ON o.OrderID = t.OrderID
END -
How to use @jws:sql call Stored Procedure from Workshop
Is there anyone know how to use @jws tag call Sybase stored procedure within
Workshop,
Thanks,Anurag,
Do you know is there any plan to add this feature in future release? and
when?
Thanks,
David
"Anurag Pareek" <[email protected]> wrote in message
news:[email protected]..
David,
In the current release, we do not support calling stored procedures from a
database control. You will have to write JDBC code in the JWS file to call
stored procedures.
Regards,
Anurag
Workshop Support
"David Yuan" <[email protected]> wrote in message
news:[email protected]..
Anurag,
I know how to use DB connection pool and create a db control with it. In
fact, we have created a Web Service with the db control using plain SQL
in
@jws:sql. However, my question here is how to use @jws tag in Weblogic
Workshop to create a Web Services based on Sybase stored procedure orany
Stored Proc not plain SQL.
Thanks,
David
"Anurag Pareek" <[email protected]> wrote in message
news:[email protected]..
David,
You can use a database control to obtain a connection from any JDBC
Connection Pool configured in the config.xml file. The JDBC Connectionpool
could be connecting to any database, the database control is
independent
of
that.
Regards,
Anurag
Workshop Support
"David Yuan" <[email protected]> wrote in message
news:[email protected]..
Is there anyone know how to use @jws tag call Sybase stored
procedure
within
Workshop,
Thanks, -
Sender JDBC adapter : Update SQL Statement : stored procedure
Hi,
Can we use a stored procedure in the sender jdbc adapter in 'Update SQL Statement'.
The problem i am facing is like, we are selecting data from two tables in 'SQL statement for query' and then in 'Update SQL Statement' , we need to delete that data from these two tables.
Please let me know if it is possible.
Thanks,
Rohityou can use a Stored procedure in the
Query SQL Statement
You have the following options:
· Specify a valid SQL SELECT statement to select the data to be sent from the specified database.
· Specify an SQL EXECUTE statement to execute a stored procedure, which contains exactly one SELECT statement.
The expression must correspond to the SQL variant supported by the relevant JDBC driver. It can also contain table JOINs.
so have your whole select and update as part of this single Stored procedure -
How to use lexical parameters with Sql Server Stored Procedure?
Hi,
I'm developing a BI Publisher report on a sql server database. I need to execute a stored procedure to dynamically build the query by replacing the lexical parameters with the values of varaibles of the stored procedure. With Oracle stored procedures, I have used data template and had reference the varaiable in SP by prefixing it with '&'.
It doesn't work if I try to do the same thing with SQL server. Is there anyone who has come across the similar situation? Please let me know if anyone has got any ideas...
Thanks in Advance
RagTopLink currently doesn't support multiple ResultSets. Multiple ResultSets support is considered for a future release.
-
How to call PL-SQL script/stored procedure from BPEL?
Assume I want to call a PL-SQL stored procedure from BPEL.
How can I do this?
Is there a simple "Hello world" example for this?
PeterThe database adapter supports calling stored procedures. There is an example called "File2StoredProcedure" that you can use as a reference to get started.
-
HowTo: Using special characters in SQL passthrough stored procedure parameters?
Hi all,
I am creating a Visual FoxPro 5.0a application, where I am trying to call a stored procedure in my Oracle database with the following SQLEXEC command (SQLEXEC is the Foxpro function to send sql statements to the ODBC driver):
lcSQL = "{Call Insert_FRB.NewItemPage('KABO)n$i,30000000000', '184927', '184927', 'MAIR2001011216151314', 'MAIR')}"
/* Sorry the above command should of course not break accross pages*/
lnSuccess = sqlexec(1,lcSQL)
With the parameters given, I get the ODBC error: "Connectivity error: [Oracle][ODBC Oracle Driver]Syntax Error."
I get the same error, when using the Oracle ODBC 32bit Test utility.
The call works just fine, if I replace the "$" in the first parameter 'KABO)n$i,30000000000' with a "normal" character, e.g. 'KABO)nAi,30000000000'. Oracle handles the $-character just fine, the stored procedure is working properly when called directly in SQLPLUS8.
I am using the Oracle ODBC driver sqo32_73.dll Version2.00.03.01.
Questions:
How do I have to submit the "$" to the ODBC driver, in order to be passed through to Oracle unchallenged?
Does anybody know of other special characters, which are not accepted by the ODBC-drivers for Oracle?
Thanks to any hints,
PeterYou could try downloading the Oracle 8.1.7 client and the latest
Oracle8 ODBC driver, install them on your machine, and verify
that the failure goes away. That's obviously the acid test.
I can tell you that when I worked in the ODBC driver group we
did identify and fix some bugs where our parser wasn't skipping
string literals. If this particular bug wasn't fixed earlier,
it almost certainly was then (I'm guessing that work was done 12-
18 months ago).
Justin -
Conversion from SQL Server Stored Procedures to Oracle Procedures
We are having an ERP Package which runs on SQL Server 7.0. For the Reports and Transaction windows, we are using the stored procedures extensively.Now , we want to convert it to Oracle Procedures.Where can i find the resource for this subject.
Please mail me to [email protected]
Regards,
BuhariOracle provides a tool, called the Migration Workbench, that can do an automated conversion. In the newest release of SQL Developer, Oracle's PL/SQL development GUI, the Migration Workbench is built in.
Be aware, though, that there are limits to what an automated tool is capable of doing. In all probability, you'll want to manually adjust at least a handful of the procedures after any automated tool converts them in order to make things more efficient or to adjust logic that may depend on database-specific behavior. If you have code, for example, that assumes that writers block readers, that code will no longer block in Oracle, which might require re-assessing your algorithm. In addition, there are numerous approaches to developing procedures that are very common in SQL Server (the use of temp tables, for example), that while possible in Oracle generally aren't the most efficient approach.
Justin -
So I have a chunk of data that only resides in Oracle. So I need to capture that information from Oracle. Now before you get over zealous, I did try with an OPENQUERY and it took FOREVER! And I don't know why the OPENQUERY took FOREVER but if I run the same
query directly against Oracle it runs very quickly...like 20 seconds.
So now I'm wondering...can I build a dataset in my SSRS Report that uses an Oracle Data source and an Oracle Stored Procedure in its Dataset that I'll create to aggregate this subset of data and then utilize its result set back in my main reporting
Dataset that will utilize SQL Server? And how can I do that? Can I make my main Dataset reference, say, a #TemporaryTable that is created from my Oracle Dataset in its
I'll continue to Google a few things as I await your review and hopefully a reply.
Thanks in advance for your help.Hi ITBobbyP,
According to your description you want to use data from a Oracle data source into a DataSet which retrieving data from SQL Server. Right?
In Reporting Services, we can have multiple data sources in one project pointing to different database. And we can use separated dataset to retrieve data from different data source. However, it's not supported to combine the two datasets together
directly. We can only use Lookup(), LookupSet() function to combine fields from different dataset into one tablix when there are common columns between two datasets. This is the only way to make tow result sets together in SSRS.
Reference:
Lookup Function (Report Builder and SSRS)
LookupSet Function (Report Builder and SSRS)
Best Regards,
Simon Hou
TechNet Community Support -
Running a SQL Server Stored Procedure in JSP
Hi peoples!
I have a whole heaps of stored procedure sitting in a SQL Server database I need to make use of.
Im not sure of the code I need to use to access them, and display information from them.
Thanks a heapYou Need to set up a connection object like thus:
Connection conn1 = DriverManager.getConnection("jdbc:odbc:NameOfDatabase", "UserName", "Password");
and then call the following:
CallableStatement cs = conn1.prepareCall("{call spHowMyTeamPerforms(?, ?)}");
cs.setString(1, TeamId);
cs.setInt(2, viewId);
ResultSet result2 = cs.executeQuery();
As you can see I have a stored procedure called spHowMyTeamPerforms which expects two parameters, which explains the bumpf underneath.
Look through the tutorials about PreparedStatements and Callable statements as well -
Using command-line util for wrapping SQL Server stored procedure
Hi,
The Database Adapter does not have native support for stored procedures in SQL Server. Hence, I intend to use the command-line utility that is described briefly in the DB Adapter guide, i.e. the thing that is invoked using "java oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts <property file>".
Has anyone used this before? And did you have any success?
Any help appreciated.
Thanks, SjoerdYet another correction ...
My JD is installed to D:\JDS10gSOA; so ...
I created a bat file with the following jars listed:
java -cp D:\JDS10gSOA\integration\lib\DBAdapter.jar;D:\JDS10gSOA\integration\lib\bpm-infra.jar;D:\JDS10gSOA\integration\lib\orabpel.jar;D:\JDS10gSOA\lib\xmlparserv2.jar;D:\JDS10gSOA\lib\xschema.jar;D:\JDS10gSOA\toplink\jlib\toplink.jar;D:\JDS10gSOA\integration\lib\connector15.jar;D:\JDS10gSOA\jars\sqljdbc.jar oracle.tip.adapter.db.sp.artifacts.GenerateArtifacts %1
Note the \jars\ folder I created and copied the MS jdbc driver in there; it's needed in a couple of other places as well.
A sample properties file:
ProductName=Microsoft SQL Server
DriverClassName=com.microsoft.sqlserver.jdbc.SQLServerDriver
ConnectionString=jdbc:sqlserver://localhost\\SQLEXPRESS;databaseName=helloworlddb;user=hello;password=hello
ProcedureName=helloWorldProc
ServiceName=srv_helloWorldProc
DatabaseConnection=eis/DB/helloworlddb
Hope this helps.
I have to agree the document is very vague on this; no good script or anything from oracle on getting this done - even though it's an integral part of SOA in my opinion.
Regards
Maybe you are looking for
-
BI Publisher pcl codes in rtf template
Hi all, I am using Oracle Business Intelligence 11.1.1.6.9, with oracle database 11G on windows server 2008. I have need to embed pcl commands in rtf templates for printing purposes, but not sure how to do that. Only thing I found was PCL codes for u
-
Unable to open excel f ile after data recovery
My hard drive was accidentally formatted , i tried Recover my files and get almost all my files but i have problem now i am unable to open all files from excel 2010. when tried these files show error. i have already tried http://social.technet.micros
-
I have in my WLS 7.0 cluster enviroment error like this: java.lang.ClassCastException: weblogic.servlet.internal.session.MemorySessionContext Start server side stack trace: java.lang.ClassCastException: weblogic.servlet.internal.session.Mem
-
Real playing card images for ibooks author
Does anybody know where to find real playing card images for ibooks author?
-
Populate cost centre in IT 2001 via Leave application submitted through ESS
Gurus, we have a scenario to populate CC in "Cost Assignment" Tab of IT 2001, when a leave is submitted via ESS. Now we have enabled the additional fileds on ESS and when leave application iView is opened, the CC field is displayed and is defaulted w