Where is sys.v_$parameters view?
I have installed a designer6i, and then i click the button in Repository Administration utility to create objects for designer.
a error appeared: you have not select privilege for view sys.v_$parameters view, but i can not found this view in sys user, i just found v_$parameter and v_$parameter2, my oracle is oracle817 for linux. who can help me . thanks
RUN SQL8.0 PLUS @\REPADM61\UTL\CKROROLE.SQL
Similar Messages
-
Sys.objects system view
Hi,
The sys.objects contains a column known as Type. Can anyone help to explain the difference between these 2 possible types: SQL_INLINE_TABLE_VALUED_FUNCTION and SQL_TABLE_VALUED_FUNCTION?
ThanksInline table valued function example from BOL:
CREATE FUNCTION dbo.itvf_authors ( @au_lname VARCHAR(40) )
RETURNS TABLE
RETURN
SELECT au_id, au_fname, au_lname, city, state
FROM authors
WHERE au_lname = @au_lname
go
LINK:
http://technet.microsoft.com/en-us/library/aa175924(v=sql.80).aspx
Think of ITVF as a parameterized view.
TVF/ITVF blog:
http://www.sqlusa.com/bestpractices/training/scripts/userdefinedfunction/
Kalman Toth Database & OLAP Architect
SQL Server 2014 Design & Programming
New Book / Kindle: Exam 70-461 Bootcamp: Querying Microsoft SQL Server 2012 -
Can AnyOne Explain Parameterized View with Example
Explain the parameterized view with example
Cathrin wrote:
Hi ,
I have created a view...
CREATE OR REPLACE VIEW V_UNITS_UNITMOVEMENT_AMTEST(fromdate varchar,todate varchar)
... 127 more lines (no kidding)
Group By A.Code,A.UDate,B.Scheme_Description,A.DividendOption,C.DividendType_Name,A.NAV,A.Units
when i execute i get this error ...
ORA-00907: missing right parenthesis
what should i do?First, indent your code to show the extent of structures that extend over several lines, such as subqueries, CASE expressions, or function calls that have nexted arguments.
Make parentheses line up so that, if a ) has to be lines away from its matching (, then are indented the same amount, with nothing except white space between them.
When posting code (or any formatted text) on this site, type these 6 characters:
\(small letters only, inside curly brackets) before and after sections of formatted text, to preserve spacing.
Note that "ORA-00907: missing right parenthesis" doesn't always mean you have unbalanced parentheses. Often, it just means that something (such as an Oracle keyword) appears at a point where it doesn't make sense, but where a ) would make sense.
Second, develop code in very small increments. Take baby steps. Start with a very small, simple query, test it, then add one or two more lines. When you get a mysterious error like "ORA-00907: missing right parenthesis", chances are there was a mistake in the one or two lines you just added. -
Creating parameterized views in oracle11g
I have a big query with nesting and left join and Ineed to create a view out of it so as not to run it from the application. The issue is I need the date range and some other fields as input parameters since it will vary from the front end for each request. I just looked up and saw some posts referring to using SYS_CONTEXT for parameterized views and need to know exactly how do I create the view for example with 2 parameters - fromdate, todate and how I invoke the view from the application.
Just for info I am using grails/groovy for developing the application. and here is the query I want to create view out of..
select
d.dateInRange as dateval,
eventdesc,
nvl(td.dist_ucnt, 0) as dist_ucnt
from (
select
to_date(fromdate,'dd-mon-yyyy') + rownum - 1 as dateInRange
from all_objects
where rownum <= to_date(fromdate,'dd-mon-yyyy') - to_date(todate,'dd-mon-yyyy') + 1
) d
left join (
select
to_char(user_transaction.transdate,'dd-mon-yyyy') as currentdate,
count(distinct(grauser_id)) as dist_ucnt,
eventdesc
from
gratransaction, user_transaction
where gratransaction.id = user_transaction.trans_id and
user_transaction.transdate between to_date(fromdate,'dd-mon-yyyy') and to_date(todate,'dd-mon-yyyy')
group by to_char(user_transaction.transdate, 'dd-mon-yyyy'), eventdesc
) td on td.currentdate = d.dateInRange order by d.dateInRange ascuser12985447 wrote:
I have a big query with nesting and left join and Ineed to create a view out of it so as not to run it from the application. The issue is I need the date range and some other fields as input parameters since it will vary from the front end for each request. I just looked up and saw some posts referring to using SYS_CONTEXT for parameterized views and need to know exactly how do I create the view for example with 2 parameters - fromdate, todate and how I invoke the view from the application.
Just for info I am using grails/groovy for developing the application. and here is the query I want to create view out of..
select
d.dateInRange as dateval,
eventdesc,
nvl(td.dist_ucnt, 0) as dist_ucnt
from (
select
to_date(fromdate,'dd-mon-yyyy') + rownum - 1 as dateInRange
from all_objects
where rownum <= to_date(fromdate,'dd-mon-yyyy') - to_date(todate,'dd-mon-yyyy') + 1
) d
left join (
select
to_char(user_transaction.transdate,'dd-mon-yyyy') as currentdate,
count(distinct(grauser_id)) as dist_ucnt,
eventdesc
from
gratransaction, user_transaction
where gratransaction.id = user_transaction.trans_id and
user_transaction.transdate between to_date(fromdate,'dd-mon-yyyy') and to_date(todate,'dd-mon-yyyy')
group by to_char(user_transaction.transdate, 'dd-mon-yyyy'), eventdesc
) td on td.currentdate = d.dateInRange order by d.dateInRange ascAre you dead set on creating a view? If so ... why?
I'd recommend creating a stored procedure / function (in a package) that returns a ref cursor before i'd recommend what you're going for (unless there is some extremely compelling reason why only a view will work). -
Parameterized Views for User Reports
I would like to be able to define a view such as:
create view dept_emps(p_dept in varchar2) as
select * from emps where dept = p_dept);
and use this view to define a SQL Dev drilldown report with SQL such as:
select * from dept_emps(:DEPT)
where :DEPT is a bind variable passed from a selected depts report row.
Oracle apparently does not support parameterized view definitions as suggested above, but I have found an article by Tom Kyte on the issue of parameterizing views, where Tom suggests using DBMS_SESSION.SET_CONTEXT (called within a user package) to set context values that can be retrieved in a view using the SYS_CONTEXT function. I can get this approach to work at the SQL prompt to work around the lack of formal view parameters. I have a package which defines a procedure which sets context values that I can then retrieve within a view using the SYS_CONTEXT function.
To use this approach when defining a SQL Developer user report, the SQL for the report would need to be logically something like (which works fine at an SQL prompt):
exec ssuper_context.set_ctx('DEPT', :DEPT) - - Call user procedure to assign context variable 'DEPT' with bind value from parent report
select * from dept_emps
where view dept_emps uses function SYS_CONTEXT to return the value for context variable 'DEPT'.
SQL Developer complains about this as the SQL for a user-defined report. Can anyone suggest how I might pass a bind value from a selected parent record to a view which implements a drilldown report?
TIA JonI met CSI at a kongress a few weeks ago and pressed them a bit on how this works. Eventually they fezzed up about the table read but mentioned that in the next release being developed it would be different...
Problems with this is that the FM has a couple of limitations, so you cannot read all tables correctly... so you end up reading some of the wrong ones or taking the easy ones.
Another option is to let the database itself do the hard work, to get back to the performance aspect.
Anyway, for neither of these two do you need any tcode, so indeed we are drifting off topic... -
Grant access to SYS.V$TEMP_SPACE_HEADER view - how to?
Hi,
I created a user. I am trying to give select access on some of the System tables and views to this user to retrieve some information about the database.
When I try
grant select on sys.v$temp_space_header to usr1;
I am getting the following error
grant select on sys.v$temp_space_header to usr1
ERROR at line 1:
ORA-02030: can only select from fixed tables/views
I am getting the same error when I try to give select access to SYS.V$TEMPSTAT view also.
Does anyone know why this error is coming? Please let me know how I can grant select access to the user for these views.Hi,
This two views are synonyms.
SQL> grant select on sys.V$TEMPSTAT to scott;
grant select on sys.V$TEMPSTAT to scott
ERREUR Ã la ligne 1 :
ORA-02030: une sélection n'est autorisée que depuis des tables fixes/vues
SQL> grant select on sys.V$TEMP_SPACE_HEADER to scott;
grant select on sys.V$TEMP_SPACE_HEADER to scott
ERREUR Ã la ligne 1 :
ORA-02030: une sélection n'est autorisée que depuis des tables fixes/vues
SQL> select synonym_name,table_name
2 from dba_synonyms
3 where synonym_name in ('V$TEMP_SPACE_HEADER','V$TEMPSTAT');
SYNONYM_NAME TABLE_NAME
V$TEMPSTAT V_$TEMPSTAT
V$TEMP_SPACE_HEADER V_$TEMP_SPACE_HEADER
SQL> grant select on sys.V_$TEMPSTAT to scott;
Autorisation de privilèges (GRANT) acceptée.
SQL> grant select on sys.V_$TEMP_SPACE_HEADER to scott;
Autorisation de privilèges (GRANT) acceptée.
Nicolas. -
Hello,
I currently have a pretty nasty query involving hierarchial subqueries which I reuse multiple times in my application. I would like to store this query in the database as a view so that my code would be more modular. Is there a way to create a parameterized view in the database? Thanks for your help.Heya all!
I think this solutions wont perform because they involve PL/SQL.
I had the same problem some time ago and the point is that
.) the PL/SQL engine will be called a really often
.) the optimizer wont recognize the constant value (i think you will need it for the start-with-clause), i tested this issue with an early 10g version btw
My Solution, create a system context. I am working with this solution for some years and did not notice any disadvantages.
You can find a example here [sys_context example|http://download.oracle.com/docs/cd/B28359_01/server.111/b28286/statements_5002.htm#sthref5947] (scroll down to the examples.
What you need to do is to define a package that controls the context (put thingies in), after creating context and packager your code would look like that:
View:
CREATE OR REPLACE VIEW V_MY_TEST_VIEW AS
SELECT LPAD(E.SURENAME,LENGTH(SURENAME)+LEVEL-1,'-'),
E.SURENAME,
E.FIRST_NAME,
E.EMPLOYEE_NO,
E.STATUS,
E.INSTRUCTOR,
E.POS_NR
FROM EMPLOYEES E
WHERE 1=1
START WITH E.EMPLOYEE_NO = SYS_CONTEXT('myContext','Employee')
CONNECT BY PRIOR E.EMPLOYEE_NO = E.INSTRUCTOR_NO
Package Call:
EXEC MY_CTXT_CONTROL_PCK.SET_EMPLOYEE('ROGERROGER');
finally....:
SELECT * FROM V_MY_TEST_VIEW;
I had to translate the view-names and columns and so i also could not test it, so apologize any typos or errors.
If you have any questions just ask! -
Trying to set up iCloud on my MacBook Pro, and I get to the point where it tells me to view my email for further instructions on verification of my account, but there is no such email in my inbox, even after submitting multiple requests to resend the email. Any idea what I can do? Mark
Well, running on a 2006 model. I did not have a startup disc. Initially, it booted up on original software in 2006. Since then, I've upgraded to 10.6 via a box set. And, since then I think I popped it up to lion.
All I have on a disc is snow leopard. And, I can't get farther than the setup screen due to hard drive. I'm taking to a apple authorized repair store right now. We'll see what they tell me . I'm just going to weigh the cost of repair vs. buying new.
Another bad, stupid thing is I had no means of backing up my stuff. So, I might have lost things like music, vids, etc. we'll see if they can recover. If the cost is too much for repair I might just forget it and start over with a new system. Just not sure at this point. -
Where has the "Show Duplicates" view gone in iTunes 11?
Where has the "Show Duplicates" view gone in iTunes 11? I want to delete all duplicated songs.
It's gone but this post might help:
turingtest2 London, UK
Re: iTunes 11 removed Display duplicates option Dec 2, 2012 1:41 AM (in response to mdnolton2)
Two Windows scripts to make playlists of Duplicates and Exact Duplicates. Use shift-delete to remove selected tracks from the library as well as the playlist.
There is also my DeDuper script if you don't want to do it by hand. Please take note of the warning to backup your library before deduping.
Enjoy.
tt2
Link: https://discussions.apple.com/message/20454991#20454991 -
Where I setup the parameters of the Accounts Payable Negative Supplier???
When I try to run Accounts Payable Negative Supplier Balance, the parameter report definition haven`t value.
Where I setup the parameters of the concurrent Accounts Payable Negative Supplier Balance???
Can anyone help me?.
Thanks.This report relies on the XLA Trial Balance data.
Please check whether you have created any Report Definitions or not.
Otherwise check the SLA Implementation Guide.
Chapter: Open Account Balances Listing
Section: Creating Open Account Balances Listing Definitions
By
Vamsi -
Restricting SYS user to View other schema's Tables
Hi All,
Oracle DB Version - 10R2
O/S - UNIX
Could anyone share docs or steps to prevent SYS user to view other schema's tables;
Thanks,
DeepakDear Deepak_DBA,
If you revoke every privilege and role from the SYS user i presume the SYS will continue to select any table from the relevant schema. SYS is a special user and not like the others.
For instance if you want to revoke the SYSDBA and the SYSOPER from the SYS user;
SQL> revoke sysdba, sysoper from sys;
revoke sysdba, sysoper from sys
ERROR at line 1:
ORA-01998: REVOKE failed: user SYS always has SYSOPER and SYSDBAI have never seen such documentation that describes how to revoke everything or at least the SELECT ANY TABLE privilege from the SYS user.
Please see more about the SYS and the SYSTEM users;
SYS and SYSTEM Users;
http://download.oracle.com/docs/cd/E11882_01/server.112/e10897/users_secure.htm#ADMQS12003
Regards.
Ogan -
Where can I download smart view 9.3.1.4.2
Please let me know from where can I download smart view 9.3.1.4.2?
Any link or URL?
thanks in advance.I take it you mean :- 9.3.1.4.02
It is available at "My Oracle Support" - "Patch 7432840: Hyperion Smart View for Office 9.3.1.4.02 Service Fix"
Cheers
John
http://john-goodwin.blogspot.com/ -
Trigger on SYS owned tables/views
Hello DBA's,
I need to achive something.. for which I have to write a trigger on SYS owned tables/views.
My question is, IS IT POSSIBLE TO WRITE A TRIGGER ON SYS OWNED OBJECTS?. If so please provide me simple example.
Depending on the value which will be inserted or updated into to this sys.views/sys.tables, I have to submit "job" which will inturn does some operation depending on the "value" which was inserted or updated on this view/table.
Thankz in advance..
BinnyJustin,
I will give some simple example...
User-1 is created procedure... it will be in valid state.. after some time this procedure will be invalidated...(due to some other procedure creation, etc)..
Stage1, during successful creation of procedure the status will be VALID (in DBA_OBJECTS)
Stage2, the status will be INVALID..
I need to write a trigger for this status change in dba_objects.. The status change will be caused due to some other operation..
Is it possible to write a trigger at the point of status change? if so how?.
This is the simple example I have remembered.
Let me about this..
Thankz
Binny -
TABLE function to simulate parameterized view
Hi all,
Since view can not have parameters, I tried to used stored procedure to return ref cursor then used TABLE function in select statement to simulate a view with parameters, since it's easy to pass parameters to a stored procedure.
The idea is like this
function foo (p1 int, p2 int)
return sys_ref_cursor
c sys_ref_cursor -- sorry, i forgot the buildin ref cursor name, just used
this as pseudo code
is
open c for select * from table_a where col1=:p1 and col2=p2 using p1, p2;
return c;
end;
select * from table(foo(1,2)) does not work, I know that I can iterate throught
the cursor and pipe it out to a SQL type in function foo, then use TABLE
function in SELECT statement. However, it seems so much coding work. Is it the
only way or do you have better idea?
Thanks in advance.It is just not correct that you cannot parameterize views.
Nicolas gave you a link above which has an example using a context.
Even before Oracle supported contexts you could have parameterize views using package variables.
SQL> create or replace package pkg_vars as
2 function get_job return emp.job%type;
3 procedure set_job (p_job in emp.job%type)
4 end pkg_vars;
5 /
Package created.
SQL>
SQL> create or replace package body pkg_vars as
2 g_job emp.job%type;
3
4 function get_job return emp.job%type)
5 is
6 begin
7 return g_job;
8 end get_job;
9
10 procedure set_job (p_job in emp.job%type
11 is
12 begin
13 g_job := p_job;
14 end set_job;
15 end pkg_vars;
16 /
Package body created.
SQL>
SQL> create or replace view view_emp1 as
2 select deptno, count(empno) cnt
3 from emp
4 where job = pkg_vars.get_job
5 group by deptno
6 ;
View created.
SQL> select distinct job from emp;
JOB
CLERK
SALESMAN
PRESIDENT
MANAGER
ANALYST
5 rows selected.
SQL> exec pkg_vars.set_job('CLERK');
PL/SQL procedure successfully completed.
SQL> select * from view_emp1;
DEPTNO CNT
30 1
20 2
10 1
SQL> exec pkg_vars.set_job('MANAGER');
PL/SQL procedure successfully completed.
SQL> select * from view_emp1;
DEPTNO CNT
30 1
20 1
10 1
SQL> -
If I have a View that has a sql query with parameters in the where clause, where is the proper place(s) to set the value of the parameter? Presently, I am overriding the prepareModel method of the AppModule to do this, but is there another place this can be done?
BradHi Brad,
there are a number of places to set it based on what you are doing at the time. If the clause will apply for the whole session then set it in the view object implementation class. If specific to a particular page (the norm) then i normally set it in the prepareModel of the dataForwardAction of that page.
Brenden
Maybe you are looking for
-
Java 1.4.2 for OX 10.3
Is there a Java Preference folder in Java 1.4.2 for OS 10.3 operating?
-
This is a question that hasn't been answered yet
IPhone 5c I have just received my new phone yesterday, i chose the latest back up and waited for it all it restore. It finally did it but not all photos were there.. I've heard that it erases them out of photo stream after 30 days but these we're my
-
Service Accounts for Browser Services and FD Launcher (Full-text Search)
I am setting up SQL Failover Clustering (Version: 2012SP1) on Windows 2012. There are 2 options to configure the service account for Browser Services and FD Launcher : Option 1) Using separate domain accounts, as what I have done for DB Engine and SQ
-
How to load duplicate data to a temporary table in ssis
i have duplicate data in my table.i want to load unique records in one destination .and i want to load duplicate data in a temporary table in another destination. .how can we impliment package for this
-
How do I set hanging punctuation in a paragraph?
I can't find a setting to make periods, commas, quotation marks etc. extend into the margin. Am I missing something?