SQL queries for UDMs
Data Not Applied (logs)
Data Not Received (logs)
Data Guard Status
We are unable to add above metrices to rules in GC R2. So we are are planning to monitor them as UDM. Anybody can provide us with queries that would be needed to have metrices as UDMS.
Help will be really aapreciated.
TIA
Saaya
I went down that path. It is a dead end if you are thinking of using SQL UDM. SQL UDM require database credentials. In the UDM screen there is no connect as sysdba option. You can only specify username and password. Standby databases are in recovery mode. You will be not be able to connect to them without sysdba or sysoper.
You could setup up a host UDM. It is quite a lot of effort to do that.
Similar Messages
-
Hi, Can I use Microsoft SQL Server Management Studio version 11.0 to write SQL queries for "SQL Server Compact 4.0 Local Database" ?
When I use Connect Object Explorer, the "Connect to Server" dialog box which pops up has only 4 selections in the Server Type Drop Down List. They are Database Engine, Analysis Services, Reporting Services & Integration Services. I have read
somewhere that there should be a compact database option. but I do not see it.
What I would like to do is use free form SQL Queries against the tables in "SQL Server Compact 4.0 Local Database" .
Once I have validated these queries, then I will use them in my Visual Studio 2012 C#, ASP.NET application. I created the Local Database using Visual Studio 2012 for use by my application.
Thank you for your help..
diana4Hello,
With SSMS 2005 we have had the Option to work with SQL CE database files, but not with higher Version of SSMS.
You can use the free SQL CE Toolbax instead; see
http://sqlcetoolbox.codeplex.com/
Olaf Helper
[ Blog] [ Xing] [ MVP] -
Sql queries for retrieving setups data for functional modules
Hi,
Can anyone give me the sql queries for retrieving setups data for functional modules (GL, AP, AR, FA, and CM) from Database.Hi,
Can anyone give me the sql queries for retrieving setups data for functional modules (GL, AP, AR, FA, and CM) from Database. -
SQL queries for finding values in 4 different tables
I need to have certain queries to find specific data in this table, this is just an example table, but I will use the same ideas for my actual website and database.
customers (customerID: integer, fName: string, lName: string)
items (itemID: integer, description: string, price: float)
orders (orderID: integer, itemID: integer, aID: integer, customerID: integer, date: date)
addresses (aID: integer, housenum: integer, streetName: string, town:string, state: string, zip:integer)
Values I need to find are
List the town, first name, and last name of any customer who has shipped an item to the same town as another customer.
Return the average amount of money each customer spent in March of 2013. (Note that the answer will be a single number
List the first and last names of all customers who have had the same item shipped to at least two different addresses.
List the top two states that have generated the most total revenue and the revenue they generated
I did try a few different queries, for #3 I tried
SELECT customers.fName,
customers.lName,
COUNT(orders.itemID) AS `total items with diff address >= 2`
FROM customers
JOIN (SELECT customerID,itemID,
COUNT(DISTINCT aID) AS diff_address
FROM orders
GROUP BY orders.itemID
HAVING diff_address >= 2
) AS orders
ON orders.customerID = customers.customerID
but I only got 1 result, and I do not think thats correct.
Thanks for the help and I appreciate you taking the time to help meWhy not post the sample data + desired result? Always state what version you are using.
SELECT lname,A.aID,COUNT(*) cnt FROM customers C JOIN orders O ON c.Customerid=O.Customerid
JOIN address A ON A.aID=O.aID
GROUP BY lname,aID
Sorry cannot test it right now...
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
Tricky sql queries for interview preparation
Hi,
I need tricky sql queries as preparation for interview.
pls let me know if anybody has the such queries website address.
or
if you have materials pls mail me on
[email protected]
thnxNKU wrote:
Great Work Kamran....:-)
Regards,
Navneet;)
Kamran Agayev A. (10g OCP)
http://kamranagayev.wordpress.com
[Step by Step install Oracle on Linux and Automate the installation using Shell Script |http://kamranagayev.wordpress.com/2009/05/01/step-by-step-installing-oracle-database-10g-release-2-on-linux-centos-and-automate-the-installation-using-linux-shell-script/] -
Hi Friends,
I Have a view named - item_sales with 4 column
Item code
Item name
Transaction_YYYYMM (Date stored in YYYYMM format )
QTY_RECEIVED
QTY_SOLD
Sample data is
ITEM_CODE ITEM NAME TRANSACTION_YYYMM QTY_RECD QTY_SOLD
AX TSHIRT 201307 3000 2000
AX TSHIRT 201308 2000 500
AX TSHIRT 201309 1000 3000
CX XLSHIRT 201307 3000 2000
CX XLSHIRT 201308 3000 2500
CX XLSHIRT 201309 3000 2500
EVERY MONTH END I WILL RUN THIS QUERY TO FIND OUT THE BELOW DETAILS
1. TO FIND ITEM_NAME WISE - QTY_RECEIVED AND QTY_SOLD ( FOR CURRENT MONTH - EXAMPLE SEP )
2. TO FIND ITEM_NAME WISE - QTY_RECEIVED AND QTY_SOLD (FOR CURRENT YEAR EXAMPLE FROM JAN TO SEP )
OUTPUT FOR SEPTEMBER MONTH LOOK LIKE THIS
SEP-MONTH JAN TO SEP
ITEM_CODE ITEM_NAME QTY_RECEIVED QTY_SOLD QTY_RECEIVED QTY_SOLD
AX TSHIRT 1000 3000 6000 5500
CX XLSHIRT 3000 2000 9000 7000
Pls advise me how to write queries for this
RdkJust FYI, you *can* edit your own posts, you know
Rdk wrote:
Transaction_YYYYMM (Date stored in YYYYMM format )
First "problem". Don't store dates as string. Store them as dates. It will save you so much headache don't the road you won't believe it.
True, this is a view, so maybe not as critical - assuming the underlying *DATA* is actually a date.
1. TO FIND ITEM_NAME WISE - QTY_RECEIVED AND QTY_SOLD ( FOR CURRENT MONTH - EXAMPLE SEP )
2. TO FIND ITEM_NAME WISE - QTY_RECEIVED AND QTY_SOLD (FOR CURRENT YEAR EXAMPLE FROM JAN TO SEP )
So yeah, based on these requirements, I'd recommend you make that column a DATE, not a string. Dates are easier to parse for date-related logic - such as month by month as you need here.
Using that, here's one way to do it:
with w_data as (
select 'AX' item_code, 'TSHIRT ' item_name, to_date('20130701','yyyymmdd') trans_dt, 3000 qty_recd, 2000 qty_sold from dual union all
select 'AX' , 'TSHIRT ' , to_date('20130801','yyyymmdd') , 2000 , 500 from dual union all
select 'AX' , 'TSHIRT ' , to_date('20130901','yyyymmdd') , 1000 , 3000 from dual union all
select 'CX' , 'XLSHIRT' , to_date('20130701','yyyymmdd') , 3000 , 2000 from dual union all
select 'CX' , 'XLSHIRT' , to_date('20130801','yyyymmdd') , 3000 , 2500 from dual union all
select 'CX' , 'XLSHIRT' , to_date('20130901','yyyymmdd') , 3000 , 2500 from dual
w_base as (
select item_code, item_name, trans_dt, qty_recd, qty_sold,
sum(qty_recd) over (partition by item_code, trunc(trans_dt, 'MM')) mm_recd,
sum(qty_sold) over (partition by item_code, trunc(trans_dt, 'MM')) mm_sold,
sum(qty_recd) over (partition by item_code, trunc(trans_dt, 'YY')) yy_recd,
sum(qty_sold) over (partition by item_code, trunc(trans_dt, 'YY')) yy_sold,
row_number() over (partition by item_code order by trans_dt desc) rnum
from w_data d
Select item_code, item_name, mm_recd, mm_sold, yy_recd, yy_sold
from w_base
where rnum = 1
IT ITEM_NA MM_RECD MM_SOLD YY_RECD YY_SOLD
AX TSHIRT 1000 3000 6000 5500
CX XLSHIRT 3000 2500 9000 7000 -
Hello All,
Can any body give me the total SQL queries which will be used in SAP.
Thanks&Regards,
Praveen KondabalaHi,
If you do need that kind of information, then it is easier that you do not use any.
> Like Oracle DBA
you only need to read the documentation about
1) brtools
2) dbacockpit (I assume you have a fairly recent SAP version)
you can find the information about this two "things" in
SAP on Oracle -
Sql queries for this database schema
1) Patient—PatientID, Name, DOB
2) Doctor—DoctorID, Name, MedLicenseNumber, Phone
3) Medication—MedicationID, BrandName, GenericName
4) Prescription—PrescriptionID, Date, PatientID, PrescriberID, MedicationID
Specify the SQL queries to retrieve:
a) The prescription information along with patient name, DOB, medication brand name, and prescribing doctor name sorted by most recent date.
b) The most prescribed generic medication nameLooks like assignment question to me
a, seems to be a case of straight forward join among all the involved tables on common fields. Suggest you learn about joins and try it out yourself.
see below link
http://www.w3schools.com/sql/sql_join.asp
b, Have a look at GROUP BY. you need to apply group by and take medicine name which repeats maximum (ie largest count value)
see
http://www.w3schools.com/sql/sql_groupby.asp
Please Mark This As Answer if it helps to solve the issue Visakh ---------------------------- http://visakhm.blogspot.com/ https://www.facebook.com/VmBlogs -
SQL Queries for open sales orders with no invoice.
Hello all!
Is there a way to make a query to find out if there are any uninvoiced sales orders older than 5 days? I am having difficulty figuring out how the invoice is linked to the sales order.
I am more familiar with excel than SQL but I'm guessing it will be similar to the following:
SELECT * FROM ORDR WHERE today's date - posting date>5 AND (not sure what to check here for the invoice having been created)
**Note: my syntax is of course not exactly correct, this is just to give you an idea of what I'm looking for
Has anyone had to do this before or know how it would be done? It would be very useful for me.
Thanks!
MikeHi Mike
The document link is built on row level so the RDR1 should be used instead of ORDR to server your propose.
You could use this query to get all the lines do not link to a invoice.
*targettype 13 refers to target document invoice
select t0.docentry,t0.docdate,t0.linenum,t0.itemcode,t0.quantity,t0.price,t0.linetotal
from rdr1 t0 join ordr t1 on t0.docentry= t1.docentry
where t0.trgetentry is null and t0.DocDate < dateadd("d",-5, getdate()) and t1.docstatus = 'O'
or just use this query instead to find those lines do not link to any document
select t0.docentry,t0.docdate,t0.linenum,t0.itemcode,t0.quantity,t0.price,t0.linetotal
from rdr1 t0 join ordr t1 on t0.docentry= t1.docentry
where t0.targettype !='13' and t0.DocDate < dateadd("d",-5, getdate()) and t1.docstatus = 'O'
Please modify the code according to your needs.
Regards,
Syn Qin
SAP Business One Forums Team
Edited by: Syn Qin on Aug 11, 2008 5:20 AM -
Hello,
I have quite strange question related to my research.
Probabley within Oracle DB there is some dynamic library which is parsing SQL queries,
for example.
SELECT * FROM schema.table which is able to extract informations from SQL listed above that we want to display all columns from selected table.
When this construction is valid ( SQL standard ) the next step is verification the object existence in DB. It means
that there are two separated actions which are analyzing queries.
I need only first part of that process, which will give me informations about all object used in SQL query
is it possible to accomodate that internal parser witin stand alone middleware like Weblogic Event Server ?
I can do it with regular expression patters, but it's not going to be fast and effective for subqueries and all advanced
constructions for DHW like MODEL, etc.
Thank You,
R.>
http://search.cpan.org/~rehsack/SQL-Statement-1.23/lib/SQL/Statement.pm
BUGS AND LIMITATIONS ^
* currently we treat NULL and '' as the same - eventually fix
* No nested C-style comments allowed as SQL99 says
>
That's the reason why I want to use dedicated for 11g EE library ;-)
Thanks for quick reply -
Handling DST in SQL Query for UCCX Custom Report
We wrote all custom reports for one of the call centers using our UCCX deployment. One problem we see we will hit in the future is DST. We suggested they use UTC but they wanted to see the call data based off of EST timezone. Right now we are okay because we use -5 to get the correct data but come March we are wondering how to address the issue. What options do we have? How are other people handling DST with the SQL queries for custom reporting? I see that the HR client will determine this based off of the local computer time then gives you the option to use UTC. We have all of our queries in an Excel document that the customer just needs to open and select Refresh All to update their data.
Thanks"case-when" statements are evaluated in order.
so you must do something like this:
SELECT
CASE WHEN <is not number>THEN 'N'
CASE WHEN <is greater than 0>THEN 'Y'
Now "<is greater than 0>" will always have number for input, can't get "not number" error there.
See this thread:
Re: regular expression: integer is between N..M
Edited by: CharlesRoos on May 27, 2010 5:03 AM -
Want to practice SQL queries, do I need to download SQL editor
Hi All,
I have a doubt..
I want to practice SQL queries. for this, do I need to download SQL editor and Intall or If I download any Oracle version, does it will have SQL editor? please anyone answer my question.I'm not sure how is it related to Peoplesoft, but if you installed an Oracle client on your client machine, then you have SQL*Plus or SQL Developer.
Nicolas. -
Links with sql queries to practice
Hi all,
Can someone give me the links with sql queries for practice to preparing for OCP
Thanks
Shekar.Hi,
Can u repost?? as its very difficult to understand ur problem.
Vasu Natari. -
Nested SQL statements for complex, detailed queries.
Is it possible to write nested SQL statements for complex, detailed queries. A nested query
has a WHERE clause that includes a SELECT statement ? Is it true or false ?Hi wahid,
Here are pretty good examples:
http://www.databasejournal.com/features/mssql/article.php/3464481/Using-a-Subquery-in-a-T-SQL-Statement.htm
http://technet.microsoft.com/en-us/library/aa213252(v=sql.80).aspx
Regards Harsh -
Developing portlets for dummies (sql queries)
Hello, I've been trying to build a dynamic menu. First I went with just plain old plsql: i created a function in the portal schema that returns an unordered, nested list of the pages in my pagegroup and called that function in a regular pl/sql item on my portal page. I did this by querying the wwpob_page$ table and that went just great in my test&development setup (of which I am the admin of course :))
Then I realized that since I'm not an administrator of the server hosting our portal and I only have very limited privileges (I am only a page group administrator) I will probably not be allowed to utilize this function nor will they agree to install it in the portal schema, and I decided I should build a portlet that does the same thing (so it can be registered and so on, and so it can use the synonyms and tools that are available to registered providers). There already is such a portlet (and provider) registered for use in the target portal, but I don't like it because i uses tables and hard-coded styles so I will cook my own, better version. :)
So I downloaded an example portlet and am getting the hang of it, but now I just can't for the life of me figure out how to enable any sql-queries. I have run the provsyns-.sql script, logged in as test_provider/portal and installed my portlet-package as test_provider user. I can see the available pl/sql packages in Toad, but there are no tables or views for me to to see. That means I can't query the portal tables that I need to.
edit: ok, stupid user error; I suck at using Toad, so I was looking at the wrong schema altogether :D So now i see the public views and packages, so forget that bit of the question.
But still, I cannot see even wwsbr_all_folders -view, much less the wwpob_page$ -table. I cannot see any way to find the pages that are in my page group. Somehow it must be doable, right?
Have I done something wrong, missed a step in enabling my test-provider / schema perhaps? I don't really know what I'm doing, but I followed instructions here: http://home.c2i.net/toreingolf/oracle/portal/my_first_plsql_portlet.htm (excellent instructions, thanks!)
So should my portlet be able to access those tables or not? How the heck has the third partly portlet maker done it?
i'm on OracleAS Portal 10g Release 2 (10.1.4)
Edited by: Baguette on 23-Apr-2009 05:13
Edited by: Baguette on 23-Apr-2009 05:32i see your perspective now. and let me give a perspective to my first reply too.
what i proposed to you was the answer of what i quoted in the message. that is, why didn't you see those views in the new schema you created! and it is still ok but it is done in the portal schema for which you should have privielges too and i assumed you had. my mistake!
now, i can relate your privacy concerns with your earlier message:
Hello, I've been trying to build a dynamic menu. First I went with just plain old plsql: i created a function in the portal schema that returns an unordered, nested list of the pages in my pagegroup and called that function in a regular pl/sql item on my portal page. I did this by querying the wwpob_page$ table and that went just great in my test&development setup (of which I am the admin of course :))
+Then I realized that since I'm not an administrator of the server hosting our portal and I only have very limited privileges (I am only a page group administrator) I will probably not be allowed to utilize this function nor will they agree to install it in the portal schema, and I decided I should build a portlet that does the same thing (so it can be registered and so on, and so it can use the synonyms and tools that are available to registered providers). There already is such a portlet (and provider) registered for use in the target portal, but I don't like it because i uses tables and hard-coded styles so I will cook my own, better version. :)+
+So I downloaded an example portlet and am getting the hang of it, but now I just can't for the life of me figure out how to enable any sql-queries. I have run the provsyns-.sql script, logged in as test_provider/portal and installed my portlet-package as test_provider user. I can see the available pl/sql packages in Toad, but there are no tables or views for me to to see. That means I can't query the portal tables that I need to.+
- by downloading an example portlet, you probably mean you created a new schema. because provsyns work on a schema.
- if you are not the administrator of the portal, and may not be able to access some portions of the portal, it means that you do not use the portal user (the user which serves as the owner of the portal schema).
- now, your plan to create a new schema and give those privielges would still not work. because, by creating a new schema you cannot sneak in to the oriignal portal schema if you do not have privileges to do it. obvious, right? otherwise, it would be a vulnerability of the software that you can see what you are not allowed to see by creating a new schema.
- however, there is a bright side here. the views give records based on your privileges.
- so if your administrators have generated them already or if they generate on the original portal schema, then you may see the pages and items that you have privileges to see and no more.
so now, you may ask the administrators if they have already done it, and if not, then if they would be willing to do it.
hope that helps!
AMN
Maybe you are looking for
-
[HELP!] My charger isn't working for some reason.
Hey everyone! I am having a problem with my charger. I can't quite clarify if it's broken or not, but I know that there is something wrong with my computer or the charger itself. As a mac user, I've gone through 2 chargers so far. I'm currently on my
-
"Edit Menu in Photoshop" not working?
If you have installed a new version of Photoshop, you may find that the command to "Edit Menu in Photoshop" no longer works. The fix for this is simple. Just re-associate the .PSD extension with the new version of Photoshop. You can do this in a coup
-
Possible to create medium res .pdf file with InDesign CS5?
Hello, Can anyone tell me if there is a way to create a medium res .pdf file with InDesign CS5? I'm working with a client and have been sending him both high res and low res files of a catalog project. High res .pdf is 12.8MB and low res is 1.2MB. He
-
How do I make URLs appear when FF opens @ a site?
In the address/URL bar, when I open any desktop link/shortcut or open a website link in to a new window, or tab, there is no address showing. I have to be at the website, then click any internal link, and the URL appears. Process: FF is default brows
-
I upgraded itunes and it has totally crashed.
Itunes was working fine on my new computer running windows 8 until I got the usual invitation to upgrade to the current version. I accepted and it did its thing, and there was a message saying that the upgrade would not be complete until I restarted