Hi there and welcome to MedHelp.
There are several things that could be going on. Probably #1 is a kidney stone. It could get caught somewhere in route or be stuck in a tender spot in the kidney. Other cause of flank pain are: bladder neoplasm (abnormal growth), urinary tract inection, glomerulonephritis (inflamation in the glomerul part of the kidney), obstructive uropathy, pancreatits, papillary necrosis and cortical necrosis (have no idea what this is), perirenal abscess, polycystic kidney disease, pyelonephritis, renal infraction, renal neoplasm, renal trauma, and renal vein thrombosis. So you can see many thngs "could" cause the pain you're experiencing. Your dr. can probably assist you better in the dx
I think it may be any urinary infection or stone in kidney or UB or URT. so i am agree with karajo
From past experience, just three years ago, I know very well that one doesn't have to have a problem with urine output in order to have renal failure. But, I can tell you, too, that I didn't know there was a problem 'til I started getting such terrible nausea that I had to go to the E.R. Then, I started having the right flank pain--after I was admitted. They told me that one doesn't usually start to feel such pain 'til there is already a significant problem.