Query Regarding PS_TXN Temp Tbl Created by BC
Hi,
Jdev Version : 11.1.1.3.0
Regarding the Temporary table created by ADF BC at Runtime namely PS_TXN , Is there is way to control the Table Name created by ADF BC, and also column Names.
Reason : We have a situation where DB user used by ADF BC to connect to DB, has grants only to perform DML on the tables and has no grant to create tables. Hence we have asked the DB team to create PS_TXN table and sequence and grant access , but they follow certain naming conventions.
Hence could you please let me know if we can control the Table, Column and Sequence name created by ADF BC .
Also does PS_TXN stand for "Passivate_Transaction" ? Need this detail as the DB team needs to know what the table name stands for and its description as they have guidelines to maintain this information .
Thanks in Advance.
Regards,
Mohan
The internal connection has nothing to do with the table name. That has nothing to do with the question.
The following properties
jbo.txn_table_name (default: PS_TXN)
jbo.txn_seq_name (default: PS_TXN_seq)
jbo.txn_seq_inc (default: 50)
should allow you to control the table used for transaction passivation. You should be able to specify those either in the bc4j.xcfg or in a BC4J.properties file, or as a "-D" option, if you want.
I always thought that PS_TXN stands for something like "passivation storage - transaction".
Sascha
Similar Messages
-
Regarding OBD is not created for some materials
Hi,
I have created one STO using BAPI_PO_CREATE1 with 10 articles,for that STO,OBD is automatically created.In that OBD is created for 7 articles and for the remaining 3 articles OBD is not created.Can any one tell me,what is the reason?
ThanksDear Arun,
You wrote
=============
Cache is first in first out... if you exceute too many queries then cache might force out the first query for want of memory. Check the cache immediately after the query is ruin once then you should also check the cache settings for the query in RSRT to see if cache is enabled for the query. Ideally the option for cache should be " Main memory cache with swapping " in RSRT.
==============
I executed my query in question as the first query but no cache was created. The options for the cache mode was 'H Query reads data upon navigation' and 'main memory without swapping' along with a tick in the 'Query cache added to Delta' checkbox.
Just to check, i went on removing formulaes and calculated key figures and free characteristics from the query one by one and in the end the cache did get created for the same query. But I still could not pinpoint the exact reason for the query not producing cahce in its original form.
It only makes me think that there may be a particular scenarios or a peculiarity pertaining to the design of a query, that would prevent its cache being generated.
regards,
Kulmohan -
Query regarding the fields details in particular form for all the users in
Dear All,
I have one query regarding the fields details in particular form for all the users in company.
Let take an exapmle if i had created Purchase Order having fields in content tab as 1.Item No. 2.Quantity 3.Unit Proce 4.Total 5. Location.
While Login in User manager i set these fields only for Purchase order , but when i login from other user and open the similar purchase order the defaults fields are also seen including above 4 fieds .
Now my question is how to set the User choice fiels for the particular form that are common to all users.
Means whenever i login in any user and opens the same document the same fields should be seen....Thanksssss.........You have to login with each and every user and do the Form Settings of every forms, so that all the forms look same for all the users.
This is a manual job and you have do do it with every user login.
Alternately, you can try out this link that explains
[How to Copy One Screen Layout to Another User|http://www.sbonotes.com/2008/03/how-to-copy-one-screen-layout-to.html] -
Query regarding DB_16k_CACHE_SIZE
Hi Friends,
I have got a urgent query regarding db_16k_cache_size parameter.I have created a tablespace with 16k block size,and i have configured the db_16k_cache_sieze to 208M accordingly.I have kept a table in this tablesspace whose presenet size is 323 GB.Some complex queries will be running on this table comprising groups,some complex joins,ordes,analytical functions etc.
I am having 8 GB of SGA.Now my query is whether i have to increase the db_16k_cache_szie parameter from its present size to get better performance and if it is then how to detemine what will be the optimal size of db_16k_cache_size.
Please help...
Thanks
somyPost your query what u have tried. Then only we might be help with you
-
Query regarding Crystal Reports Server
Hi,
I am new to Crystal Reports.
I have created a couple of .rpt files using CR2008 and I am loading these report files in my aspx pages using CrystalReportViewer control.
I am planning to host my webApp on IIS in production environment. Maximum simultaneous/concurrent connections to my reports would be 1 or 2.
My question is:
1. Do I need Crystal Reports Server in this scenario?
2. In future if the number of concurrent users to report increases then do I need to go for Crystal Reports Server? Will just buying and installing the Crystal reports server on production server work? or will I have to do some configuration or some other changes in the existing deployed reports? OR Will I have to deploy my existing reports on Crystal Report Server again?
Any help will be highly appreciated.
Thanks in advance,
ManishManish, please do not cross post:
Query regarding Crystal Reports Server
See the [Rules of Engagement|http://www.sdn.sap.com/irj/sdn/wiki?path=/display/home/rulesofEngagement] for more details.
Marking this thread as answered and locking...
- Ludek -
Query regarding Transfer order creation
Hi Experts,
I have query regarding on creation of transferorder in WM.
1) Once the delivery order received from SD , How WM people will proceed with that delivery order?
2) Is it possible to create transfer order for each item avaliable in delivery order?
3) Is there any chance to partial delivery/ partial picking against that delivery order?
Please guide..
Points willl be rewarded ..
Thanks in advance..1.once the delivery order received from SD, WM will start up with creating a wave pick thru outbound delivery monitor(VL06P), then trasnfer order (TO)is created , then TO is confirmed and goods issue is posted.
2.yes it is possible to create transfer order for each item avaliable in delivery order, if the delivery items are not grouped under a wave pick.
3.partial delivery can be made -
Query regarding CreditMemo in SAP B1?
Hi Friends,
I have a query regarding SAP B1 Sales CreditMemo.
In Sales A/P CreditMemo,the Document status is Open or Close..
Whtat's the meaning of that?Is it related to Payments?
Please give me fine <b>idea about the CreditMemo DocStatus</b> present in ORIN.
Thanks in Advance
regards
Sooriyakala.PHi Sooriya,
It is not always related to Incoming Payments. We are talking about A/R Credit Memo.
1. If the credit memo is based on an A/R Invoices, the Documents status will be Closed. No need for the incoming payments to close this document.
2. If the credit memo is not based on any documents. You will need to create an Incoming Payments to close this document. But of course, credit memo means a negative amount so you must combine it with any a/r invoice to be able to create the incoming payments.
Remember that all document which is Closed means that it is already paid or is based on any marketing documents. Hoep this helps... -
Query regarding fast MV refresh.
Hello All,
I am trying to create a fast refresh materialized view. The code for the MV is given below. But the creation of MV returns an error
CREATE MATERIALIZED VIEW MV_FAKT
ON PREBUILT TABLE
REFRESH FAST ON DEMAND
AS
select
FAKT.COL1,
DIM.COL1
from FAKT, DIM
where FAKT.COL2 = DIM.COL2;
But the creation of MV returns the following error.
SQL Error: ORA-12015: cannot create a fast refresh materialized view from a complex query
12015. 00000 - "cannot create a fast refresh materialized view from a complex query"
*Cause: Neither ROWIDs and nor primary key constraints are supported for
complex queries.
Can we not create an MV with a join condition in it ?
I have created MV logs on both the base table. Below given is the code used to create MV log.
CREATE MATERIALIZED VIEW LOG ON FAKT WITH ROWID;
Request your help.
Thanks and regards.Change the
CREATE MATERIALIZED VIEW LOG ON FAKT WITH PRIMARY KEY
& try -
Query regarding Asset quantity.
Dear Experts,
I have query regarding Asset quantity.
While creating Goods receipt (MIGO) users give the Material (Asset) quantity but when I check in Asset master or in any sap asset reports system not show the quantity in Asset master or any Asset report. Although I have checked in all SAP Standard reports but quantity not updated in any reports. Let me know if I need to do any configure in Asset.
I also want to know that how System posts the quantity automatically in Asset master after doing MIGO/MIRO?
Please provide the best solution.
Best Regards,
VivekHi VIvek
In Asset Master Data update the unit of measure in Quantity field. When you post through a MIRO document or F-90 whatever the quantity input is updated in the asset master record.
Kindly award points if correct -
Query Filling up Temp DB --Please Help
Friends, when I execute this proc it fills up the temp db very quickly. Could you guys please take a look at the attached script and help me
Create PROCEDURE Test
@loginid INT,
@companyid INT,
@streetnumber nvarchar(50) = NULL,
@streetname nvarchar(50) = NULL,
@city nvarchar(50) = NULL,
@zip nvarchar(50) = NULL,
@lastname nvarchar(50) = NULL,
@firstname nvarchar(50) = NULL,
@companyname nvarchar(50) = NULL,
@builder nvarchar(50) = NULL,
@lotnumber nvarchar(50) = NULL,
@subdivision nvarchar(50) = NULL,
@showaccount bit,
@showsite bit,
@activeonly bit = NULL,
@branchType int,
@BranchIndex int,
@prgActive bit = NULL,
@prgCancel bit = NULL,
@prgPendingCancel bit = NULL,
@siteNational bit = NULL,
@siteResidential bit = NULL,
@siteCommercial bit = NULL,
@prgPC bit = NULL,
@prgTCTB bit = NULL,
@prgPCTCTB bit = NULL
AS
BEGIN
DECLARE @sql nvarchar(MAX),
@paramlist nvarchar(4000)
SELECT @sql =
N' SET NOCOUNT ON
CREATE TABLE #temp
accountid int, siteid int, contactid int,phoneid int,addressid int, haspc bit, hastctb bit, branchid int
create index tmpaccountid on #temp(accountid)
create index tmpsiteid on #temp(siteid)
create index tmpcontactid on #temp(contactid)
create index tmpphoneid on #temp(phoneid)
create index tmpaddressid on #temp(addressid)
create index tmpbranchid on #temp(branchid)
IF @showaccount=1 BEGIN
INSERT INTO #temp (accountid,siteid,contactid,phoneid,addressid,branchid)
SELECT distinct taccount.accountid, isnull(taccountsite.siteid,0), tcontact.contactid,
tcontactphonenumber.phoneid,taddress.addressid, taccount.billingcenterid
FROM taddress with (nolock) INNER JOIN
taccount with (nolock) ON taddress.addressid = taccount.billingaddressid INNER JOIN
tlogincompanybranch ON taccount.billingcenterid = tlogincompanybranch.branchid INNER JOIN
tcontact ON taccount.primarycontactid = tcontact.contactid LEFT JOIN
tcontactphonenumber ON tcontactphonenumber.phoneid = tcontact.primaryphoneid
LEFT JOIN taccountsite ON taccountsite.accountid = taccount.accountid
LEFT JOIN tsite ON taccountsite.siteid = tsite.siteid
if (@builder is not null) or (@lotnumber is not null) or (@subdivision is not null)
begin
SELECT @sql = @sql + ' LEFT JOIN tbuilder on tsite.builderid = tbuilder.builderid
LEFT JOIN tcontact bc ON tbuilder.primarycontactid = bc.contactid '
end
if @branchType = 1
begin
SELECT @sql = @sql + ' INNER JOIN testimate est ON est.siteid = tsite.siteid
INNER JOIN tlogincompanybranch svccenterbranch on est.servicecenter=svccenterbranch.branchid and svccenterbranch.loginid = @loginid '
end
SELECT @sql = @sql + ' WHERE taccount.companyid = @companyid and tlogincompanybranch.loginid=@loginid '
if @branchType = 1 and @branchIndex <> 0
begin
SELECT @sql = @sql + ' AND est.servicecenter = @branchIndex '
end
if @activeonly is not null
begin
SELECT @sql = @sql + ' AND taccount.isactive <> 0 '
end
if @lastname is not null
begin
SELECT @sql = @sql + ' AND upper(tcontact.lastname) LIKE @lastname + ''%'''
--SELECT @sql = @sql + ' AND upper(tcontact.lastname) LIKE N' + quotename(@lastname + '%', '''')
end
if @firstname is not null
begin
SELECT @sql = @sql + ' AND upper(tcontact.firstname) LIKE @firstname + ''%'''
end
if @companyname is not null
begin
SELECT @sql = @sql + ' AND upper(tcontact.businessname) LIKE @companyname + ''%'''
end
if @streetnumber is not null
begin
SELECT @sql = @sql + ' AND taddress.streetnumber = @streetnumber '
end
if @streetname is not null
begin
SELECT @sql = @sql + ' AND upper(taddress.streetname) LIKE @streetname + ''%'''
end
if @city is not null
begin
SELECT @sql = @sql + ' AND upper(taddress.city) LIKE @city + ''%'''
end
if @zip is not null
begin
SELECT @sql = @sql + ' AND taddress.postalcode LIKE @zip + ''%'''
end
if @builder is not null
begin
SELECT @sql = @sql + ' AND upper(bc.businessname) LIKE ''%'' + @builder + ''%'''
end
if @lotnumber is not null
begin
SELECT @sql = @sql + ' AND upper(tsite.lotnumber) LIKE @lotnumber '
end
if @subdivision is not null
begin
SELECT @sql = @sql + ' AND upper(tsite.subdivision) LIKE @subdivision + ''%'''
end
if (@siteNational is not null) or (@siteResidential is not null) or (@siteCommercial is not null)
begin
SELECT @sql = @sql + ' AND ( '
if @siteResidential is not null
begin
SELECT @sql = @sql + ' tsite.propertytype = 1 '
end
if @siteCommercial is not null
begin
if (@siteCommercial is not null) and (@siteResidential is not null)
begin
SELECT @sql = @sql + ' OR tsite.propertytype = 2 '
end
else
begin
SELECT @sql = @sql + ' tsite.propertytype = 2 '
end
end
if @siteNational is not null
begin
if (@siteNational is not null) and ((@siteResidential is not null) or (@siteCommercial is not null))
begin
SELECT @sql = @sql + ' OR tsite.propertytype = 5 '
end
else
begin
SELECT @sql = @sql + ' tsite.propertytype = 5 '
end
end
SELECT @sql = @sql + ' ) '
end
if @branchType = 2
begin
SELECT @sql = @sql + ' AND taccount.billingcenterid = @BranchIndex '
end
SELECT @sql = @sql + ' END '
SELECT @sql = @sql + ' IF @showsite = 1 BEGIN
INSERT INTO #temp (accountid,siteid,contactid,phoneid,addressid, branchid)
SELECT distinct taccountsite.accountid,tsite.siteid,tsite.primarycontactid,
isnull(tcontactphonenumber.phoneid, 0),taddress.addressid,0
FROM taccountsite INNER JOIN
taccount a on a.accountid=taccountsite.accountid INNER JOIN
tlogincompanybranch on a.billingcenterid=tlogincompanybranch.branchid INNER JOIN
tsite with (nolock) ON taccountsite.siteid = tsite.siteid INNER JOIN
taddress with (nolock) ON tsite.addressid = taddress.addressid INNER JOIN
tcontact ON tsite.primarycontactid = tcontact.contactid LEFT JOIN
tcontactphonenumber ON tcontact.primaryphoneid = tcontactphonenumber.phoneid '
if @builder is not null
begin
SELECT @sql = @sql + ' LEFT JOIN tbuilder ON tsite.builderid = tbuilder.builderid
LEFT JOIN tcontact bc ON tbuilder.primarycontactid = bc.contactid '
end
if @branchType = 1
begin
SELECT @sql = @sql + ' INNER JOIN testimate est ON est.siteid = tsite.siteid
INNER JOIN tlogincompanybranch svccenterbranch on est.servicecenter=svccenterbranch.branchid and svccenterbranch.loginid = @loginid '
end
SELECT @sql = @sql + ' WHERE taddress.companyid = @companyid and tlogincompanybranch.loginid=@loginid '
if @activeonly is not null
begin
SELECT @sql = @sql + ' AND a.isactive <> 0 '
end
if @lastname is not null
begin
SELECT @sql = @sql + ' AND upper(tcontact.lastname) LIKE @lastname + ''%'''
--SELECT @sql = @sql + ' AND upper(tcontact.lastname) LIKE N' + quotename(@lastname + '%', '''')
end
if @branchType = 1 and @branchIndex <> 0
begin
SELECT @sql = @sql + ' AND est.servicecenter = @branchIndex '
end
if @firstname is not null
begin
SELECT @sql = @sql + ' AND upper(tcontact.firstname) LIKE @firstname + ''%'''
end
if @companyname is not null
begin
SELECT @sql = @sql + ' AND upper(tcontact.businessname) LIKE @companyname + ''%'''
end
if @streetnumber is not null
begin
SELECT @sql = @sql + ' AND taddress.streetnumber = @streetnumber '
end
if @streetname is not null
begin
SELECT @sql = @sql + ' AND upper(taddress.streetname) LIKE @streetname + ''%'''
end
if @city is not null
begin
SELECT @sql = @sql + ' AND upper(taddress.city) LIKE @city + ''%'''
end
if @zip is not null
begin
SELECT @sql = @sql + ' AND taddress.postalcode LIKE @zip + ''%'''
end
if @builder is not null
begin
SELECT @sql = @sql + ' AND upper(bc.businessname) LIKE ''%'' + @builder + ''%'''
end
if @lotnumber is not null
begin
SELECT @sql = @sql + ' AND upper(tsite.lotnumber) LIKE @lotnumber '
end
if @subdivision is not null
begin
SELECT @sql = @sql + ' AND upper(tsite.subdivision) LIKE @subdivision + ''%'''
end
if (@siteNational is not null) or (@siteResidential is not null) or (@siteCommercial is not null)
begin
SELECT @sql = @sql + ' AND ( '
if @siteResidential is not null
begin
SELECT @sql = @sql + ' tsite.propertytype = 1 '
end
if @siteCommercial is not null
begin
if (@siteCommercial is not null) and (@siteResidential is not null)
begin
SELECT @sql = @sql + ' OR tsite.propertytype = 2 '
end
else
begin
SELECT @sql = @sql + ' tsite.propertytype = 2 '
end
end
if @siteNational is not null
begin
if (@siteNational is not null) and ((@siteResidential is not null) or (@siteCommercial is not null))
begin
SELECT @sql = @sql + ' OR tsite.propertytype = 5 '
end
else
begin
SELECT @sql = @sql + ' tsite.propertytype = 5 '
end
end
SELECT @sql = @sql + ' ) '
end
if @branchType = 2
begin
SELECT @sql = @sql + ' AND taccount.billingcenterid = @BranchIndex '
end
SELECT @sql = @sql + ' END '
if (@prgActive is not null) or (@prgCancel is not null) or (@prgPendingCancel is not null)
begin
SELECT @sql = @sql + ' delete tmp
from #temp tmp
left join testimate e on e.siteid = tmp.siteid
left join tprogram p on p.estimateid = e.estimateid
where p.programid IS NULL '
if @prgActive is null
begin
SELECT @sql = @sql + ' OR (p.canceldate is null and p.pendingcanceldate is null) '
end
if @prgCancel is null
begin
SELECT @sql = @sql + ' OR p.canceldate is not null '
end
if @prgPendingCancel is null
begin
SELECT @sql = @sql + ' OR p.pendingcanceldate is not null '
end
end
SELECT @sql = @sql + ' ;WITH counts AS
SELECT
tmp.accountid,
pccount = SUM(CASE WHEN ps.reportcategory = 1 THEN 1 ELSE 0 END),
tctbcount = SUM(CASE WHEN ps.reportcategory = 3 THEN 1 ELSE 0 END)
FROM
#temp tmp
INNER JOIN testimate e ON e.siteid = tmp.siteid
INNER JOIN tprogram p ON p.estimateid = e.estimateid
INNER JOIN tprogramsetup ps ON ps.programtypeid = p.programtypeid
GROUP BY tmp.accountid
UPDATE #temp
SET haspc = CASE WHEN c.pccount > 0 THEN 1 ELSE 0 END,
hastctb = CASE WHEN c.tctbcount > 0 THEN 1 ELSE 0 END
FROM #temp tmp
INNER JOIN counts c ON c.accountid = tmp.accountid '
if (@prgPC is not null) or (@prgTCTB is not null) or (@prgPCTCTB is not null)
begin
SELECT @sql = @sql + ' DELETE
FROM #temp
WHERE (haspc = 0 AND hastctb = 0) OR (haspc IS NULL OR hastctb IS NULL) '
if @prgPC is null
begin
SELECT @sql = @sql + ' OR (haspc = 1 AND hastctb = 0)'
end
if @prgTCTB is null
begin
SELECT @sql = @sql + ' OR (haspc = 0 AND hastctb = 1)'
end
if @prgPCTCTB is null
begin
SELECT @sql = @sql + ' OR (haspc = 1 AND hastctb = 1)'
end
end
SELECT @sql = @sql + ' IF @showaccount=1 AND @showsite = 0 BEGIN
SELECT DISTINCT taccount.accountnum,taccount.isactive, b.branchname, 0 as siteid, isnull(max(tcontact.firstname),'''') as firstname,isnull(max(tcontact.lastname),'''') as lastname,
isnull(max(tcontact.businessname),'''') as businessname,max(taddress.streetnumber) as streetnumber,
max(taddress.predirection) as predirection ,isnull(max(taddress.streetname),'''') as streetname,max(taddress.streetsuffix) as streetsuffix,max(taddress.postdirection) as postdirection,
isnull(max(taddress.city),'''') as city,isnull(max(taddress.state),'''') as state,max(taddress.postalcode) as postalcode,isnull(taccount.mysearch,'''') as mysearch,taccount.accountid,
isnull(max(tsite.lotnumber),'''') as lotnumber, haspc=CONVERT(BIT,ISNULL(haspc,0)), hastctb=CONVERT(BIT,ISNULL(hastctb,0))
FROM #temp INNER JOIN taccount ON #temp.accountid = taccount.accountid
LEFT JOIN tcontact ON #temp.contactid = tcontact.contactid
LEFT JOIN taddress ON #temp.addressid = taddress.addressid
LEFT JOIN taccountsite ON taccountsite.accountid=taccount.accountid
LEFT JOIN tsite ON (taccountsite.siteid = tsite.siteid and tsite.addressid=taddress.addressid )
LEFT JOIN tbranch b ON (taccount.billingcenterid = b.branchid)
if @branchType = 1
begin
SELECT @sql = @sql + ' LEFT JOIN testimate est ON est.accountid = taccount.accountid '
if @BranchIndex <> 0
begin
SELECT @sql = @sql + ' AND est.servicecenter = @BranchIndex '
end
SELECT @sql = @sql + ' GROUP BY taccount.accountnum, #temp.siteid, tcontact.firstname, tcontact.lastname,
tcontact.businessname, taddress.streetnumber, taddress.predirection, taddress.streetname, taddress.streetsuffix, taddress.postdirection, taddress.city, taddress.state, taddress.postalcode, taccount.mysearch, taccount.accountid, taccount.isactive, haspc, hastctb, b.branchname
HAVING count(est.servicecenter) > 0 '
end
else
begin
if @branchType = 2
begin
SELECT @sql = @sql + ' WHERE taccount.billingcenterid = @BranchIndex '
end
SELECT @sql = @sql + ' GROUP BY taccount.accountid, taccount.isactive,taccount.accountnum,taccount.mysearch, haspc, hastctb,b.branchname '
SELECT @sql = @sql + ' ORDER BY taccount.accountnum '
end
SELECT @sql = @sql + ' END ELSE BEGIN
SELECT DISTINCT taccount.accountnum,taccount.isactive, case when billingbranch.branchname is not null and @showaccount = 1 then billingbranch.branchname else isnull(b.branchname,'''') end as branchname, case when #temp.branchid = 0 then #temp.siteid else 0 end as siteid, isnull(tcontact.firstname,'''') as firstname,isnull(tcontact.lastname,'''') as lastname,
isnull(tcontact.businessname,'''') as businessname,taddress.streetnumber,
taddress.predirection,isnull(taddress.streetname,'''') as streetname,taddress.streetsuffix,taddress.postdirection,
isnull(taddress.city,'''') as city,isnull(taddress.state,'''') as state,taddress.postalcode,isnull(taccount.mysearch,'''') as mysearch,taccount.accountid,
isnull(max(tsite.lotnumber),'''') as lotnumber, haspc=CONVERT(BIT,ISNULL(haspc,0)), hastctb=CONVERT(BIT,ISNULL(hastctb,0))
FROM #temp INNER JOIN taccount ON #temp.accountid = taccount.accountid
LEFT JOIN tcontact ON #temp.contactid = tcontact.contactid
LEFT JOIN taddress ON #temp.addressid = taddress.addressid
LEFT JOIN taccountsite ON taccountsite.accountid=taccount.accountid
LEFT JOIN tsite ON (taccountsite.siteid = tsite.siteid and tsite.addressid=taddress.addressid )
LEFT JOIN testimate est ON est.siteid = tsite.siteid
LEFT JOIN tbranch b ON (est.servicecenter = b.branchid)
LEFT JOIN tbranch billingbranch ON (#temp.branchid = billingbranch.branchid)
if @branchType = 1
begin
if @BranchIndex <> 0
begin
SELECT @sql = @sql + ' AND est.servicecenter = @BranchIndex '
end
SELECT @sql = @sql + ' GROUP BY taccount.accountnum,taccount.isactive, #temp.siteid, tcontact.firstname, tcontact.lastname,tcontact.businessname, taddress.streetnumber,
taddress.predirection,taddress.streetname, taddress.streetsuffix,taddress.postdirection,taddress.city, taddress.state, taddress.postalcode,taccount.mysearch, taccount.accountid, haspc, hastctb, b.branchname, billingbranch.branchname, #temp.branchid
HAVING (count(est.servicecenter) > 0 or billingbranch.branchname is not null) '
end
else
begin
if @branchType = 2
begin
SELECT @sql = @sql + ' WHERE taccount.billingcenterid = @BranchIndex '
end
SELECT @sql = @sql + ' GROUP BY taccount.accountid, taccount.isactive,taccount.accountnum, tcontact.firstname, tcontact.lastname,
tcontact.businessname, #temp.siteid,
taddress.streetnumber, taddress.predirection, taddress.streetname,
taddress.streetsuffix, taddress.postdirection,taddress.city, taddress.state,
taddress.postalcode,taddress.postalcodeex,taccount.mysearch, haspc, hastctb, b.branchname, billingbranch.branchname, #temp.branchid '
end
SELECT @sql = @sql + ' ORDER BY taccount.accountnum
END
DROP TABLE #temp
SET NOCOUNT OFF '
SELECT @paramlist = N' @loginid INT,
@companyid INT,
@streetnumber nvarchar(100),
@streetname nvarchar(50),
@city nvarchar(50),
@zip nvarchar(50),
@lastname nvarchar(50),
@firstname nvarchar(50),
@companyname nvarchar(50),
@builder nvarchar(50),
@lotnumber nvarchar(50),
@subdivision nvarchar(50),
@showaccount bit,
@showsite bit,
@activeonly bit,
@branchType int,
@BranchIndex int,
@prgActive bit,
@prgCancel bit,
@prgPendingCancel bit,
@siteNational bit,
@siteResidential bit,
@siteCommercial bit,
@prgPC bit,
@prgTCTB bit,
@prgPCTCTB bit '
EXEC sp_executesql @sql, @paramlist,
@loginid, @companyid, @streetnumber, @streetname, @city, @zip, @lastname, @firstname, @companyname, @builder,
@lotnumber, @subdivision, @showaccount, @showsite, @activeonly, @branchType, @BranchIndex, @prgActive,
@prgCancel,@prgPendingCancel, @siteNational, @siteResidential, @siteCommercial, @prgPC, @prgTCTB, @prgPCTCTB
ENDDoes it fill up tempdb, no matter which parameters you provide?
Narrow down which conditions that cause the procedure to fail. Add a @debug parameter and
IF @debug = 1
PRINT @sql
Take a look at that SQL, and see if it looks OK. Maybe you have an incorrect condition somewhere?
You can also create a temporary procedure from the generated SQL, and then run it, to see more what is happening.
If nothing stands out, try reducing the query until tempdb stays in check.
Since you create temp tables, there are two possible reasons (at least) why tempdb fills up:
1) You are inserting too much data into the temp tables (for instance because of a poorly written join).
2) The query generates a worktable which overflows.
I don't think anyone wants to try to read and understand your dynamic SQL code, but hopefully these tips helps you with the troubleshooting.
Erland Sommarskog, SQL Server MVP, [email protected] -
Query regarding updation thru a Procedure
Hi,I have a query regarding updation.
1.I invoke a procedure in Oracle called submit thru my Java application.
The submit procedure saves the XML data in the database
and displays this data in a Front End GUI.
2. Now,I make a change in my Java application by adding new elements to the same row.This row now contains additional XML elements.
I would like to display the new row with the new elements in the GUI.
What is a better option for doing the above?
1.Delete the row being shown,save the new row with the changes in the database,and re display it?
2.Or,Update the row dynamically and refresh?
Any suggestions
Thanks,Hi,I have a query regarding updation.
1.I invoke a procedure in Oracle called submit thru
my Java application.
The submit procedure saves the XML data in the
database
and displays this data in a Front End GUI.
2. Now,I make a change in my Java application by
adding new elements to the same row.This row now
contains additional XML elements.
I would like to display the new row with the new
elements in the GUI.
What is a better option for doing the above?
1.Delete the row being shown,save the new row with
the changes in the database,and re display it?
2.Or,Update the row dynamically and refresh?
Any suggestions
Thanks,If you delete (it seems to me yours this process is regular and frequent) and re insert the new updated one record then High water mark will cause to scan yours table which may cause to degrade the performance.AFAIK you should go with update.But hold down dont implement it as i suggested lets see what are others solution here which may be more precious then mine.
Khurram -
A query regarding synchronised functions, using shared object
Hi all.
I have this little query, regarding the functions that are synchronised, based on accessing the lock to the object, which is being used for synchronizing.
Ok, I will clear myself with the following example :
class First
int a;
static int b;
public void func_one()
synchronized((Integer) a)
{ // function logic
} // End of func_one
public void func_two()
synchronized((Integer) b)
{ / function logic
} // End of func_two
public static void func_three()
synchronized((Integer) a)
{ // function logic
} // End of func_three, WHICH IS ACTUALLY NOT ALLOWED,
// just written here for completeness.
public static void func_four()
synchronized((Integer) b)
{ / function logic
} // End of func_four
First obj1 = new First();
First obj2 = new First();
Note that the four functions are different on the following criteria :
a) Whether the function is static or non-static.
b) Whether the object on which synchronization is based is a static, or a non-static member of the class.
Now, first my-thoughts; kindly correct me if I am wrong :
a) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisation, since in case obj1 and obj2 happen to call the func_one at the same time, obj1 will obtain lock for obj1.a; and obj2 will obtain lock to obj2.a; and both can go inside the supposed-to-be-synchronized-function-but-actually-is-not merrily.
Kindly correct me I am wrong anywhere in the above.
b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation.
Kindly correct me I am wrong anywhere in the above.
c) In case 3, we have a static function , synchronized on a non-static object. However, Java does not allow functions of this type, so we may safely move forward.
d) In case 4, we have a static function, synchronized on a static object.
Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a. However, since obj1.a and obj2.a are the same, thus we will indeed obtain sychronisation. But we are only partly done for this case.
First, Kindly correct me I am wrong anywhere in the above.
Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".
Another query : so far we have been assuming that the only objects contending for the synchronized function are obj1, and obj2, in a single thread. Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.a; and again obj1 trying to obtain lock for obj1.a, which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed. Thus, effectively, our synchronisation is broken.
Or am I being dumb ?
Looking forward to replies..
Ashutosha) In case 1, we have a non-static function, synchronized on a non-static object. Thus, effectively, there is no-synchronisationThere is no synchronization between distinct First objects, but that's what you specified. Apart from the coding bug noted below, there would be synchronization between different threads using the same instance of First.
b) In case 2, we have a non-static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.obj1/2 don't call methods or try to obtain locks. The two different threads do that. And you mean First.b, not obj1.b and obj2.b, but see also below.
d) In case 4, we have a static function, synchronized on a static object. Here, again if obj1, and obj2 happen to call the function at the same time, obj1 will try to obtain lock for obj1.a; while obj2 will try to obtain lock for obj2.a.Again, obj1/2 don't call methods or try to obtain locks. The two different threads do that. And again, you mean First.b. obj1.b and obj2.b are the same as First.b. Does that make it clearer?
Now, I have a query : what happens if the call is made in a classically static manner, i.e. using the statement "First.func_four;".That's what happens in any case whether you write obj1.func_four(), obj2.func)four(), or First.func_four(). All these are identical when func_four(0 is static.
Now, consider this, suppose we have the same reference obj1, in two threads, and the call "obj1.func_four;" happens to occur at the same time from each of these threads. Thus, we have obj1 rying to obtain lock for obj1.aNo we don't, we have a thread trying to obtain the lock on First.b.
and again obj1 trying to obtain lock for obj1.aYou mean obj2 and First.b, but obj2 doesn't obtain the lock, the thread does.
which are the same locks. So, if obj1.a of the first thread obtains the lock, then it will enter the function no-doubt, but the call from the second thread will also succeed.Of course it won't. Your reasoning here makes zero sense..Once First.b is locked it is locked. End of story.
Thus, effectively, our synchronisation is broken.No it isn't. The second thread will wait on the same First.b object that the first thread has locked.
However in any case you have a much bigger problem here. You're autoboxing your local 'int' variable to a possibly brand-new Integer object every call, so there may be no synchronization at all.
You need:
Object a = new Object();
static Object b = new Object(); -
Query regarding the conversion of DME file in MT940 format.
Hello Experts,
I have a query regarding the generation of MT940 file after generating the payment file from other DME tree.
After completion of payment run, my payment file is generated in the DME format which is according to the DME tree.
I want to convert the DME file (which is generated via F110) from existing format to the standard MT940 format.
Is there any standard program which converts the DME file to MT940. If so, please inform me as early.
I have tried to upload the DME file in FF.5 transaction, but it is not allowing me to convert the file in MT940 structure.
Or please inform the steps how i can convert the file .
Awaiting for your inputs.
Thanks in advanceHi Zareena.
I would like to suggest,
SX_OBJECT_CONVERT_RAW_TXT.
Hope that's usefull.
Good Luck & Regards.
Harsh Dave -
Save Query - An error occurred while creating connection strings for the query
A workbook trying to edit and reload I get the following error "Save Query - An error occurred while creating connection strings for the query" No Power Pivot data model or anything.
I am getting the same error when editing a Power Query in an Excel spreadsheet. It happens when I change a Group By step to do a Sum instead of Count Rows.
-
Query regarding the data type for fetcing records from multiple ODS tables
hey guys;
i have a query regarding the data type for fetcing records from multiple ODS tables.
if i have 2 table with a same column name then in the datatype under parent row node i cant add 2 nodes with the same name.
can any one help with some suggestion.Hi Mudit,
One option would be to go as mentioned by Padamja , prefxing the table name to the column name or another would be to use the AS keyoword in your SQL statement.
AS is used to rename the column name when data is being selected from your DB.
So, the query Select ename as empname from emptable will return the data with column name as empname.
Regards,
Bhavesh
Maybe you are looking for
-
Flash Movie Works in Preview (Ctrl+enter) but not in Published
Hi All- I hope somebody on here can help me out. I'm not sure what else to try. I have a flash project that I have been working on for a while, today its stopped functioning properly. To be clear. It still runs JUST FINE when I preview it (CTRL+ENTER
-
Oracle Forms Developer/services 6i Release2 for window NT
Hi, When I Log on SQL*PLUS the system print this error (The program PLUS80W do error in ORA80.DLL please restart your pc.) why this error is?
-
Fireworks CS3 WIll Not Start Up
I have downloaded both the Dreamweaver and Fireworks CS3 trials and have been using them both for a couple of days without any problems. Suddenly when starting up Fireworks (it starts to load the program) then comes up with the following pop up messa
-
Csdkjni.dll cannot find dependencies
Well this is probably a long shot since no one has posted here in months... Wonder why Oracle? You only make it damn near impossible to find or get the SDK let alone provide reasonable documentation for preparing the development environment. Okay, I'
-
E4500 - Can't see networked PC's
Since the upgrade by Cisco I can only see Win7 PC's on the network. I can not see the USB drive attached to the E4500, nor can I see my Media server which is Linux based nor any Win XP computuers. Solved! Go to Solution.