Grant privilage to access diff database objects
How can we grant access to user1 from db1 to access user2 schema objects in db2 database ? Well, the user1 needs to perfrom insert, update and delete on db2's user2 schema.
hare krishna
Alok
You may create a new schema on DB1 and create all synonyms with appropriate privileges for all the tables which need access.
Create a database link from DB2 to access this new schema.
This way you will be protecting other objects from getting modified from DB2.
Similar Messages
-
I have SQL login group as "SC_NT\group_name" in server. There are multiple users using this login group to access database objects. User "A" can able to access db object(stored_procedure_1) from .net application. But when user "B"
tried to access same db object(stored_procedure_1), its showing like
Error: The EXECUTE permission was denied on the object 'stored_procedure_1', database 'test',schema 'dbo'.
Both the users are using windows authentication for access the objects. Could you suggest me the way to resolve this?
VenkatThanks for your response
Erland Sommarskog....
my stored procedure "stored_procedure_1"
does not has any granted permissions to execute. But still user A
able to execute the sp from UI, where user B not able to do it. If any permission provided for a particular object, then only it will display in the above query whatever u have given.
Any other possibilities??
Venkat G -
Unable to access remote database object using database link
Hi all,
I have created a database link to a remote server
SQL> create database link remote_link connect to lax_dba identified by lax_dba using 'abc.corp.com';
database link created
when i am trying to access any table of lax_dba
sql> select * from laxtab@remote_link;
i am getting this Ora error
ORA-12514: TNS:listener does not currently know of service requested in connect
I need your help please to solve this issue
Thanks n Regards
LaxmanThe database server where you defined the link (not your PC) has resolved 'abc.corp.com' to a server/port/service combination using its tnsnames.ora, sqlnet.ora and possibly ldap.ora settings. You can try
tnsping abc.corp.comon the server (as ReubenC suggested) to see what it's attempting to connect to. (It's important to do this on the database server and not on your PC as they will have different tns settings etc.)
It has then found the server and found a listener running on it (so you're getting close), but that remote listener doesn't recognise the service you're asking for. It might be something like the '.com' suffix. -
Grant Permission In Access Database
Hello All
How to set Grant Permission in Access Database, I get an error here
what's wrong in my SQL syntax?
Best Regard
Xan ToHello Matthias Kläy
I Have try your code and I get an error
this my code
Imports System.Data.OleDb
Imports System.Data
Imports ADOX.ObjectTypeEnum
Imports ADOX.ActionEnum
Imports ADOX.RightsEnum
Public Class Form1
Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles MyBase.Load
Dim cat As ADOX.Catalog
Dim grp As New ADOX.Group
Dim Builder As New OleDb.OleDbConnectionStringBuilder
Try
With Builder
.Provider = "Microsoft.ACE.OLEDB.12.0"
.DataSource = "C:\Users\Xan To\Desktop\Test.mdb"
End With
'Using cn As New OleDb.OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\Users\Xan To\Desktop\Test.mdb; Jet OLEDB:System Database=system.mdw;")
Using cn As New OleDb.OleDbConnection
With cn
.ConnectionString = Builder.ConnectionString
End With
Using cmd As New OleDb.OleDbCommand
With cmd
.Connection = cn
.CommandText = "GRANT SELECT ON TABLE MSysObjects TO PUBLIC"
End With
cn.Open()
'cmd.ExecuteNonQuery()
cat = New ADOX.Catalog
cat.ActiveConnection = cn
grp.Name = "Public"
cat.Groups.Append(grp)
grp.SetPermissions("MSysObjects", adPermObjTable, adAccessGrant, adRightRead)
End Using
End Using
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try
End Sub
End Class -
How to access the LOB objects through database links??????????????
Hi
See:
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:52297289480186
http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:5322964030684
And you also might want to get a new keyboard, your '?' seems to be stucked.... -
Grant access to all object/tables in other schemas to a user
Is there any and simple way to grant access to all object/tables in other schemas (more than one) to a scheme/user?
Thanks.
Tarman.HI.
grant SELECT ANY TABLE,delete any table, insert any table to user; Giving this delete,insert ANY TABLE privilege to a user can be dangerous and the use can mislead it. Its better to create a dynamic script and then grant it.
E.g Suppose you want to give select,inert,delete,update privileges to user A on user B's object.
sql> spool grants.sql
sql> select 'grant select,insert,update,delete on '||owner||'.'||table_name||' to A;' from dba_tables where owner='B';
sql>@grants.sqlHTH
Anand -
Forced to remap one database object at a time
Our application exposes a set of data objects (views) for external reporting. Field/row level data security conditions are built into the view definitions. Different access levels are segmented by schema names and in order to enable report reuse object names are identical between schemas.
Users granted schema rights based on their access level.
For example, user A is granted access only to the schema X which contains View1, View2, etc. while user B is granted access only to the schema Y which also contains View1, View2, etc.
User A can reuse report created by user B (since object names are identical), however s/he cannot do it without first changing the data source location (since their access levels and therefore schema names are different).
However, "Set Datasource Location" dialog (see sample screenshot below) does not allow one-click schema remapping. "Current Data Source" hierarchy does not directly expose schema name (it is listed as an "Owner" property of the individual table/view object) which forces user to remap one database object at a time by expanding top and bottom trees, highlighting matching objects and clicking "Update" button.
Our question is: are there any menu items/settings or any other facilities in Crystal Report that would allow us to make re-mapping process less time-consuming?Hi Len,
No, bottom line is the designer is used to "finalize" the report. It's not designed to be use this way. What I suggest you do is create an application that can set location/schema at view time to that person logging in. This way it's all done in the back end and relatively easy to do using one of our SDK's.
Depending on what development tool and Report engine you use depends on which forum to post your question to. SAP will not create the application for you so you will need to get a developer involved.
Thank you
Don
Senior Technical Assurance Engineer
Developer Support Team
Business Objects, an SAP Company -
Does the APPS schema have full access to custom objects
DB - 11.2.0.3 - s390 - SLES11SP2
APP - 12.1.3 - x86_64 - SLES11SP2
One of my lead developers has posed a question to me.......namely -
Does the APPS user have implicit select and delete privileges on custom objects without an explicit GRANT statement?Please see (Step By Step Guide to Creating a Custom Application in Applications 11i [ID 216589.1]) which is applicable to R12 as well -- "Grant all privilege from each custom data object to the APPS schema" step.
Please also see (Step 9. Integrate your database objects with the APPS schema by granting APPS the access to your custom schema’s objects) in (Integrating Custom Applications with Oracle Applications [ID 176852.1).
Thanks,
Hussein -
Granting Read Only Access to user in another schema
Oracle Database 10g
Red Hat Enterprise Linux Server release 5.3
We are requested by a developer to grant his account read only access to TABLES, VIEWS, INDEXES, SEQUENCES, FUNCTIONS, PROCEDURES, PACKAGES, TRIGGERS, JOBS of another schema.
I know granting read only access to Tables and Views. But is it possible to grant READ ONLY access to other mentioned objects ? How to do it ?
And some views are in INVALID status.
I tried to compile them using alter view owner.viewname compile;
But got this ---- Warning: View altered with compilation errors.
Those views are still in INVALID status. And then I tried to use utlrp.sql . Same result.
Then I used the following
SELECT TEXT FROM DBA_VIEWS WHERE VIEW_NAME='view-name';
select REFERENCED_NAME,REFERENCED_TYPE from dba_dependencies where name='view-name';
It turns out some reference types are non existent.
Does that mean DBAs cannot do anything about this ?Nilton wrote:
We are requested by a developer to grant his account read only access to TABLES, VIEWS, INDEXES, SEQUENCES, FUNCTIONS, PROCEDURES, PACKAGES, TRIGGERS, JOBS of another schema.
I know granting read only access to Tables and Views. But is it possible to grant READ ONLY access to other mentioned objects ? How to do it ?
TABLES -> YES grant SELECT
VIEWS -> YES grant SELECT
SEQUENCE -> YES grant SELECT
INDEXES -> There is no read access for indexes...indexes are put on tables and a user who has read access on tables can read the index as well.
FUNCTIONS / PROCEDURES / PACKAGES -> I am not sure what you mean by read access on procedures, functions and packages. You may grant EXECUTE privilege on these.
TRIGGERS -> there is no read access on triggers required. They are implemented on tables for a DML event. If the user has DML access he has the execute access on the trigger as well.
JOBS -> I am not sure what to read from Jobs.
And some views are in INVALID status.
I tried to compile them using alter view owner.viewname compile;
But got this ---- Warning: View altered with compilation errors.
Those views are still in INVALID status. And then I tried to use utlrp.sql . Same result.
Then I used the following
SELECT TEXT FROM DBA_VIEWS WHERE VIEW_NAME='view-name';
select REFERENCED_NAME,REFERENCED_TYPE from dba_dependencies where name='view-name';
It turns out some reference types are non existent.
Does that mean DBAs cannot do anything about this ?There are compilation errors in the Views. e.g. the view may be referring to a table which doesn't exist etc.
Unless you fix the error in the view you can't compile it and male it valid. Fix the view errors. If objects are non existing create them or refer to view to some where else.
If the nonexistent objects were mistakenly dropped, or the data file which contained those objects was dropped, no matter what was the reason for that object to be gone a DBA can bring it back if he is a well prepared DBA and has setup his database for such kind of disasters.
Now tell us why those objects are non-existent ? were they meant to be gone ? or they were dropped mistakenly?
Now here are my guesses:
If they were meant to be gone then probably the views definitions need to be adjusted not to refer them anymore.
If they were mistakenly dropped then:
Do you have them in recyclebin? (only tables) if YES just FLASHBACK TABLE <<tablename>> AS BEFORE DROP.
Is your database has Flashback database ON? if YES FLASHBACK DATABASE until 'time/scn just before the object was dropped'
Do you have backups and your database is running in ARCHIVE LOG mode? if YES perform an incomplete recovery using RMAN. -
Report Writer - Converting from MS Access to Business Objects Tools
In 2008, my company migrated to SAP. Security has forced all report writing to use business objects (specifically WEBI); however, WEBI is very very difficult to use. The data in the universe doesn't always match what SAP has and the tool itself doesn't give the robust manipulation that Access does. I have tried to tell the company I need access to the universes through MS Access in order to create the reports automatically and allow interactive databases; however they refuse to give me ODBC access (against policy). Right now I have no alternative but to do daily downloads from SAP in order to feed my robust databases.
Can anyone suggest what business object tool I should use that will replicate what MS Access does for me?
Easy report writing with robust design (including charts)
Easy front-end tool for end users
One to many relationships needed
Efficient/Automatic (no need for daily downloads)
End users can interact with reports (enter data for later analysis)
What about Crystal Reports? What are the limitations and can it do what MS Access does for me today?
Should I be posting this question in another forum?Hi Amy,
CR 2008 is the complimentary version of CR Designer when connecting to BOE 3.1. You can get an update to Service Pack 3 and then possible SP 4:
https://smpdl.sap-ag.de/~sapidp/012002523100007123572010E/cr2008_sp3.exe
https://smpdl.sap-ag.de/~sapidp/012002523100008782452011E/cr2008sp4.exe
But before you do that check with the BOE admin, SP's should match also but not required.
They should work together, When you use the Report Wizard you'll see an option to connect to Enterprise and then log in using your User account and then the Repository will have the Universes available. Remember this is all set up by the Administrator so you will need the Admin person to grant you access to the Repository as well as anything else you need access to. Once you create the report then you can Publish them to your folder or a common folder and the Admin can then share your reports.
WEBI is what the name implies, it's a WEB interface to allow you to create reports using it's Report Wizard. It does take some getting used to and you should have training available, check with your admin group again. Same as CRD, it tool allows you to create reports but is much more flexible than WEBI is in a few ways but once you understand how WEBI works it has some very powerful tools also.
CR allows you to access any database field you have permission to see, it fully supports database permissions. So if you can't see them again you have to ask your DBA to grant you permissions. You can then link tables including your late entry table if it is separate or simply hitting the refresh button in the viewer will requery the DB for new rows of data. All depends on how it's set up.
As for security, this is a decision your company has made. SAP is just a tool that allows you to be secure. With today's security threats and other privacy laws and hackers abilities to get to and cause personal harm to those affected it's just the way things are these days. Take this up with your Management, it's not something we can decide for you and certainly can't provide you with ways to circumvent the security.....
There is training available for both WEBI and CR as well as third party Help for books available. Downloading the sample reports is a great place to start, you can switch between Design and preview mode and see what happens when you make changes....
Thanks again
Don -
Restriction on accessing public database link
How to restrict certain users from accessing public database link.
ravi02, sb has pretty much nailed the answer in that if you make the link public then anyone can use it. However, is the link in question a fixed user link or a current session user link? With a fixed user link then whatever access is granted to the fixed user is available to any user who has access to your instance. On the other hand if each user is required to have their username created on the remote instance then object and role grants issued on the remote instance can still limit what objects a user may reference.
HTH -- Mark D Powell -- -
Cancelling the privaleges of the user accessing the schema objects ???
Hi,
I have given privilages to the user to access my schema objects(tables). Can i cancell the privilages of the user of accessing my schema objects(table) which i granted them ???
Thank you !!!Hi,
If you gave a privilege or role to a user using GRANT, you can take it away using REVOKE.
For example:
REVOKE SELECT ON my_table FROM user_name;un-does the privilege given by
GRANT SELECT ON my_table TO user_name; -
Hi all,
Am trying to work on a table in my database which was created by user "xyz". this however implies that the table would exist in the schema belonging to user"xyz".
From the SQLPLUS> prompt, I can not use any DML or DDL syntax on the objects created by this user "xyz". Not even a "desc table_name" would give the desired result. however it gives an error: "object does not exist".
If you log into the enterprise manager as user "sys", you can view the description of the tables belonging to the user"xyz" but you can not have access to the content of the tables belong to the user"xyz".
How do I veiw the content of the tables belonging to user"xyz" and how do i sent such security on database objects I wish to have that characteristic.
Thank you in advance.
ToluHi,
Please take a look at example below :
--- USER : "DB_USER01"
SQL> create table xyz(id number(5));
Tabela criada.
SQL> insert into xyz values(1);
1 linha criada.
SQL> insert into xyz values(2);
1 linha criada.
SQL> select * from xyz;
ID
1
2
SQL>
--- USER : "DB_USER02" - (other sqlplus session).
SQL> select * from db_user01.xyz;
select * from db_user01.xyz
ERRO na linha 1:
ORA-00942: a tabela ou view não existe
--- Back to USER : "DB_USER01" and grant SELECT ANY TABLE TO db_user02;
SQL> GRANT SELECT ANY TABLE TO "DB_USER02";
Concessão bem-sucedida.
--- back to USER : "DB_USER02" to try the select statement again;
SQL> select * from db_user01.xyz;
ID
1
2
SQL>
I hope this can help you a little.
regards,
Marcello -
I m using ms access as database and i want to create a login page in java
hye frnz... plz help me m new to java
m using ms access as database and try to create a login page where user type username and pw
i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
now there is an error class not found exception sun:jdbc...... error
plz help me i had stuck frm 4 days */
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Login extends JFrame
//Component Declarations
JLabel jlb1,jlb2;
JTextField jtf1;
JPasswordField jpf1;
JButton jb1,jb2;
//Constructor
Login()
//frame settings
setTitle("Login Dialog");
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
setBounds(d.width/2-175,d.height/2-100,350,200);
gbc.insets=new Insets(7,7,7,7);
//adding components
jlb1=new JLabel("User ID");
gbc.gridx=0;
gbc.gridy=0;
add(jlb1,gbc);
jlb2=new JLabel("Password");
gbc.gridx=0;
gbc.gridy=1;
add(jlb2,gbc);
jtf1=new JTextField(10);
gbc.gridx=1;
gbc.gridy=0;
add(jtf1,gbc);
jpf1=new JPasswordField(10);
gbc.gridx=1;
gbc.gridy=1;
add(jpf1,gbc);
jb1=new JButton("Login");
gbc.gridx=0;
gbc.gridy=2;
add(jb1,gbc);
jb1.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
Connection conn=null;
Statement stmt=null;
boolean found=false;
try
Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
String dataSourceName = "Inventory";
String dbURL = "jdbc:odbc:" + dataSourceName;
conn=DriverManager.getConnection(dbURL, "","");
stmt=conn.createStatement();
ResultSet rst=stmt.executeQuery("Select * from User");
System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
while(rst.next())
System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
found=true;
rst.close();
dispose();
MainWindow mw= new MainWindow(); /*created min window object created to be opend after login but not working*/
break;
rst.close();
stmt.close();
conn.close();
catch(ClassNotFoundException e){System.out.print(e);}
catch(Exception e){System.out.print(e);}
if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
JOptionPane.showMessageDialog(null,"Invalid username or password",
"Error Message",JOptionPane.ERROR_MESSAGE);
jb2=new JButton("Clear");
gbc.gridx=1;
gbc.gridy=2;
add(jb2,gbc);
jb2.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
jtf1.setText("");
jpf1.setText("");
jtf1.requestFocus();
setSize(350,200);
setVisible(true);
jtf1.requestFocus();
public static void main(String args[])
Login l=new Login();
}http://forums.oracle.com/forums/ann.jspa?annID=599
Oh, and by the way, your keyboard seems to be broken as your words are not getting spelled correctly. -
Plz help using ms access as database,i want to create a login page in java
hye frnz... plz help me m new to java
m using ms access as database and try to create a login page where user type username and pw
i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
now there is an error class not found exception sun:jdbc...... error
plz help me i had stuck frm 4 days */
import java.sql.DriverManager;
import java.sql.Connection;
import java.sql.Statement;
import java.sql.ResultSet;
import javax.swing.*;
import java.awt.*;
import java.awt.event.*;
class Login extends JFrame
//Component Declarations
JLabel jlb1,jlb2;
JTextField jtf1;
JPasswordField jpf1;
JButton jb1,jb2;
//Constructor
Login()
//frame settings
setTitle("Login Dialog");
setLayout(new GridBagLayout());
GridBagConstraints gbc = new GridBagConstraints();
setDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);
Dimension d= Toolkit.getDefaultToolkit().getScreenSize();
setBounds(d.width/2-175,d.height/2-100,350,200);
gbc.insets=new Insets(7,7,7,7);
//adding components
jlb1=new JLabel("User ID");
gbc.gridx=0;
gbc.gridy=0;
add(jlb1,gbc);
jlb2=new JLabel("Password");
gbc.gridx=0;
gbc.gridy=1;
add(jlb2,gbc);
jtf1=new JTextField(10);
gbc.gridx=1;
gbc.gridy=0;
add(jtf1,gbc);
jpf1=new JPasswordField(10);
gbc.gridx=1;
gbc.gridy=1;
add(jpf1,gbc);
jb1=new JButton("Login");
gbc.gridx=0;
gbc.gridy=2;
add(jb1,gbc);
jb1.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
Connection conn=null;
Statement stmt=null;
boolean found=false;
try
Class.forName("sun.jdbc.driver.JdbcOdbcDriver");
String dataSourceName = "Inventory";
String dbURL = "jdbc:odbc:" + dataSourceName;
conn=DriverManager.getConnection(dbURL, "","");
stmt=conn.createStatement();
ResultSet rst=stmt.executeQuery("Select * from User");
System.out.println(jtf1.getText()+"/t"+jpf1.getPassword());
while(rst.next())
System.out.println( rst.getString(1) +"/t"+ rst.getString(2));
if(jtf1.getText().equals(rst.getString(1).trim()) && new String(jpf1.getPassword()).equals(rst.getString(2).trim()))
found=true;
rst.close();
dispose();
MainWindow mw= new MainWindow(); /*created min window object created to be opend after login but not working*/
break;
rst.close();
stmt.close();
conn.close();
catch(ClassNotFoundException e){System.out.print(e);}
catch(Exception e){System.out.print(e);}
if(found==false) /*this portion is executing and dialog box appears invalid name and pw with class not found exception sun:jdbc.......on console */
JOptionPane.showMessageDialog(null,"Invalid username or password",
"Error Message",JOptionPane.ERROR_MESSAGE);
jb2=new JButton("Clear");
gbc.gridx=1;
gbc.gridy=2;
add(jb2,gbc);
jb2.addActionListener(new ActionListener()
public void actionPerformed(ActionEvent ae)
jtf1.setText("");
jpf1.setText("");
jtf1.requestFocus();
setSize(350,200);
setVisible(true);
jtf1.requestFocus();
public static void main(String args[])
Login l=new Login();
Edited by: 795772 on Sep 19, 2010 4:44 AM795772 wrote:
hye frnz... plz help me m new to java
m using ms access as database and try to create a login page where user type username and pw
i had enter valid user entries in database i checked connectivity is working i want as user login the main window must open after checking username and pw field to database but
now there is an error class not found exception sun:jdbc...... error
plz help me i had stuck frm 4 days */
<snip>The subject of this forum is Oracle databases. How does your problem relate to that subject?
Two bits of advice:
1) Make sure you ask questions in a forum related to your problem.
2) If you want to be taken seriously as a professional, drop the MS IM Speak and use the language of the forum. In this forum it is English, which is successfully used by many people for whom English is far from their native language.
Maybe you are looking for
-
How do you stop HTML widget from going full screen?
I just want the html file to play in the position it is in before you engage it. Similar to how Keynote files react.
-
Can I use same Apple ID on my old and my new IPad....and if so, how do I name the new iPad. want to keep games on one iPad and use the other for emails etc. Many thanks
-
How to avoid dual maintainence of BP in R/3 and CRM
Hello Everyone, As you are all aware we cannot maintain financial information (like company code data) in the CRM system and at the same time we cannot maintain marketing attributes in SAP R/3. What is the preferred approached used by Clients to over
-
How to solve error in table control?
Hi expert, I am a beginer in table control. I have a problem. I create a table control in that I use a search help for a column. Everything is normal if I enter a value into search help value and save . There are two situation: 1. In the first time I
-
Connect to OneDrive not working
Hello, I am new to the BlackBerry/BB10, having just moved to a BlackBerry Passport device (from a Nokia Lumia 930). I need access to OneDrive, but the OneDrive app does not seem to connect after I enter all of my correct 2-factor authentication crede