简体   繁体   中英

Problems with connection in oracle database

Every time I restart or shutdown my computer, I need to make this command to connect to my database.

  1. lsnrctl start in shell (i'm working with ubuntu)
  2. startup in SQL commands(because it says that I'm connected as idle instance)
  3. then I connect again to sql to grant System and Object Privileges in Oracle Database, (it doesn't work and I still don't have the privileges except in shell)

So my problem is that I don't understand why I have to always tap these commands after restarting my computer.

Second is that I can't create tables or accesses to tables in sqldeveloper or in eclipse because I don't have all the privileges. Please, is there someone here who has any idea about the problem?

I don't use Linux.

However, on MS Windows, if you set listener and database services to start up automatically (when computer starts up), then database should be available to you in a matter of minutes. If you can't do that on Ubuntu, then yes - you have to start the database manually.

As of your second question: user you'd like to use to create tables, procedures etc. should be granted certain privileges. They are granted by the same privileged user that created it, such as SYS. So: you'd connect as SYS and then run the some grants (presuming that your user name is "beline"); for example:

grant create session       to beline;
grant create table         to beline;
grant create procedure     to beline;
grant create sequence      to beline;
grant create view          to beline;

There are other privileges as well; grant them when necessary.

Once granted, they'll last "forever" (until you explicitly revoke them), which means that they will still be available to you after database restarts. grant create trigger to beline;

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM