Quantcast
Channel: dBforums – Everything on Databases, Design, Developers and Administrators
Viewing all 13329 articles
Browse latest View live

Guys I need help its urgent

$
0
0
If a patient has phone number with PrimaryPhone flag set to 1, then this phone number should be returned, otherwise first available phone, if patient doesn't have phone number return null.

There are some other conditions to be met, based on the conditions I executed the query successfully and now I need the above condition to be included in this query...

Query:
SELECT [enh].[PatientPersonID],
[enh].[MemberNumber],
[enh].[PromotionGroupID],
[enh].[EnrollmentID],
[ph].[AreaCode],
[ph].[Number],
[enh].[EnrollmentStartDate],
[enh].[EnrollmentEndDate],
[enh].[UpdateDate],
[enh].[UpdateBy]
FROM
[TCPLP].[dbo].[EnrollmentHistory] AS [enh]
JOIN [TCPLP].[dbo].[Person] AS [p] ON ([p].[PersonID]=[enh].[PatientPersonID])
JOIN [TCPLP].[dbo].[PhoneNumber] AS [ph] ON ([ph].[PersonId]=[p].[PersonID])
WHERE (([EnrollmentStatusID] IN ('12', '28', '77')) ) AND [EnrollmentStartDate] BETWEEN ('01-01-2012 00:00:00') AND ('01-08-2013 23:59:59')


Plzz Can anyone tell me what should be included for this?


Thanks
SqlTcard

Connection error in PGAdmin...

$
0
0
Hi.. :)

I just installed a new Centos 6.3 server, upgraded the REMI repositories, and from there, installed postgresql:
yum install postgresql92 postgresql92-devel postgresql92-server postgresql92-libs postgresql92-contrib –y

after that I installed php:
yum --enablerepo=remi,remi-test install php php-common
And the PHP modules:
yum --enablerepo=remi,remi-test install php-pecl-apc php-cli php-pear php-pdo php-mysql php-pgsql php-pecl-mongo php-sqlite php-pecl-memcache php-pecl-memcached php-gd php-mbstring php-mcrypt php-xml

Started the postrgesql database:
service postgresql-9.2 start
Created a password to the postrgresq user, login via VNC, open the pgadmin, but when I tried to create a new database:

An error has ocurred:
Error connecting to the server: definition of service “postgresql-9.2” not found


And I don’t know exactly why is that happening, I’ve checked and everything seems to be installed correctly… :S
So, if someone have any idea and can point me to any direction it will be very helpful..

Ahh, something else, I was in the VNC sesión with the user :1 and suddenly pgadmin hang, so I kill the process from webmin, but after that, it dont let me login with that user, it said: Cant establish a connection since the destiny denies the connection… :S
The other user Works perfectly, but user 1 its pretty much useless… :S
Any idea about that issue can also help me a lot.

Thanks a lot for all your help.

Db2 Database Marked BAD

$
0
0
In a single month, I was forced to face 3 crashes in my productions db. Database is sitting on DB2v9.5.8 32 bit , on a VM. The database has grown recently and when there is a stored procedure is running on a particular table the inconsistency happens.

What the procedure is doing is the following;

insert into DISK_MASTER (host_name,DISK)
select distinct upper(scope.sanitize_hostname(HOST_NAME)),UPPER(ca se when DISPLAYNAME is null then '' else DISPLAYNAME end) from
DISK_TADDM
where host_name is not null and TYPE in('IDE disk','SCSI disk') and in_rollup=0
EXCEPT select upper(host_name),UPPER(disk) from DISK_MASTER;--

the child table got around 2 crore data.

Attaching the error screen shots for expert advice. Now the db2diag.log is flooding with the error

2013-01-13-15.27.13.573000+660 I958809771H539 LEVEL: Error
PID : 2120 TID : 7484 PROC : db2syscs.exe
INSTANCE: DB2 NODE : 000 DB : NABDB
APPHDL : 0-5857 APPID: *LOCAL.DB2.130108061034
AUTHID : DB2ADMIN
EDUID : 7484 EDUNAME: db2agent (NABDB) 0
FUNCTION: DB2 UDB, data protection services, sqlpgWaitForLrecBufferLimit, probe:
410
MESSAGE : Ignore rc:
DATA #1 : Hexdump, 4 bytes
0x042F5B00 : 5101 0F87 Q...

I have a backup, but would like to fix this than a restore.. pls advice ur expert opinion.

Attached Images
File Type: png 1.png (25.8 KB)
File Type: png 2.png (25.7 KB)
File Type: png 3.png (26.0 KB)
File Type: png 4.png (38.8 KB)
File Type: png 5.png (31.4 KB)

How to Implement a Non-RAC (Single Instance with Existing ASM-RAC as storage)

$
0
0
We have an existing RAC on our Data Center and from our DR site We have an IBM AIX that is designed to run a Synchronous Peer to Peer Remote copy(PPRC) that used to copy data to a remote site for Disaster Recovery Purposes.

Scenario will be,

Since that our Server from the DR site have a PPRC capability it used a remote copy of our ASM-RAC (from our Data center) as storage.
Is it possible that we install a Single Instance to our DR-Site and used the copy of our ASM-RAC as storage?

Hope to have another reply from you sir and to other DBA professionals.

regards,

noli

Database Report Summary Help

$
0
0
Hi All,

My first topic here and I hope I will be able to find a solution to my problem here.

I have a data table and I've created report from that table. Data table contains data for Area, Store and sales, cost and profit data on different column.

I have created a report that gives me data by Store and it works fine.

But I want to create a report that gives me summary by area. When I try to do that detail section repeats so many lines instead of giving me total for each area.
I mean if one of area contains 3 store than it's not showing me total of 3 stores instead it shows me 3 different line and 3 different figures instead of 1 in detail section.

Can any one please let me know how can I have summary?

Thanks.

Newbie Needs some help!

$
0
0
I have a table that has multiple columns, but what I'm trying to do is stumping me.

In the ATTRIBUTES column, I need the following entry: (just as it is, quotes and all)

<?xml version="1.0" encoding="UTF-8" standalone="no"?><!DOCTYPE properties SYSTEM "http://java.sun.com/dtd/properties.dtd"><properties><entry key="BUYCREDIT">0.8</entry><entry key="BUYCASH">0.15</entry></properties>

I need it to generate with a trigger based on two other columns in the table. The 0.8 is in the column "credittradevalue" while the 0.15 is in the column called "cashtradevalue"


I would appreciate any help with this!!

Let's map all the SGA components

$
0
0
Hi guys,
I've been trying to obtain ALL the components in the SGA, I want to create a complete map of it and a way to look how much memory each component consume, I want to share this once I have it done....BUT...I can't find a way to see the amount of memory the REDO BUFFER is consuming....

I attached a couple of docs if you are interested, they are my first attempt to create a map of the SGA, they need more work...obviously ;)

I expect we all can work on this!!

Attached Images
File Type: png SGAv0.1.png (21.8 KB)
Attached Files
File Type: zip SGAv0.1.zip (72.4 KB)

Let's map all the SGA components

$
0
0
Hi guys,
I've been trying to obtain ALL the components in the SGA, I want to create a complete map of it and a way to look how much memory each component consume, I want to share this once I have it done....BUT...I can't find a way to see the amount of memory the REDO BUFFER is consuming....

I attached a couple of docs if you are interested, they are my first attempt to create a map of the SGA, they need more work...obviously ;)

I expect we all can work on this!!

Adding A Simple Counter

$
0
0
Greetings,
This is a very basic request for help but after searching and attempting to define a simple counter is proving to be a wasted effort therefore I am seeking guidance from this community. I have a 'For Each...' command in a program and it is looping through just as it should; however, for testing purposes, I want a message to appear every time the program completes a loop - so far, this much works. What I cannot seem to do is add a variable that can count/increment the number of loops. I have tried adding this simple variable (count=count+1) but I can find no means to add it. The user guide shows an example like this:

For Each Record from [$rset]
Simple Math: [FieldA]=[FieldA]+1
Next Item

It looks deceptively simply but I am having zero success in adding this variable. How can I add this 'Simple Math'? I have seriously attempted all options in the 'Script Designer' for 'Add Variable' that I can find and I cannot even add '1' to a number. Please help...

Missing records from a simple calculation query

$
0
0
Hello,

I've been working on a query to calculate the total of several fields for each of my records.

I don't have any filters running all the query does is simply pull up the information and add the calculated field -- or at least that's what I want it to do.

It does do the calculation, but for some reason out of my 564 records, it only does this for 268 records and I can't seem to fathom why its not showing them all?

I've checked my records to check for blank fields and there are none.

Any advice or guidance you can provide would be greatly appreciated.

Review Assistant 1.2 get the code review process to a whole new level

$
0
0
New version of Devart's code review tool, Review Assistant 1.2, comprises new features, overall performance improvements, and various minor bug fixes, detected and kindly reported by the users.

Review Assistant advancements:
  • Windows authentication support
Devart's code review tool includes supports for Windows Active Directory. Bulk users can be added from the Active Directory. Now Windows authentication credentials can be used to access a Review Account.
  • Improved Code Compare integration
Review Assistant has an option to comfortably integrate with Code Compare, that substantially facilitates and improves a code review process.The latest version expands commenting options for users, now comments can be added to the comparison even if it opened through an external Version Control System: Git, SVN, Mercurial or Visual Studio Team Foundation Server interface.
  • Support for Visual Studio 2012 diff tool
Code commenting features of Review Assistant are available even when using Visual Studio diff windows to review the differences between two files or versions of the same file.
  • Reply editing is supported
A completely new Review Assistant feature allows users to edit comments anytime after they were posted. This way, if a mistake was made while responding to the author's comments, it can be easily fixed.
  • Refresh speed is increased
Devart has optimized the data communication between the client and the server. Now the client receives updated data only. This approach reduces network traffic, and thus increases the refresh speed.
  • Free Edition
Review Assistant has a completely free edition which comprises all the features of the full version and perfectly suits for small team. Free edition supports up to 3 users and 1 project.

Access 2010 date AND time selector

$
0
0
I've been searching around online and in these forums, but have not yet found a solution to this quesiton. The closest thing that I've found is the following link:
Access Help and How-to - Microsoft Office Time Picker; Date Picker; Date Time Picker - UtterAccess Discussion Forums, but it does not work in Access 2010.

I am looking to create a form that allows for a date and time selection window that would become the selection criteria for a set of queries using a general date format "MM/DD/YYYY HH:MM:SS AM". My reason for this is to keep production data from my 3rd shift, which starts at 10:30pm, continuous.

What I would like to be able to do is have a pair of date/time pickers that would allow the selection from "1/10/2012 10:00:00PM" to "1/11/2012 3:00:00PM" to cover a single days 3rd and 1st shift production.

I have thought about separating the date/time into two separate fields and running separate date/time selection boxes for the start/finish, but i feel that this would lead to potential reporting errors.

Another option that would be very nice would allow the user to select a given date, say 1/14/12 and have the application automatically set the date range from 10:00:00 PM on 1/13/12 to 10:00:00PM on 1/14/12...so if this is an option i'm all ears.

any help is much appreicated.

Thanks

HC

Convert in words

$
0
0
How can I covert a number in words. e.g If I entry 504 in a cell then Five hundred and four will display in another cell. Is it possible?

SELECT issues

$
0
0
I have two SELECTS that grab the info that I need to create a csv file.

$result = mysql_query("SELECT product_attribute.supplier_reference, product.price, product.wholesale_price
FROM product_attribute, product
WHERE product.id_product = product_attribute.id_product");

$result = mysql_query("SELECT product_supplier.product_supplier_reference, product.price, product.wholesale_price
FROM product_supplier, product
WHERE product.id_product = product_supplier.id_product");

Basically, I want the first one to run complete. It's fine as is.

For the second one I want to eliminate any records where product.id_product was present in the first SELECT and add the rest to the csv.

Any ideas?

TIA!

Ron

A DRDA Conversational Protocol Error was detected

$
0
0
Hi Folks,

I am getting below error while Test the Connectivity using JDBC Driver In DB2, Can you please help me to fix this

The test connection operation failed for data source MARSDB2DS1 on server server1 at node mavzl4076etNode02 with the following exception: java.sql.SQLException: Execution failed due to a distribution protocol error that caused deallocation of the conversation. A DRDA Conversational Protocol Error was detected. Reason: 0x1245 DB2ConnectionCorrelator: nullDSRA0010E: SQL State = 58009, Error Code = -4,499. View JVM logs for further details. I am using Integrated Solution Console as a Front End for updation,

Regards
Anbarasan A

DB2 Backup vs Compress backup

$
0
0
hi,

DB2 9.7 fp 4 /Win 2008 R2 (8GB RAM / 6 CPU)

I take daily online database backup (only 1 database, 500GB size) and it takes around 50 minutes.
It is Unthrottled backup. The backup command i use is :

BACKUP DATABASE MYDB ONLINE TO X:\DB2BACKUP INCLUDE LOGS WITHOUT PROMPTING;

As the Database grows faster, I need big disk space to store the backup file.
So, I use the COMPRESS command to take a backup. But not it takes 3 hours to complete the backup and compredd around 65%.

Is there any way to speed up the backup (I am looking to do under 2 hours)

Any suggestions .....

Thanks in advance.

distributed_lock_timeout

$
0
0
What if we increase the value of distributed_lock_timeout? The default value is 60 seconds? If we increase the value is there any performance issues?

8k page size tablespace without 8k page size temp tablespace

$
0
0
Hi All,
our database has one 8k page size user tablespace but ex-DBA has not created 8k page size temporary tablespace.

my question is if tables into 8k tablespace need to be sorted or ... and use temp tablespace, are they use 4k default temp tablespace ? what db2 does in this case ?

Thank you in advance for your help

db2 Update Trigger help?

$
0
0
I'm using DB2 9.7 with AIX 6.1. I'm new to Triggers.
I'm working on an Update trigger that if the first Table updates rows it would automatically update the second Table with the same updates.

Here is what I have so far (Update SLDCTO field) and it updates the first table (F42199) but not the second table(F42199_PART):

db2 "create trigger DB2INST1.F42199_PART_UT after update on PRODDTA.F42199 REFERENCING old AS O FOR EACH ROW MODE DB2SQL
update PRODDTA.F42199_PART AS N
set N.SLDCTO=O.SLDCTO
WHERE O.SLKCOO=N.SLKCOO and O.SLDOCO=N.SLDOCO and O.SLDCTO=N.SLDCTO and O.SLLNID=N.SLLNID"

I do appreciate your help on this because I am not getting this to work and really need an experieced person to assist me on what is wrong.

Thank you so much.

CC

Sybase ODBC driver issue

$
0
0
Hi,

Existing VC++ code is working fine while connecting through “Intersolv 3.6 driver 32" bit drivers to Sybase database but getting error while connecting to the database through Sybase ASE 15.5 drivers.

Attached Images
File Type: png Error.png (13.8 KB)
Viewing all 13329 articles
Browse latest View live


Latest Images