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

ERD Help

$
0
0
I've been given an assignment about a hospital. In a particular paragraph it states that:


"A pack can be used in a blood transfusion. A transfusion consists of one or more packs being given to a recipient on a particular date. Unfortunately, when the donation is tested the donor might be found to be unwell. In this case the donor is advised to see their general practitioner (GP) and the donation is wasted (cannot be used)."

I Believe that from this paragraph an entity for Transfusions can be merged, taken into account that previously I outlined Pack as an entity as well. Now when it states that "A transfusion consists of one or more packs being given to a recipient on a particular date." does it mean that a particular data has to be an attribute in an entity?

E-mail from addresses in table

$
0
0
Hi All,

I have a form where a user clicks send e-mail and it is coded to send an email to certain email addresses based on what is entered in the "Employer" and "Division" Text boxes on the form. However, my issue is that I currently have the e-mails written in the code, and if one changes, I need to go in the code to change it.

I'm thinking this can be solved with a table. How would I accomplish a table that houses e-mails that can be used instead of writing them in the code as I have below. Below is an example of my current code.

ElseIf Me.Region = "NORTHERN" And Me.Employer = "ABC" Then

DoCmd.SendObject acQuery, "Employer Email ", "Excel97-Excel2003Workbook(*.xls)", "abc@abc.com;bcd@bcd.com;

Confused with 1 query performance in code

$
0
0
SQL 2005 SP3 ( i know, upgrade... )

This is driving me nuts, I think it is an issue with the developer code, but can't figure out how to prove it to them.

We have a simple query that is executed via a prepared statement with no parameters. The result set is 56,000 rows.

When the SQL is executed via SSMS it takes about 3 seconds to return. When the SQL is executed via java, it always takes 180 seconds to return, when I look at the activity, its always in SUSPENDED STATUS

I've setup a few profiler sessions to capture whats happening and the same execution plan is fired, the same values are returned in read/writes/cpu.

Would them reading the result set in funny cause sql server to report a slow duration?

Anyone got any tips on what I should look at or suggest the developers to look at?


Thanks

Orphaned Tablespace container

$
0
0
Using DB2 Express-C 10.5.4 64bit on Win 7 Pro sp1 I have a 'LARGE' tablespace defined as follows:

CREATE LARGE TABLESPACE INDEXES_LONG IN DATABASE PARTITION GROUP IBMDEFAULTGROUP
PAGESIZE 4096 MANAGED BY AUTOMATIC STORAGE
USING STOGROUP SSD_INDEXES_LONG
AUTORESIZE YES
INITIALSIZE 384 K
MAXSIZE NONE
EXTENTSIZE 16
PREFETCHSIZE 16
BUFFERPOOL INDEXES
DATA TAG NONE
OVERHEAD 0.075000
TRANSFERRATE 0.030000
NO FILE SYSTEM CACHING
DROPPED TABLE RECOVERY ON;

This was recently changed to using automatic storage and moved to SSD containers by using the following command:
ALTER TABLESPACE INDEXES_LONG MANAGED BY AUTOMATIC STORAGE USING STOGROUP SSD_INDEXES_LONG;

The storage group is defined as :

CREATE STOGROUP SSD_INDEXES_LONG ON 'S:\DB2\CONTAINERS\TABLESPACES\SSD_INDEXES_LONG'
OVERHEAD 0.075000
DEVICE READ RATE 500.000000
DATA TAG NONE;

Drive 'S' being a Samsung 830 256gb SSD. My problem however is that the old container was not automatically removed from the 'C' Drive nor has DB2 seemingly released it as it is still defined when querying 'SELECT * FROM TABLE(MON_GET_CONTAINER('',-2)) AS t'

INDEXES_LONG 39 C:\db2\containers\tablespaces\INDEXES_LONG 0 0 FILE_EXTENT_TAG 0 0 0 0 0 2 0 0 0 0 0 1 0 256000 255984 1 3124103852 499273166848 164723785728 0
INDEXES_LONG 39 S:\DB2\CONTAINERS\TABLESPACES\SSD_INDEXES_LONG\DB2 \NODE0000\SQ4TEST\T0000039\C0000000.LRG 1 0 FILE_EXTENT_TAG 1 0 0 0 0 0 0 0 0 0 0 0 0 32 16 1 3894892 230504407040 93031698432 0 12288

I have tried to drop the offending container using the ALTER TABLESPACE command but now seeing as it is now defined as using automatic storage, the drop container command fails.

Anyone got any ideas as to how to get rid of the offending container ?? I have half a dozen or so tables defined using 'LONG IN INDEXES_LONG' in the table definition. I could leave it does not appear to be causing issues, it's just Messy ya know ?

Thanks, Tim.

Creating the DB2 Administration Server - Failing

$
0
0
Hey Guys,

I'm in the middle of doing a vanilla install of the IBM Websphere Commerce installation on Linux. When my installer starts, it attempts to install the OOTB DB2 Database first, but fails and I get the following errors:

Creating the DB2 Administration Server :.......Failure
The Fast Connection Manager (FCM) base port was not specified for the instance
"db2user". Default parameters will be used.

Initializing instance list :.......Success
Command to be run: "cd /opt/apps/IBM/db2/V9.5/;/opt/apps/IBM/db2/V9.5/instance/db2icrt -a server -s ese -u db2fwc1 -p db2c_db2user db2user".
The instance "db2user" has been created successfully.

The value "SVCENAME=db2c_db2user" was set in the DBM CFG file for the "db2user"
instance.

Configuring DB2 instances :.......Success
ERROR: An error occurred while updating the configuration parameter
"DASADM_GROUP" to "daswcg1" for the DB2 Administration Server. The return value
is "-7051".

ERROR: An error occurred while updating the DB2 Administration Server's
configuration with the specified administration group. Ensure the DASADM_GROUP
setting is correct by using the GET ADMIN CONFIGURATION command. To modify the
value of any DB2 Administration Server configuration parameter, use the UPDATE
ADMIN CONFIGURATION command.

I'm not sure how to resolve this error. I've seen some solutions on Windows systems on how to kick this off manually. But haven't found much information on the Linux side of the house. In addition, if you want the full error-log, I have that as well to share.

Any assistance would be greatly appreciated.



Thanks,
Asif

How to use a data in the subreport

$
0
0
I have made a report, to list the employee data as the main report. In one field the employee salary is mentioned. At the end of the field the sum of all employee salaries is shown in a box.
I put a subreport to list the Managers and in one column their salary is shown, with the related sum at the end.
There is a second subreport listing the company costs for different items. Again, the sum of all costs is shown in a box at the end of the field of the itemcosts.

My question: how can we add “sum of employee salaries” and “sum of managers salaries” and “sum of the item costs”? In other words I need a data from a subreport to be added to another data from another sunreport and also to a data in the main from.

All the above reports and subreports come from different unrelated tables.

Thank you

ASP Error

$
0
0
Can any one please help me in that error? Thanks

When I right click in solution explorer and add new item SQL Server Database I got this error:

A network-related or instance specific error occurred while establishing a connection to SQL-Server. The server was not found or it was not accessable. Verify that instance name is correct and SQL Server is configured to allow remote connections. (Provider: SQL network interfaces, error: 26 - Error locating Server // instance specified)

ORIGINAL ERROR

http://ge.tt/3ZR5pZ32/v/0

Help Needed To Fix Compact & Repair Database On Every 5th Close

$
0
0
I have made the Compact Database on Every 5th closing with a glitch that I am unable to fix.
And I need some help here to fix it.

I have made the following
1. Table : CompactCount
2. Module: CompactRoutine
3. Form: SplashScreen

Problems I am facing are as follows:
I have to close startup screen manually 5 time then it triggers compact and repair.
If I exit the Database it does not compact and repair.
Splash Screen must start & minimize , Which it does. But I want it to be hidden and work in the background.


your help is much appreciated.


I have attached a sample DB.

SampleCompactDB.zip
Attached Files

Db2 C express Backup file

$
0
0
Hi,

I have taken a backup from db2 C express & want to restore this backup on other db2 server. The target server is of db2 Express edition. My question is can I run my backup file (taken from Db2 C express) on other Db2 servers(which are not Db2 C express).

MEGA SALE: Alnitech: $90 OFF - Quad Core Xeon E3-1230v3 + 16GB + 2x1T @ $59.99

$
0
0
All of our hardware comes with 24x7 support and well-qualified professional sysadmins available to answer your questions. All server orders are backed by 21-day money-back guarantee.

We have many years of experience, with proven record of customer satisfaction: http://www.serchen.com/company/alnitech/
Order now and join our happy customer's club!

Check out the latest photos of our racks:
  • in Immedion Datacenter (Asheville, NC, USA) here;
  • in Continuum Datacenter (Lombard/Chicago, IL, USA) here.

====================================

1. SUPERMICRO X10SLM-F Xeon E3-1230v3 up to 3.7GHz 2x1000GB

CPU: Quad Core Xeon E3-1230v3 3.3-3.7 GHz, 8MB (4 physical Cores, 8 HT cores)
RAM: 16GB ECC DDR3
HDD: 2x1000GB SATA 7.2K Software RAID1, HOT-SWAP!
Location: Asheville, NC / Lombard, IL
Included:
PROACTIVE BMC LOG MONITORING
100Mbps UNMETERED Port
Gold-level power supply
5 IPs for free
DEDICATED IPMI CONNECTED TO SEPARATE NETWORK (KVM over IP, remote media)

REGULAR PRICE: $149.99/monthly
SALE* PRICE (90_OFF coupon): $59.99/monthly WOW!!
order now

====================================

2. SUPERMICRO X10SLM-F Xeon E3-1230v3 up to 3.7GHz 2x1000GB

CPU: Quad Core Xeon E3-1230v3 3.3-3.7 GHz, 8MB (4 physical Cores, 8 HT cores)
RAM: 8GB ECC DDR3
HDD: 1x1000GB SATA 7.2K (4 drive bays)
Location: Asheville, NC
Included:
PROACTIVE BMC LOG MONITORING
100Mbps UNMETERED Port
Gold-level power supply
5 IPs for free
DEDICATED IPMI CONNECTED TO SEPARATE NETWORK (KVM over IP, remote media)

PRICE: $129.99/monthly
order now

====================================

3. SUPERMICRO X9SRI-F Xeon E5-2620 up to 2.5GHz 2x1000GB

CPU: Hexa Core Xeon E5-2620 2.0-2.5GHz, 15MB (6 physical Cores, 12 HT cores)
RAM: 32GB ECC DDR3
HDD: 2x1000GB SATAIII WD Black 7.2K Software RAID1, HOT-SWAP!
Location: Asheville, NC
Included:
PROACTIVE BMC LOG MONITORING
100Mbps UNMETERED Port
Gold-level power supply
5 IPs for free
DEDICATED IPMI CONNECTED TO SEPARATE NETWORK (KVM over IP, remote media)

REGULAR PRICE: $229.99
SALE PRICE: $169.99/monthly
order now

====================================

4.SUPERMICRO X9DRD-iF Two Xeon E5-2620 2x1000GB

CPU: Hexa Core Xeon E5-2620 2.0-2.5GHz, 15MB (12 physical Cores, 24 HT cores)
RAM: 64GB ECC DDR3
HDD: 2x1000GB SATAIII WD Black 7.2K Software RAID1, HOT-SWAP!
Location: Asheville, NC
Included:
PROACTIVE BMC LOG MONITORING
100Mbps UNMETERED Port
Gold-level power supply
5 IPs for free
DEDICATED IPMI CONNECTED TO SEPARATE NETWORK (KVM over IP, remote media)

PRICE: $329.99/monthly
order now

(*) New signups only, if you are existing Alnitech client, please contact sales for more details.

Adaptive Server Anywhere - Database has entered recovery mode

$
0
0
Hi All,

Due to some issues with our server (that have now been rectified) our ASA 9 Database entered a recovery state at about 10AM.

Currently it is still in this state, and we seem to have no idea if anything is happening, or when it will be completed?

Does anyone have any suggestions?

Wrong representation of Year Data in a table

$
0
0
Hi,

I have a sybase data table, which contain year column. when i queried the data, the year values are shown by containing comma in it. It is not for all the rows. It is only for selected records here and there. This is quite surprising for me.
The year is defined as Integer with precision 10 and length of 4.
I don't understand why this occurs. Please help!.

I have attached the screenshot of sample data for your reference.

Thanks in advance for your help.
Green Lantern
Attached Images

Does (nolock) work in a view?

$
0
0
Let's say I created a view and I wanted to join another view and some tables to form a view. If I put (nolock) at each join, even when I am joining to another view will that help prevent locking? I accidently ran a 40 million row query which locked out production system up and our .net developer had to restart web services etc. I want to prevent doing that again any recommendations so I don't look like an idiot. I usually put nolock in my queries but since I am importing this view into MS Access I don't have control over the locking (I don't think) unless I can mitigate locking at the view.

Thoughts?

I'm very risk averse (scared cat) but sometimes I have to test queries and they may run for 15 minutes or so.

MAX(date) not working

$
0
0
I have a table which stores logs of every user.

I want to retrieve a user latest log

select * from user_logs where user_id=@userId having max(created_date); :eek:

Newbie data base question

$
0
0
First off, im NOT a programmer or someone who works with computers for a living.

Im a fireman for the city of Detroit and the department historian.

I have a project that would require a custom(?) database to help me preserve some of the departments history, and make it accessible to others as well.

I want to put the cities old "Run Cards" into a data base and don't know what program to use, or how to set it up

a run card is a 3x5 paper card, with a number (for the pull box) on it, a street location, a building name if its for a specific school, hospital, factory etc. and the fire companies due on 1st 2nd 3rd alarm etc. there are approximately 10,000 run cards

quick history. In the telegraph (and pre telephone era, fire call boxes were at most street corners and on most major buildings, if you had or saw a fire, you ran to the nearest pull box and PULLED it... that would transmit that specifics call boxes number to the central office... when central office received that number, they would look up that number run card and on the run card would be street location, and fire companies due to that location.

I would need someone to create a template for me. that would look like the run card on the screen, and allow me to enter all the different fields. then I would like to be able to search on any of the fields. So lets say I wanted to search the street Woodward Ave and see all the call boxes that were on Woodward... or maybe I want to search, and see all the locations Engine 10 was first due, or maybe I want to see where a specific call box was, so I can look up box 5734 and have it come up

is this something I can do, as a person who is fairly computer literate, but no programmer... do I need someone smarter than me to do this, and if so, what would a project to create this template costs? Ill obviously do the data entry (at my leisure)

thanks

Shane

function result type must be character varying because of OUT parameters

$
0
0
I am trying to compile the following function , getting an error as "function result type must be character varying because of OUT parameters", Please let me know how to correct this:
create or replace function fn_exec_stage_data_upload
(
p_date in date,
p_position_out out varchar
)
returns integer as $$
declare

l_exit boolean;
l_process_code varchar(10);
l_sysdate date;
l_ret numeric;

begin
l_process_code := 'MRKSTGUP';

l_ret := 1;
l_ret := ibsuplpkg.fn_pop_all_internal_info; -- populate from stage
if l_ret <> 0 then
p_position_out := 'STG_TO_INT';
return 1;
end if;

l_ret := 1;
l_ret := agnupldpkg .fn_build_agenda_master ; -- create agenda
if l_ret <> 0 then
p_position_out := 'AGN_UPLD';
return 1;
end if;

l_ret := 1;
l_ret := egautilpkg.fn_create_agents_auto_till ('O',p_date); -- create opening till
if l_ret <> 0 then
p_position_out := 'AGENT_TILL_CREATE';
return 1;
end if;

p_position_out := 'SUCCESS';

return 0;
exception
when others then
errpkg.pr_dbg('AG',l_process_code,'E',' In WO of fn_exec_stage_data_upload..'||sqlerrm);
return 1;
end ;
$$ language plpgsql;

Job creation in db2

$
0
0
Hi,

I have a procedure as P1 & this procedure is calling some internal procedures. We have a java application to call this P1 on db2 server. My requirement is java application is calling P1 as a procedure till now. Is there any way to create a JOB in db2 server , so that I can place that procedure call in a JOB & that java application can directly call that JOB alone.

I want to create a JOB in db2 without using the Wizard or scheduler. some what like a CREATE JOB ,if exists in db2.

SQL 2008 R2 Matntenance Task time limit

$
0
0
I have a maintenance plan that does the following
Check DB Integrity
Backup DB
Reorg Index
Update Stat
Maintenance Cleanup.

I would like to set a max time limit on reorg index (10 mins) , means after 10 mins it moves on to the next task.
Is there an option in SSMS?

upload a file on oracle

$
0
0
Hi,

I am totally new to oracle. I am Db2 developer. we have a scenario to upload an excel file to an oracle table. I tried on google. I can find some wizards. I want to do this programmatic ally , can some one provide me some package /procedure in oracle

Call SYSPROC.ADMIN_CMD

this is the way how we can do it on db2.
I am looking for da same functionality in oracle too

Need help in displaying Console messages from stored procedure

$
0
0
Hi Everybody,

I have created an external stored procedure using language SQL. I am running the code in As400. So, I want a way to route messages to QSYSOPR from stored procedure. Like in COBOL OR RPG we have commands to display messages in QSYSOPR, I searched a lot but am not able to find out any code that displays console messages from SQL stored procedure. Since, we are in the process of converting COBOL/RPG codes to stored procedures, I can't use any of these languages to display console messages. PRINT, SPOOL commands are not working here. Please suggest. I will appreciate any help that I get.

Thanks,

Abhisek
Viewing all 13329 articles
Browse latest View live