Analyze table as another user (not owner)
Hi!
I need to be able to analyze a table from a different account other than the owner. How can I do that?
Thanks!
Dave Venus
What version of Oracle? Are you going to use the ANALYZE command or the dbms_stats package?
From SQL manual entry on Analyze:
"The schema object to be analyzed must be local, and it must be in your own schema or you must have the ANALYZE ANY system privilege"
HTH -- Mark D Powell --
Similar Messages
-
Wich rights must a user have to copy a table to another user?
Wich rights must a user have to copy a table to another user? If I try it while using SQLDeveloper I become a message wich says that the user has not enough rights.
Thanks a lot
TorstenIf you are trying to create a table in a schema other than your own, you must have the CREATE ANY TABLE system privilege.
-
Hi,
How can i add a sound alert or message when someone comments on a pic of a photo stream when i am only another participant (not owner of the photstream)? Thank you. JoanaJoana,
that should be automatic.
See: http://help.apple.com/iphoto/mac/9.4/#pht884a8908
When you like or comment on a photo in a shared stream, a notification is sent to all the Apple devices of the photo stream’s creator and subscribers. You can delete comments you added to a photo by placing the pointer over the comment and clicking the Delete button that appears.
Usually the problem is the other way round - how to prervent spamming all subscribers to a shared stream from being alerted to each comment on a photo in the stream. Quite a few subcribers have cancelled their subscriptions to shared streams, because they have continously been sent alert messages and could not disable them. It can get rather annoying - there is no way to silently add a few comments to photos and then send only one alert. -
How to export and Import table of another user from user system using expdp
Hi All,
How to export a table 'scott.emp' from system user.
expdp system/password directory=expdp dumpfile=scott_emp.dmp ???? ?? tables=emp ??????????????????????????
thank you
---------------------------------------------------------- Posting solution here to make needed users not to scroll down ------------------------------------------------------
Finally I got it right!!!
Task :- Export table_1 of schema_a from database db1 and Import it to schema_b of database db2 as user other than schema owner
Solution :-
expdp system/pwd directory=expdp tables=schema_a.table_1 dumpfile=schema_a.table_1.dmp logfile=expdp_schema_a.table_1.log
impdp system/pwd directory=expdp tables=schema_a.table_1 dumpfile=schema_a.table_1.dmp logfile=impdp_schema_a.table_1.log remap_schema=schema_a:schema_b remap_tablespace=table_1_tablespace:schema_b_tablespace
Thank You All
Edited by: Ven on Mar 9, 2011 7:52 AMJust a example
SQL> $expdp system/sys directory=data_pump_dir dumpfile=tests.dmp tables=scott.emp
Export: Release 11.2.0.1.0 - Production on Tue Mar 8 10:39:57 2011
Copyright (c) 1982, 2009, Oracle and/or its affiliates. All rights reserved.
Connected to: Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - Production
With the Partitioning, OLAP, Data Mining and Real Application Testing options
Starting "SYSTEM"."SYS_EXPORT_TABLE_01": system/******** directory=data_pump_dir dumpfile=tests.dmp tables=scott.emp
Estimate in progress using BLOCKS method...
Processing object type TABLE_EXPORT/TABLE/TABLE_DATA
Total estimation using BLOCKS method: 64 KB
Processing object type TABLE_EXPORT/TABLE/TABLE
Processing object type TABLE_EXPORT/TABLE/INDEX/INDEX
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/INDEX/STATISTICS/INDEX_STATISTICS
Processing object type TABLE_EXPORT/TABLE/CONSTRAINT/REF_CONSTRAINT
Processing object type TABLE_EXPORT/TABLE/STATISTICS/TABLE_STATISTICS
. . exported "SCOTT"."EMP" 8.570 KB 14 rows
Master table "SYSTEM"."SYS_EXPORT_TABLE_01" successfully loaded/unloaded
Dump file set for SYSTEM.SYS_EXPORT_TABLE_01 is:
C:\APP\MAZAR\ADMIN\ACEME\DPDUMP\TESTS.DMP
Job "SYSTEM"."SYS_EXPORT_TABLE_01" successfully completed at 10:40:01
SQL> -
Grant read authorisation on all of its tables to another user
Hi,
we would like to read the tables of SAP directly from MaxDB. The user sap<sid> is not a good candidate. So, we create another user dbreader.
Could somebody help me, how to grant read authorisation on all SAP tables to user dbreader?
Thanks a lot in advance.
Best Regards,
RongfengHello Rongfeng,
do you notice to what a dilemma you bring us with your request?
On the one hand, we're participating in this SDN community to help people, so that they can successfully use the software and enjoy it.
On the other hand you ask for the how-to for something that is a really bad idea and that will bring you into trouble.
By allowing a read-only access to SAP tables you bypass all permission management of SAP. As soon as any auditor sees that, the compliance certificate of your company is gone.
You can even access all clients - how do you prevent from working with the wrong set of data?
Also it does not seem as if you know what you're about to do there. In fact, you don't even know what data you want to see.
It's just the "gimme-all" request, something that might be OK at the kepab booth, but surely not with data access permissions.
Apart from the security aspect: SAP tables don't make sense on database level.
All references and dependencies between them are only kept within the application layer.
All the semantics of the data fields (and with them all consistency check) are only present at the application layer.
Even the state of records is not consistent on the database, as SAP uses it's own updater concept in - you guess it - the application layer.
So, for me the question is:
If I tell you how to do what you asked for, does it do more harm than it's useful?
The regular readers of this forum already know my reply to this kind of request...
DON'T DO IT!
Instead define and specify a API to the data you need to see.
Better use the tools you already paid for ... ABAP, BAPI, RFC, WebServices... there are tons of options to get data out of SAP systems properly. And all of them are safe, secure, well documented and reliable.
Best regards,
Lars -
Completed activities shows Completed By another user when owner of account changed.
one of our customer reported that CRM shows phone calls completed by her when she did not complete the phone call. On further investigation, it was found that the following triggered the update.
1. User X changed the owner of Account to another user - user Y.
2. Since there is a parental relation between Account and Activities, all the activity owners where changed into user Y.
3. On all the active and inactive activities, the modified by was changed to user X.
But as a side effect on the Posts/Activities/notes control, all the modified activities now shows as completed by user X. - These activities were completed by some other user a long time ago.
Is there some way to change the "Completed By" to show "Modified By" instead? Attaching a picture to clarify.
Regards,
JitheshActivities Wall don't support customizations to change these label.
I think in Activities there is no field to capture Completed By. It only captures Modified By. And updates it with User which modified it last.
Hence you will not be able to retrieve who actually completed it. Usually Completed activities can't be modified that's why it shows last modified user as Completed By. -
Allowing a user to create/drop tables in another users schema
We have a central shared schema (TEAM). So we can monitor who is doing what users have there own login(USER1, USER2...). Is there a way to allow a user to create/drop objects in another user.
I.e.
SQL> connect USER1
SQL> create team.table1(col1 char(1));
SQL> drop table team.table1:
How can this be set up?
BenHere is what you can do, If you want to keep track of what users are doing.
Open the glogin.sql file and set the spool like this
spool /oracle/audit/SID_&_user.logEverytime user logs in it will be populated and you will be able to see who is doing what.
You can remove the write permission on glogin.sql so that no one can modify it.
You also need to create a script like this, which would rename it every time same user would login.
#!/bin/ksh
time=`date +"%b"_"%d"_"%H"_"%M"`
##you need to pass some more variables and while loop to include all the users## ( This is just for an example)
if [ -f /oracle/audit/SID_SYS.log ]
then
mv /oracle/audit/SYS.log /oracle/audit/SYS.log.$time
fiEdit the glogin.sql file with this script information like this
host /oracle/audit/file.kshHope this helps, if you need more information let me know. -
Can you check for data in one table or another but not both in one query?
I have a situation where I need to link two tables together but the data may be in another (archive) table or different records are in both but I want the latest record from either table:
ACCOUNT
AccountID Name
123 John Doe
124 Jane Donaldson
125 Harold Douglas
MARKETER_ACCOUNT
Key AccountID Marketer StartDate EndDate
1001 123 10526 8/3/2008 9/27/2009
1017 123 10987 9/28/2009 12/31/4712 (high date ~ which means currently with this marketer)
1023 124 10541 12/03/2010 12/31/4712
ARCHIVE
Key AccountID Marketer StartDate EndDate
1015 124 10526 8/3/2008 12/02/2010
1033 125 10987 01/01/2011 01/31/2012
So my query needs to return the following:
123 John Doe 10526 8/3/2008 9/27/2009
124 Jane Donaldson 10541 12/03/2010 12/31/4712 (this is the later of the two records for this account between archive and marketer_account tables)
125 Harold Douglas 10987 01/01/2011 01/31/2012 (he is only in archive, so get this record)
I'm unsure how to proceed in one query. Note that I am reading in possibly multiple accounts at a time and returning a collection back to .net
open CURSOR_ACCT
select AccountID
from
ACCOUNT A,
MARKETER_ACCOUNT M,
ARCHIVE R
where A.AccountID = nvl((select max(M.EndDate) from Marketer_account M2
where M2.AccountID = A.AccountID),
(select max(R.EndDate) from Archive R2
where R2.AccountID = A.AccountID)
and upper(A.Name) like parameter || '%'
<can you do a NVL like this? probably not... I want to be able to get the MAX record for that account off the MarketerACcount table OR the max record for that account off the Archive table, but not both>
(parameter could be "DO", so I return all names starting with DO...)if I understand your description I would assume that for John Dow we would expect the second row from marketer_account ("high date ~ which means currently with this marketer"). Here is a solution with analytic functions:
drop table account;
drop table marketer_account;
drop table marketer_account_archive;
create table account (
id number
, name varchar2(20)
insert into account values (123, 'John Doe');
insert into account values (124, 'Jane Donaldson');
insert into account values (125, 'Harold Douglas');
create table marketer_account (
key number
, AccountId number
, MktKey number
, FromDt date
, ToDate date
insert into marketer_account values (1001, 123, 10526, to_date('03.08.2008', 'dd.mm.yyyy'), to_date('27.09.2009', 'dd.mm.yyyy'));
insert into marketer_account values (1017, 123, 10987, to_date('28.09.2009', 'dd.mm.yyyy'), to_date('31.12.4712', 'dd.mm.yyyy'));
insert into marketer_account values (1023, 124, 10541, to_date('03.12.2010', 'dd.mm.yyyy'), to_date('31.12.4712', 'dd.mm.yyyy'));
create table marketer_account_archive (
key number
, AccountId number
, MktKey number
, FromDt date
, ToDate date
insert into marketer_account_archive values (1015, 124, 10526, to_date('03.08.2008', 'dd.mm.yyyy'), to_date('02.12.2010', 'dd.mm.yyyy'));
insert into marketer_account_archive values (1033, 125, 10987, to_date('01.01.2011', 'dd.mm.yyyy'), to_date('31.01.2012', 'dd.mm.yyyy'));
select key, AccountId, MktKey, FromDt, ToDate
, max(FromDt) over(partition by AccountId) max_FromDt
from marketer_account
union all
select key, AccountId, MktKey, FromDt, ToDate
, max(FromDt) over(partition by AccountId) max_FromDt
from marketer_account_archive;
with
basedata as (
select key, AccountId, MktKey, FromDt, ToDate
from marketer_account
union all
select key, AccountId, MktKey, FromDt, ToDate
from marketer_account_archive
basedata_with_max_intervals as (
select key, AccountId, MktKey, FromDt, ToDate
, row_number() over(partition by AccountId order by FromDt desc) FromDt_Rank
from basedata
filtered_basedata as (
select key, AccountId, MktKey, FromDt, ToDate from basedata_with_max_intervals where FromDt_Rank = 1
select a.id
, a.name
, b.MktKey
, b.FromDt
, b.ToDate
from account a
join filtered_basedata b
on (a.id = b.AccountId)
ID NAME MKTKEY FROMDT TODATE
123 John Doe 10987 28.09.2009 31.12.4712
124 Jane Donaldson 10541 03.12.2010 31.12.4712
125 Harold Douglas 10987 01.01.2011 31.01.2012
If your tables are big it could be necessary to do the filtering (according to your condition) in an early step (the first CTE).
Regards
Martin -
Copying data from one table to another, but not duplicate
Good afternoon!
I am new to Oracle SQL, I have a difficulty.
I have a script that copies or add another table with data from another table.
If the table already has 01 "Registry 01" when you make a copy of the data in table 02, can not duplicate the "Registry 01" again.
As the table already exists since the beginning of the year before last and duplicate information, I can not apply the UNIQUE constraint because of the error. I have to make this change from now.
How to perform this validation so that no duplicate data?
DECLARE
w_cont NUMBER;
CURSOR c_simpro IS
SELECT sc.cd_simpro,
sc.ds_produto,
sp.qt_embalagem,
MAX(sp.dt_vigencia)
FROM simpro_cadastro sc,
simpro_preco sp
WHERE sc.cd_simpro = sp.cd_simpro
GROUP BY sc.cd_simpro,
sc.ds_produto,
sp.qt_embalagem;
BEGIN
FOR r_simpro IN c_simpro LOOP
w_cont := 0;
SELECT COUNT(1)
INTO w_cont
FROM pls_material pm
WHERE pm.cd_material_ops = r_simpro.cd_simpro;
IF w_cont = 0 THEN
INSERT INTO pls_material(nr_sequencia,
dt_atualizacao,
nm_usuario,
dt_atualizacao_nrec,
nm_usuario_nrec,
ie_tipo_despesa,
cd_estabelecimento,
nr_seq_estrut_mat,
cd_simpro,
ds_material,
ie_situacao,
ds_material_sem_acento,
dt_inclusao,
cd_material_ops_orig,
cd_unidade_medida,
cd_material_ops,
qt_conversao_simpro)
VALUES(pls_material_seq.nextval,
SYSDATE,
'ES-SIMPRO',
SYSDATE,
'ES-SIMPRO',
3,
1,
3,
r_simpro.cd_simpro,
r_simpro.ds_PRODUTO,
'A',
r_simpro.ds_PRODUTO,
SYSDATE,
r_simpro.cd_simpro,
'un',
TRIM(to_char(r_simpro.cd_simpro,'0000099999')),
r_simpro.qt_embalagem);
COMMIT;
END IF;
IF w_cont > 0 THEN
UPDATE pls_material p
SET p.qt_conversao_simpro = r_simpro.qt_embalagem,
p.dt_atualizacao = SYSDATE
WHERE p.cd_simpro = r_simpro.cd_simpro;
COMMIT;
END IF;
END LOOP;
END;
Edited by: 983464 on 22/01/2013 10:30Hi,
in addition to what Marwin has already said, I suggest you to post CREATE TABLE and INSERT statements (as mentioned in the FAQ).
The error you are getting from MERGE command is because you need a way to uniquely identify within the table. So it's is important to know also if your table has a primary key/unique index so the keys could to be used in the MERGE command.
Additionally when you put some code or output please enclose it between two lines starting with {noformat}{noformat}
i.e.:
{noformat}{noformat}
SELECT ...
{noformat}{noformat}
Regards.
Al -
Multivalue Error ? one user affect another user not affect !!!
Hi all,
My user raised one issue. Details below:
He is getting multivalve error when he execute the report (Webi) using his credentials .but other user can execute the same report without error
As per my understanding itu2019s not possible because its data issue not authorization issue
Am I correct? If I wrong kindly advise me
Note:
*This report developed based on SAP universe
*Previously the same issue fixed at the time we created one dimension object (WBS Element Key) instead of detail object (L01 WBS Element Key)
Regards,
TamilHi Tamil,
The multivalue with SAP typically pops up when the master data of an infoobject is not unique for each key.
So the description or caption of the infoobject has homonyms (two different keys can have the same description).
If you have the keyfigures/measures defined as database delegated you will get this multivalue because SAP cannot calculate it on the combined level.
So authorisation might have impact if one user can see the two (or more) keys and the other user does not.
Two ways to solve this.
1) set the aggregation method of the object to sum (on the advanced tab).
This allows WebI to sum the values pulled back on the two different key values.
2) use the key as the master/dimension object and the caption/description as the detail.
Hope this helps,
Marianne
And on your note, any of the infoobjects can cause this behavior.
So solving it for one does not mean it doesn't happen anymore. -
Cannot quit Firefox until another user account owner also quits his Firefox
Admin user can't quit his Firefox until user (having only Standard privileges) quits his Firefox. What I can see is that both users are utilizing same Firefox process I assume.
Mac 10.8.5.
Situation was same also on 10.7 (did upgrade from 10.7 -> 10.8).When you install Firefox did it ask you do you want to give permissions to Standard users??
try this again
Hello,
The Reset Firefox feature can fix many issues by restoring Firefox to its factory default state while saving your essential information. <br>
'''Note''': ''This will cause you to lose any Extensions and some Preferences.''
*Open websites will not be saved in Firefox versions lower than 25.
To Reset Firefox do the following:
'''For Firefox versions previous to 29.0:'''
#Go to Firefox > Help > Troubleshooting Information.
#Click the "Reset Firefox"[[Image:Button reset]] button.
#Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
#Firefox will open with all factory defaults applied.
'''For Firefox 29.0 and above:'''
#Click the menu button [[Image:New Fx Menu]], click help [[Image:Help-29]] and select ''Troubleshooting Information''.Now, a new tab containing your troubleshooting information should open.
#At the top right corner of the page, you should see a button that says "Reset Firefox"[[Image:Button reset]]. Click on it.
#Firefox will close and reset. After Firefox is done, it will show a window with the information that is imported. Click Finish.
#Firefox will open with all factory defaults applied.
Further information can be found in the [[Reset Firefox – easily fix most problems]] article.
Did this fix your problems? Please report back to us!
Thank you. -
Error creating view with tables of other user
I am creating of view containing two tables of another user. I
am a dba-user.
The statement looks like this:
CREATE VIEW TEST
(SELECT ...
FROM DWH.TABLE_A A, DWH.TABLE_B B
WHERE A.ID = B.ID)
I get an error-message (ORA-00942: Table or view not found).
When I create the view as user DWH, everything went OK. I don't
think it has something to do with privileges since I am the dba-
user.
How can I create a view using other users tables?Hi
To create view on table of another user you need to have select
privilege grant directly to you - not to role granted to you. In
your case you can select tables because you have granted dba
role and it has select any table prvivilege, but you havent
directly granted this rights without role.
Regards -
Edit tables in other user schema
Hello all,
Is there a way to allow a user to edit tables for another user?? For example, suppose user A has tables X, Y and Z. I need user B to be able to edit those tables in SQL Developer.
I have granted user B everything on A's tables, but once user B log to SQL Developer-> Other Users -> Tables. Right click any table and choose edit, an error message is displayed "The database user has insufficient privileges for the given operation"
I am kindly asking for help regarding this issue.
Regards,
EmadI do believe so. I have tried to grant select any dictionary to the user and he still can not edit the tables in the other schema.
I do hope Oracle solve this if it is a bug. -
How to copy data from one table to another (in other database)
Hi. I would like to copy all rows from one table to another (and not use BC4J). Tables can be in various databases. I have already 2 connections and I am able to browse source table using
ResultSet rset = stmt.executeQuery("select ...");
But I would not like to create special insert statement for every row . There will be problems with date formats etc and it will be slow. Can I use retrieved ResultSet somehow ? Maybe with method insertRow, but how, if ResultSet is based on select statement and want to insert into target table? Please point me in the right direction. Thanks.No tools please, it must be common solution. We suceeded in converting our BC4J aplication to PostgreSQL, the MSSQL will be next. So we want to write simple aplication, which could transfer data from our tables between these 3 servers.
-
Hi,
DB: 10.2.0.4 RAC ASM
OS: AIX 5.3L 64-bit
I want to do analyze tables for all users.Please give me the steps for table and schema level.
Thanks & Regards,
SunandCJ,
dbms_utility.analyze_schema has been deprecated since 9i- you should be using dbms_stats.
Sunand, by default there will be a gather stats job running on your database picking up any 'stale' statistics, have you disabled it?
If you want/need to run it manually, dbms_stats.gather_database_stats is what you need. Documentation is here http://download.oracle.com/docs/cd/B19306_01/server.102/b14211/stats.htm#i41448
Carl
Maybe you are looking for
-
Proxy receiver communication channel
Hi Experts, When I am executing an interface in XI, I am getting the message in SXMB_MONI. <SAP:Stack>Unable to create HTTP client (exception 1)</SAP:Stack> The receiver is Proxy here. Where can I get the service number of R/3 system to enter in the
-
mac version 10.9.4. importing vinyl albums via garage band. Have to import tunes individually as tunes will not retain individusl otherwise. trouble is they will not rejoin as one album in iTunes.I understand it is because data available on cd's is
-
Multiple columns in one prompt
Hi Gurus, can we add multiple columns in single prompt in obiee,if yes then how thanks
-
Delete this as not got correct answer from long time
Delete this as not got correct answer from long time
-
Gentlemen, What is the proper way to delete the pab entry when you want to delete a user from your directory? TIA Ivo Ramos