• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1779
  • Last Modified:

Public Sequence ??

Hello,

I realise that the compilation problems I am having with my sequences, is because they belong to the ALCIE user. They are not public. I cannot create a SYNONYM for a SEQUENCE.

What do you advice ?
How can I make my sequences public ?

PT
0
ptreves
Asked:
ptreves
1 Solution
 
morphmanCommented:
You should be able to create a public synonym for a sequence...

'9,7218' scott@XPC>connect scott/tiger
Connected.
'9,7218' scott@XPC>create sequence test1;

Sequence created.

Elapsed: 00:00:00.00
'9,7218' scott@XPC>create public synonym test1 for scott.test1;

Synonym created.

Elapsed: 00:00:00.00
'9,7218' scott@XPC>
0
 
BobMcCommented:
You dont necessarily need a synonym to access the sequence, you can always reference it as ALCIE.<sequence>.

What you need is privileges on it.

Log on as user ALCIE and
grant select on <sequence> to PUBLIC;

Any user should now be able to access it - in effect its public

HTH
Bob
0
 
Mark GeerlingsDatabase AdministratorCommented:
Both of the other suggestions are correct: you can create public synonyms for sequences, but with or without a public synonym, you stll need to "grant select on [sequence_name] to public;" if you want other users to select from it.  A public synonym just allows anyone to refer to it by name only.  Without the synonym, any other user has to refer to as [schema].[sequence_name].
0
NFR key for Veeam Backup for Microsoft Office 365

Veeam is happy to provide a free NFR license (for 1 year, up to 10 users). This license allows for the non‑production use of Veeam Backup for Microsoft Office 365 in your home lab without any feature limitations.

 
ptrevesAuthor Commented:
Hello,

I have a strange situation with my database. User ALCIE exists but I cannot connect to the database under that user. I can only connect as the SYSTEM/MANAGER user.

I get some stange message like:

SP2-01.... Not connected

1) Anything I can do about this ?
I don't have a choice if I want to compile my forms/reports to create synonyms of all my tables and Sequences ...

Your toughts ...

PT
0
 
annamalai77Commented:
hi

why u cannot connect to the database using the alice user. u should be able to . r u trying to connect to the database using sql plus. if yes then u should specify a connect string also which u should find it in the tnsnames.ora. if no entry is created for that, then create one and then try it.

use net8 easy config from ur oracle program menu and then create a new tnsnames.ora entry.

regards
annamalai
0
 
JankovskyCommented:
Connect as system/manager and check an existence of ALICE user

select * from  DBA_USERS.

If it isn't, check if You're connected to proper schema (connect ALICE/<pw>@<tns alias>) according to previous post.

Bob
0
 
seazodiacCommented:
Ptreves:

This has something to do with your import previously.

Now try this to fix ALCIE connection problem:

from the DATABASE SERVER machine (your linux server where the database is hosted)

Make sure you log into the LINUX as Oracle databse user usually as "oracle"

$ sqlplus /nolog
SQL>connect / as sysdba
SQL>grant connect, resource, CREATE PUBLIC SYNONYM to alcie;



then you can log in as ALCIE to create public synonym for sequence





0

Featured Post

Technology Partners: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Tackle projects and never again get stuck behind a technical roadblock.
Join Now