|
|
|
|
Re: Backing up from a Schema [message #181336 is a reply to message #181044] |
Sat, 08 July 2006 16:45 |
|
Littlefoot
Messages: 21823 Registered: June 2005 Location: Croatia, Europe
|
Senior Member Account Moderator |
|
|
As a privileged user (SYS, for example), you can create a user in your database:
SYS> create user new_user identified by his_password;
Now grant some privileges in order for this user to be able to work; previous Oracle versions had CONNECT and RESOURCE roles which contained almost all necessary privileges; now, in recent Oracle database versions, those roles are here for backward compatibility. It is suggested that one should create his own roles and adjust them to his needs.
As an example, let as grant just those two roles:
SYS> grant connect, resource to new_user;
Now connect to this user:
SYS> connect new_user/his_password
Now you can (of course, depending on granted privileges) create tables, write queries, create indexes, triggers ... a lot of things. Creating database objects will turn our user into a [/i]schema[/i] ; although people usually mix terms "user" and "schema", I believe there's no much harm in it.
As you already have an export file taken from the work, you can now import those objects into newly created user. At the OS prompt issue such a command:
OS> imp new_user/his_password FILE=work.dmp
and that'll do it; you'll get a warning message that export was done by another user, but don't pay much attention to it - it is a normal condition. Finally, import should end with a line as "import finished successfully with warnings".
You might need to recompile views, packages, procedures, functions and triggers before having functional copy of your work schema at your home. Also, if there were some database links, synonyms etc. which used objects that are not accessible in your home database, you may expect some difficulties.
|
|
|
|