November 10, 2014, 9:03 pm
Hi ,
We are connecting from a PowerBuilder application to Informix (AIX).
We are using only one user id, but trying to establish multiple connection for the same user.
After around 140+ connections, our application became slow. Is there any maximum limit for connecting same user multiple sessions?
If so, pls guide me how to resolve? Unfortunately this is happening in Production environment.
Pls. help ASAP.
Ours is Informix in AIX. ( 9.55C1).
Regards,
Rajiv S
↧
November 10, 2014, 11:49 pm
Hi,
Can some one tell me the exact difference between the db2 UDB & db2 LUW. I am totally confused with this terminology.
↧
↧
November 11, 2014, 3:13 am
HI,
I have a ms-access file which has linked table. The linked table is connected to a ODBC source (e.g MS-SQL or 3rd Party ODBC Driver).
WebPage(php) Apache (Windows), connecting to a ODBC DSN of MS-Access, MS-Access is having linked tables. Linked tables as from another ODBC source.
On the PHP Page, When I am trying to connect the ms-access odbc dsn , I am able to connect.
But when I query any of the linked tables, PHP is not able to query and is failing.
Does php has capabilities to read/write to linked tables in ms-access file.
Or it is issue with MS-Access
Or is it I am missing something.
Regards
Rajendra Dewani
↧
November 11, 2014, 3:59 am
Hi!
I'm working on a batch of queries and there is a requirement where I have to convert this SQL Server queries to similar-function Oracle.
SQL Server:
Code:
WITH Cte
AS (SELECT cast('<S>' + replace(replace(N'$(AppServers)', ';', ','), ',', '</S><S>') + '</S>' AS XML) AS Servers)
INSERT INTO INSTANCE
(INSTANCE_ID,
SERVER_NAME,
INSTANCE_IDENTIFIER,
IDENTIFIER_PREFIX)
SELECT ROW_NUMBER() OVER (ORDER BY SERVER_NAME) - 1,
SERVER_NAME,
NULL,
0
FROM (SELECT DISTINCT upper(Split.Server.value('.', 'VARCHAR(100)')) AS SERVER_NAME
FROM Cte
CROSS apply Servers.nodes('/S') Split(Server)) Servers
ORDER BY SERVER_NAME;
Oracle:
Code:
DECLARE
L_INPUT VARCHAR2(4000) := 'foo,bar,baz,wibble';
L_COUNT BINARY_INTEGER;
L_ARRAY DBMS_UTILITY.LNAME_ARRAY;
BEGIN
DBMS_UTILITY.COMMA_TO_TABLE(LIST => REGEXP_REPLACE(L_INPUT, '(^|,)', '\1x'), TABLEN => L_COUNT, TAB => L_ARRAY);
DBMS_OUTPUT.PUT_LINE(L_COUNT);
FOR I IN 1 .. L_COUNT
LOOP
DBMS_OUTPUT.PUT_LINE('Element ' || TO_CHAR(I) || ' of array contains: ' || SUBSTR(L_ARRAY(I), 2));
INSERT INTO INSTANCE VALUES (I, SUBSTR(L_ARRAY(I), 2), NULL, 0);
COMMIT;
END LOOP;
END;
Now, the requirement changed that we should have a function that will accept two values: CSV for columns, and CSV of CSV for values (multiple rows). Example:
SomeFunction(
"Directory
,ID
,Location
,UserName
,Password
,Selector",
"
(Directory=Voice Active Directory A,
ID=VT-AD1,
Location=Canada,
UserName=admin,
Password=passw0rd,
Selector=AD1
),(Directory=Voice Active Directory B,
ID=VT-AD2,
Location=https://beta-proxy.voice.com/VTadp/Proxy/[/url],
UserName=admin,
Password=passw0rd,
Selector=AD2
),(Directory=Voice Active Directory C,
ID=VT-AD3,
Location=
https://final-proxy.voice.com/VTadp/Proxy/,
UserName=admin,
Password=passw0rd
)"
The second parameter is a big one as it has all the row data. Also, it has the column names as well because the third row data has a missing selector column value and should be inserted as NULL. The main reason I want to return a resultset indicated by a pointer is that the target table to insert into can be any. It will be the caller's responsibility to send the correct data to the function and handle the returned collection in a loop for the desired table making this function very general. I'll manage that after getting the generic result set. I'll worry about how to navigate that result set once I can actually get it. Can anyone suggest a basic example? Thank you.
↧
November 11, 2014, 4:08 am
Hi,
We are using DB2 9.5 and 9.7 in two of the servers as a DB for application RAM. Now we plan to upgrade the same to the latest release which of version 10.1.
Note: We do not have a dedicated administrator.
In the past for one of the instance we have restored the backed up db and during restoring itself the DB got upgraded.
Here the case is different - we have an existing DB2 9.7 version
My question is - Can we directly run the DB 10.1 setup and should we uninstall the existing one and install the new one.
From application side I believe we would require the DB backup to be taken and restore it to the new DB.
↧
↧
November 11, 2014, 5:53 am
I like to get the details on some of the payroll management system in India..
↧
November 11, 2014, 8:29 am
I have a php mySQL database which records clients visits to a free advice clinic. There is a matters table which, amongst others, has fields:
matterid
clientname
visitdate
I want to get totals from this (between certain dates but that isnt an issue) but I only want to count a client once no matter how many different matters they have set up.
If I use 'SELECT DISTINCT clientname' then I get a list with no duplicates but if I add 'count(*) as total' the total includes duplicates so is incorrect.
How can I get round this?
↧
November 11, 2014, 8:54 am
I have a php/mySQL database recording client visits to an advice centre. The tables involved are Clients Matters and Ethnicity
Clients has fields client, clientname, ethnicid
Ethnicity has fields ethnic and ethnicity
Matters has fields mattered, client, clientname
I want to produce a table which gives totals for the number of unique clients seen. Thus, if someone comes for any number of matters they only count once. Also I need to break the totals down by ethnicity.
In a separate set of tables (to count the advice given) I had a query of which part is:
SELECT COUNT(*), SUM(CASE WHEN ethnicid='5' THEN 1 ELSE 0 END) AS wh, SUM(CASE WHEN ethnicid='6' THEN 1 ELSE 0 END) AS EN
..etc
If I try the same thing in my new table it wont work as it includes duplicate clients. How can I modify my query to remove duplicates?
Many thanks
↧
November 11, 2014, 3:40 pm
Ok, I'm getting some where on this database. :) Now I would like to have access automatically fill in a box based on TWO previous boxes. We have different fees based on whether the family is in or out of parish and there are different fees depending on how many kids they have. So I'd like to be able to select in or out of parish and how many kids and have it automatically fill in the fee. I've found cascading combo boxes, but the directions I've found are only based on the previous box, where I need it looking at two different boxes.
This isn't a big thing, but it would be nice and save mis-types. So if someone can give me an idea on how to do this, it would be great! Thanks!
↧
↧
November 11, 2014, 3:53 pm
There is a query named query1, which has a column named salary.
We also have a form with a textbox named payements.
Can we design the form so that when it is loaded the textbox named payments gets the sum of column salary of query1?
I mean: payments in form textbox = sum of salary column from query1
↧
November 11, 2014, 4:21 pm
Hi
this my scenario. we have a manufacturing warehouse where the timber is first cut, edged worked , routerd then painted.
all jobs are printed on labels. what i need done is that when each section complete a job example its cut they scan the barcode which then put the unique id and date in the table. so there will be about 6 tables.
so on table1 Name cut the barcode is scanned which auto inserts date and moves to next field ready for the next barcode to be scanned.
then the same thing for edge worked table the barcode is scanned which auto inserts date and moves to next field ready for the next barcode to be scanned. and so on for all the tables.
then i want to be able to match up each unique id and let me know which job older then x amount of days .
↧
November 11, 2014, 11:23 pm
Hi,
I am trying to create a dynamic scrollable cursor. I am getting some sort of error. can some one plz let me know what I am missing here
DECLARE cur1 SENSITIVE DYNAMIC SCROLL CURSOR WITH RETURN for
select cst.OWNER DB_NAME,cst.TBNAME TABLE_NAME,total_columns as max_columns
FROM YEW as cst, YEN_c1 as cstc
WHERE COALESCE(truncate_flag, 'N') = 'N'
and cst.owner = cstc.owner
and cst.mt_name = cstc.mt_name
and cstc.total_rows > 0
order by 1, 2 ;
ERROR:
An unexpected token "<space>" was found following "cur1". Expected tokens may include: "SENSITIVE".. SQLCODE=-104, SQLSTATE=42601, DRIVER=4.17.30
An unexpected token "<space>" was found following "cur1". Expected tokens may include: "SENSITIVE".. SQLCODE=-104, SQLSTATE=42601, DRIVE
↧
November 12, 2014, 12:19 am
Hi All,
We are having a market place portal. To brief you, it is a place where buyer will inquire supplier on products he is interested in. Each supplier will have a subdomain based micro website of their own. We need to build analytics for portal (which includes portal page impressions and Product analytics) and for each supplliers' subdomain.
We have around 500k supplier in our db. Portal hits as now is around 50k/day (Got it from GA) . we need to have custom analytics for sub domain and product based. Say out of 50k hits 10k visits our suppliers subdomain also that means 10000 min number of rows in db-> analytics table each day. Each suppliers micro site is having 5 pages so this could go upto 50k rows per day as of now it is very small our db can handle it. but my question is what if these thing go up when each day we have around 1million rows inserted in analytics table that means in 100 days we have 100 M rows!!! (we are expecting this kind of traffic in a year time). Kindly advice me how we can structure the Analytics table.
We are using AWS RDS for Mysql DB and PHP for Server side scripting.
↧
↧
November 12, 2014, 1:04 am
Please can anyone suggest DB2 9.7 express edition download link
Thanks in advance
↧
November 12, 2014, 2:09 am
Hi,
I am getting some issue on the below multiple cursor
CREATE PROCEDURE p1()
P1: BEGIN
DECLARE --
--
--
--
DECLARE C1 CURSOR WITH RETURN for SELECT * FROM DUMMY1;
DECLARE C2 CURSOR WITH RETURN for STN1;
--
--
OPEN C1;
FETCH FROM C1 INTO ....
WHILE( )
DO
--
--
--
OPEN C2;
FETCH FROM C2 INTO ...
WHILE( )
DO
--
--
FETCH FROM C2 INTO ...
---
--
END WHILE;
CALL PROC2();
FETCH FROM C1 INTO...
END WHILE;
END P1
Error:
My problem is After executing the second proc (proc1) it has to continue to the first procedure & it has to work with the second row from the first cursor. But I am unable to work with the second row of the first cursor. according to this code I am able to update only the first row of the first cursor. In order to work with the next row of first cursor , what should I need to change .
Thanks
↧
November 12, 2014, 2:30 am
Sum of costs
Hello! I'm currently working on a time sheet application where I'm recording activities and corresponding total number of hours.
I need to group the activities by type and obtain the corresponding costs. To calculate the cost, the number of hours spent by an employee is multiplied by the rate per hour.
The rate per hour is calculated by using the monthly salary.
For the moment if I group my data by users, I correctly obtain the activities with the corresponding costs.
However, I would like to remove that group by employee clause and group by activities only. And obviously, obtain the correct costs amount.
My current query is as follows:
Code:
SELECT
CONCAT(Title,' ',FirstName,' ',Surname) as Employee,
ACTIVITYTYPE as ActivityType,
TIMESHEETDATA.ACTID as Activity,
SUM(TIME_MON+TIME_TUE+TIME_WED+TIME_THU+TIME_FRI+TIME_SAT+TIME_SUN) as TotalHours,
TRUNCATE(SUM(TIME_MON+TIME_TUE+TIME_WED+TIME_THU+TIME_FRI+TIME_SAT+TIME_SUN)*((BILLINGAMT/20)/9),2) as TotalCost
FROM TIMESHEETDATE INNER JOIN USERDET ON 1=1 INNER JOIN BILLINGDETID ON USERDET.BILLINGID=BILLINGDETID.BILLID
INNER JOIN TIMESHEETDATA ON TIMESHEETDATA.WEEKID=TIMESHEETDATE.WEEKID AND TIMESHEETDATA.LOGINID=USERDET.LOGINID
INNER JOIN ACTIVITYDET ON ACTIVITYDET.ActivityDesc=TIMESHEETDATA.ACTID
INNER JOIN pmuser ON pmuser.BELOWID=timesheetdata.LOGINID WHERE RECSTATUS='APPROVED'
GROUP BY ACTIVITYTYPE,TIMESHEETDATA.ACTID,USERDET.LOGINID
↧
November 12, 2014, 2:37 am
Dear Brilliant users
Currently reports are attached to a form. Is it possible to create two reports( with differnt record sets) and combine them through script to make one report whether using same form or different forms.The point is to insert report inside another report. Currently I am creating different reports and binding outside using pdf writer.
Any help please!! Thanks in advance!
Regards
Asokram
↧
↧
November 12, 2014, 2:39 am
Hello
I am using db2 10.5 with fixpack 4. What i try to achieve is to measure time of importing varius size of blob and measure their read time. I am using table test with columns id of integer type and data of blob with length 2147483647.
Now to the point: for measure reading i am using db2batch - works fine but... i keep getting cli that readed row was truncated. Currently biggest file in table has 12 MB and while running db2batch im using: db2batch -d SAMPLE -a ADMINISTRATOR -f c:\batch.sql -r c:\results.txt -w 2147483647. According to documentation -w is right thing to use if we want to specify how long row can be read but it doesnt seems to be working for me ;/
Second thing: For import i am using command: import from c:\import.dta of del lobs from c:\images modified by lobsinfile insert into administrator."test"
that command works fine in command line but while trying to use it in db2batch i get error regarding backslash.. so my question is - is there a way to "escape" this character so it will be processed by db2batch or is there any other way to make command like that work in db2batch?
↧
November 12, 2014, 4:39 am
I have Postgres 9.1 installed on Windows server 2008 R2 machine having 32 GB RAM. For performance tuning i have to update the shared buffer to 8 GB. But after updating the shared buffer to 8 GB in postgresql.conf file i am not able to start the service. its giving error message "The Postgresql-9.1 - Postgresql server 9.1 serviceon local computer started and then stopped. Some servcies stop automatically if they are not in use by other servcies or programs".
Any one can suggest how can i update the shared buffer. Thanks in advance...
↧
November 12, 2014, 5:27 am
Hi,
I have a AWR retention period of 7 days, now I want to increase it to 60 days.
The tabespace SYSAUX is configured like this:
TABLESPACE:SYSAUX
SpaceTotal(MB): 5000
AutoExtend: YES
MaxSize(MB): 15.000
I'd like to know if there could be problems of growth on Tablespace SYSAUX with a retention period of 60 days, and if we can predict that growth.
Thanks in advace!
↧