This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | |||
resources [2011/11/28 21:39] k2patel [Admin SQL] |
resources [2012/02/23 18:01] k2patel [Admin SQL] |
||
---|---|---|---|
Line 63: | Line 63: | ||
== Read Only User == | == Read Only User == | ||
This only allow user to access database but can not write to it.\\ | This only allow user to access database but can not write to it.\\ | ||
- | **NOTE : Before you grant make sure you selected database else it could not work** | + | <note important>Before you grant make sure you selected database else it could not work</note> |
<code sql> | <code sql> | ||
Line 70: | Line 70: | ||
GRANT SELECT ON ALL TABLES IN SCHEMA public TO carol; | GRANT SELECT ON ALL TABLES IN SCHEMA public TO carol; | ||
</code> | </code> | ||
+ | |||
+ | <note tip>If there is ERROR : pg_dump: The command was: LOCK SEQUENCE public.client_group IN ACCESS SHARE MODE See next Section </note> | ||
+ | |||
+ | <code sql> | ||
+ | \dp public.client_group; # check permission | ||
+ | GRANT SELECT ON ALL SEQUENCES IN SCHEMA public TO backup; | ||
+ | </code> | ||
+ | |||
+ | <note tip>Even you can use above commands to create backup user for specific database.</note> | ||
==== Getting Connection Information ==== | ==== Getting Connection Information ==== |