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

Verifying DB2 Backups

$
0
0
Hi,
I am trying to put in a script to verify the DB2 backups occasionally. Since we use TSM, I am using db2adutl verify for this. I am stuck with it as I am not able to get the negative return code or find an invalid backup. Also the output from db2adutl verify seems to be too big to store in a file and check for keywords.
Is there a better way to do this? We just want to check/validate the backup.

It will be common to all DB2 versions and used for DBs upto 50GB in size.

Thank you
Abhi

Break data-set into groups of 5000 records

$
0
0
I have a large data set that I want to split into groups of 5000 records so if there are 11000 rows in the table, rows 1 thru 5000 will be labeled 1, 5001 thru 10000 labeled 2, and 10001 thru 11000 labeled 3.

I use NTILE() a lot but that clearly doesnt work in this instance. I am thinking of dividing the row number by 5000 and that result+1 (ignoring the remainder) would be it's group number. Perhaps there is a better way? Maybe a different window function in SQL 2012?

Database Design Help... !

$
0
0
Hello everyone,

I am trying to build a database in filemaker, but i am stuck on the design.

I have a sports team and I want to collect some data for the team.
I have multiple tables but I can't seem to connevt them the right way. I hope somebody can help me out...

Tables :

PLAYERS
PlayerID [PK]
FirstName [text]
LastName [text]
Team [text]

TEAMS
TeamID[PK]
Division[text]
TeamName[text]

SCORES
ScoresID[PK]
Score1[number]
Score2[number]
Score3[number]

Each player can only be in one team. Each player has several weeks of scoring.


Can anyone tell me how to relate the tables?

I tried different possibilities, even with ForeignKeys, but I can't get them to work the way it suppost to be...

Thanx up front...

Problem forming Query coding

$
0
0
Hi Guys & Gals
I am trying to make Access product what I previously created in Excel
Iam hopeless at Coding so Iam trying to do it in a Query
I already know its probably hopless, but here goes

The Excel sheet used two formula to remove a trailing - [dash] from a series
Kinda clever as not all the series have a trailing dash.. so CANT USE TRIM
This was the code =LEFT(B2,LEN(B2)-(RIGHT(B2)="-"))
I would like to duplicate the result in a Query if at all possible

A series of the numbers looks like this

07500-032-23-
07500-032-24-
07500-032-25-
07500-032-26-
07500-032-27-A
07500-032-27-B
07500-032-28-A
07500-032-28-B

output need is

07500-032-23
07500-032-24
07500-032-25
07500-032-26
07500-032-27-A
07500-032-27-B
07500-032-28-A
07500-032-28-B

Any one got any solutions ?
They will be most appreciated

Cheers

Paul

procedure to change properties of subform

$
0
0
Hi

I have created a procedure as following:
Public Sub setFormAttributeSingle(str As String, Optional sub1 As String)
Dim frm As Form
If user_type = 3 Then
DoCmd.OpenForm str, acNormal
Forms(str).RecordsetType = 3
If sub1 = "" Then
Exit Sub
Else
Forms(str).Form(sub1).RecordsetType = 3
End If

Else
DoCmd.OpenForm str, acNormal
Forms(str).RecordsetType = 0
If sub1 = "" Then
Exit Sub
Else
Forms(str)!frm(sub1).RecordsetType = 0
End If
End If
End Sub

This has two parameters one mandatory and one optional. The mandattory parameter (str) is main form and optional parameter (sub1) is subform. Would like to open the forms and make change recordsetype. For main form it works but for subform it does not work. Please refer to Forms(str)!frm(sub1).RecordsetType = 3


Thanks for the help and hints

Function

$
0
0
Hello,

I mostly use database for data storage, and do all the evaluating and manipulating in whatever language I'm programing in. The project I'm currently working on, I'd like to move as many operations as I can into database functions.

I've done some pl/sql in the past, but mostly updating. Today, I am trting to grab values, store them for math operations and return those values.

What I have in my table are objects with x,y,z coordinates, and would like to choose 2,3,4 or more and calculate a cumulative distance between the selected objects. I'm ok to start with just two for now.

So in my function, I know I will need two SELECT queries, like SELECT x,y,z from my_items where id =''. That's easy, but how do I drop the result into a variable so I can later perform the math? The only thing I found so far, is something like:

out1 := SELECT x,y,z from my_items where id ='a'
out2 := SELECT x,y,z from my_items where id ='b'

But that doesn't work; apperently SELECT isn't recognized in that situation. Not a lot of examples on the postgres implementation of pl/sql.

Any hints would be appreciated!

Incrementing numbers using DMax in update query

$
0
0
Hi there,

I am Chris, trying to update the SystemID field using DMax command in update query.
I want to append the records from another table into the main table which has the SystemID field, so I am seeking some help as to what I should put into the query for the SystemID should be updated automatically.

tblListeUpdatedBlockRoyaltyDetails table contains the records I want to transfer to PtblAllPayments which has the SystemID field which should be incremented with this command DMax("SystemID","PtblAllPayments","SystemID")+1

The command simply adds 1 to the last maximum ID number and gives the same number to all the records being transferred PtblAllPayments table

See Attachment for more details
Attached Files

Stakehost.com| Domain| cPanel| 50GB BW|$2.50pm|PM, Bitcoin, & Paypal

$
0
0
Stakehost.com - Secure fast and reliable

Our mission is to provide our customers the best hosting Services. Stakehost Offers the highest quality perfect Money Hosting & Webmoney Shared, Reseller, VPS, Dedicated web hosting and SSL services at the Cheap prices. We make web hosting simple with reliable servers.

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


Share Hosting Features:

- 24/7 Support
- Instant Setup
- FREE Website Migrations
- cPanel Access
- Latest PHP & MySQL versions
- Highest quality service for your website




We Accept:

- Payza(AlertPay)
- Web Money
- Perfect Money
- Skrill(Moneybookers)
- Bitcoin.
- 2Checkout
- PayPal



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


SHARED HOSTING PLANS & PRICES




----------------------------------------------------------
Basic Shared Hosting Plan $2.50/Mo
----------------------------------------------------------

Disk Space: 10GB HDD
Data Transfer: 50GB Bandwidth
Domains: Unlimited
One Click Installer: Softaculous
Account: Cpanel
Cloud: Cloudlinux

ORDER NOW





----------------------------------------------------------
Advanced Shared Hosting Plan $5.00/Mo
----------------------------------------------------------

Disk Space: 30GB HDD
Data Transfer: 90GB Bandwidth
Domains: Unlimited
One Click Installer: Softaculous
Account: Cpanel
Cloud: Cloudlinux

ORDER NOW




----------------------------------------------------------
Professional Shared Hosting Plan $7.5/Mo
----------------------------------------------------------

Disk Space: 60GB HDD
Data Transfer: 200GB bandwidth
Domains: Unlimited
One Click Installer: Softaculous
Account: Cpanel
Cloud: Cloudlinux

ORDER NOW


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


Why Stakehost?


Low Prices - We have our manage servers excellent performance cheap pricing and 24/7 support.
Daily Account Backups - All cPanel accounts are automatically backed up daily, with the ability to retrieve the latest daily.
Money Back Guarantee - If we fail to satisfy you we believe, we offer a full 30 day money back guarantee processed within 24 hours.
Unlimited Features - We offer lots of unlimited features (Domains, Databases, FTP & Emails accounts etc.)


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


If you have any further questions please contact us at sales Create a support ticket


Join the Stakehost

Twitter: http://www.twitter.com/stakehost
Facebook: http://www.facebook.com/stakehost

Implementimg line commit protocol

$
0
0
Someone kindly assist in dealing with Line commit.

With the line commit protocol, sites are connected in a chain, and the sub transaction at the left-hand of the chain initiates the protocol. Propose a crash recovery protocol for a site in the chain. Considering the following three points at which it might occur: and state in each case (1) how the site determines from its log that it is at that point and (2) what action it takes (beyond standard recovery processing).
(a) The site crashes before the first message from its left-hand neighbor arrives.
(b) The site crashes after sending the first message to its neighbor on the right, but before receiving a message from its neighbor on the right.
(c) The site crashes after sending a message to its neighbor on the left but before receiving the second message from its neighbor on the left.

Thanks in advance

Indirect bus between two stops

$
0
0
Hi,
I have bus table having column(bus_id,stop_name,arrival)

I want to find indirect bus between two stops.
Ex:
Source:AA Destination:BB
There is no direct bus from AA->BB
But if we take a bus(1) from AA and drop at CC then again take another bus(2) from CC to reach destination CC,

Output:
bus_id -- stop_name --- bus_id
1 CC- 2

How can we update an column with Foreign key constraint in DB2?

$
0
0
I have 2 Tables , please check images attached

PK: PK.PNG

FK: FK.PNG

P_Id in Pk table is the primary key and P_Id in FK table is the foreign key.

I need to add 10 to all records in P_Id column of both PK and FK table( meaning they need to match always)

I know in MS SQL we can easily update cascade as follows:

ALTER TABLE FK
ADD CONSTRAINT FK_P_Id
FOREIGN KEY (P_Id)
REFERENCES PK (P_Id) ON UPDATE CASCADE

and then update the rows of PK , which will automatically update FK too.

update A
set A.P_Id= A.P_Id + 10
from PK A inner join FK B
on A.P_Id = B.P_Id

But, i am not sure how this works in DB2.. can someone please help?

How can i get this to work?

Thanks in advance
Swat
Attached Images

Queries Informix users Rights scripts or commands

$
0
0
Hello Team ,

I have created the new UNIX users & groups , Now I would like to set the groups permission as per the below mentioned tables

Please help me how to set the permission through commands & also share me the scripts if possible

Below are the tables for your reference.

User Group Name Create DB Tables Insert Update Delete Create SPL Create Function Execute SPL PROC Execute Function
grpdbdev No Yes Yes No yes yes Yes Yes
grpData No Yes Yes No No No Yes Yes
grpRead No No No No No No Yes Yes
grpCore Yes Yes Yes Yes Yes Yes Yes Yes
grpModeler Yes Yes Yes Yes No No Yes Yes
grpAdmin Admin privileges


waiting for an early response

Thanks

Queries Informix users Rights scripts or commands

$
0
0
Hello Team ,

I have created the new UNIX users & groups , Now I would like to set the groups permission as per the below mentioned tables

Please help me how to set the permission through commands & also share me the scripts if possible

Below are the tables for your reference.

users_rights.txt

waiting for an early response
Regards

Prash
Attached Images
Attached Files

DLookup for nearest value

$
0
0
Hi everyone,

I'm looking for a way to replicate a VLookup (with True match setting) in Access VBA, in the sense of a DLookup which if it doesn't find a perfect match, gives the nearest value below the searched value. I have a table of peoples' ages (for the sake of argument (Age_p), and a lookup table of rates (Rates) dependent on 3 fixes ages (Age).

I've tried DLookup("LookupField", "Table", "Criteria")

With Criteria such as Age <= Age_p, Age Between 0 and Age__p and several things, but nothing's worked so far - I keep getting errors or nonsensical results.

For the example values below, I'm looking for something which'll give me 0.05% for any Age_p between 18 and 49.99, 0.07% for Age_p between 50 and 59.99 and 0.01% for any Age_p above 60%.

Rates.JPGRates.JPG

Thanks in advance :)
Attached Images

DMax Looking for the closest date giving "Invalid use of Null"

$
0
0
Hi again,

I thought I'd finally understood DMax properly, and now it's thrown another wrench in the works..

I'm trying to retrieve the highest date (Date_of_Birth) in a table range closest to a calculated variable (var_retirement_date). Date_of_Birth is defined as a Date, as is var_retirement_date, and I have a value for var_retirement_date (15/08/2004), but my DMax function -
var_retire_date = DMax("Date_of_Birth", "TBL_Retire_age_assump_Retirement_age", "Date_of_Birth <= " & var_retirement_date & "")
Keeps giving me the Run-time error 94 - Invalid use of Null, despite the fact it should be impossible, since even if it can't find an exact match, it should take the highest number below it. The end of the Date_of_Birth range is:
...
01/01/1976
01/11/1976
01/04/1978
01/08/1979
01/01/1981

So it should be returning 01/01/1981, right? Anyone know what I'm missing?

Thanks in advance

Integrate Cloud Apps as Easy as 1-2-3 with New Skyvia Package Gallery

$
0
0
Devart announced the release of Skyvia, universal cloud service for no coding data integration, cloud-to-cloud backup and online data management via SQL.


Prague, Czech Republic, 1 December 2016 - Devart, a recognized vendor of database tools and data connectivity solutions, announced the release of Skyvia, all-in-one web service for cloud data integration, backup and management. The new version of Skyvia provides a gallery of predefined integrations, automating most common cloud application integration tasks.


The new Skyvia Package Gallery makes configuring the integration even easier - just select one of preconfigured packages from a gallery, specify connections to the cloud apps, set up a schedule for automatic execution, and that's all. For now Skyvia users can easily automate such common tasks as creation of MailChimp subscribers from Salesforce contacts or leads, creating MailChimp subscribers from Shopify customers, adding new Marketo leads as Salesforce contacts, and many more.


"We've analyzed and gathered the most popular data integration use cases and put them into new Skyvia Gallery of predefined packages.” - said Alex Hyrniy, Skyvia Product Manager. “The idea was to simplify the integration configuration and let Skyvia care about all data integration repetitive tasks, saving the time for more important and less mundane things."


The new templates gallery can be accessed in two ways: directly from user interface on the stage of application package creating or from the Gallery page on Skyvia site. The Gallery page displays both the predefined queries and predefined integration packages. User can quickly filter the gallery by data sources, click the necessary package or query to open its details page and start using it immediately after clicking "Start Integration" button.


For more information about Skyvia, please visit: https://skyvia.com/


About Devart


Devart is one of the leading developers of database tools and administration software, ALM solutions, data providers for various database servers and cloud apps, data integration and backup solutions. The company also implements Web and Mobile development projects.


Learn more about Devart at: https://www.devart.com

DeadLock issue when SP is called parallely

$
0
0
I have a batch code with inserts data in table1. and a SP which will update the same table1 (with update and merge stmt) and will push the data to table2. when SP is called parallel files.. facing dead loock issue.. please help

Data Select (selprof.exe)

$
0
0
Just wondering - is anyone else familiar with Data Select? I use it in my current job as a quick and dirty interface from the iSeries to Office applications. I was trying to automate a process that involves passing parameters to a query, but all my attempts failed. (Either it passed the parameters but did not export the data, or it would export data but only from a version of the query that didn't require parameters.)

If anyone has any experience of controlling it via VBA, please let me know!

Grrrr, cant figure it out how to...

$
0
0
Dear friend

I cant figure it out how to select only data being uniqe

In first table I have f.e. values:

id, item_id, ..., location_id

in second table values:

location_id, ..., is_valid_location (boolean 1 or 0)

table 1:
1 | i1 | 00001
2 | i1 | 00002
3 | i2 | 00003
4 | i3 | 00004


table 2:
00001 | 1
00002 | 0
00003 | 0
00004 | 1


I would like to select row with item_id that is present only on location with boolean 1, but not present within any other location with boolean 0.

In example case result would be:
4 | i3 | 00004 | 00004 | 1

I know I have complicated :rolleyes:

thanks

I could really use some help

$
0
0
Hi all,

I could really use some help. I have very little experience with databases, just what I learned in school about Access and MYSQL, years ago. I work in a SOC and I've been tasked with putting something together to track Client information, installation status, and other basic information like that. And make it so the entire team can access/update that information easily. Right now we just have excel spreadsheets that get emailed back and forth and keep coming across issues with people working off of different versions of the spreadsheet. I've been able to build an Access DB from the spreadsheets and used Infopath to create a form to view and update the information but I can't figure out how to make the search more flexible. It requires the exact spelling and spacing of the client names to work. How can I set it to search using wildcards or seeing that it currently has only 200 entries but is expected to grow substantially, should i just scrap it and use something else to build the db and form?
Viewing all 13329 articles
Browse latest View live