-
Function to create metadata
Hello guys,
I'm lost. I'm searching the web (google), Oracle-books and dbasupport.com for this, but no result... I know it is on this site, but I still can't find it
The problem: I want to copy all users from one database, so I can introduce them into another db.
In DBA Studio (Oracle 8.1.7.4.9) you can choose "Show Object code" and will provide you with the correct create script.
I know there's some kind of DBMS_METADATA package that will return a create script. But I couldn't find it.
Can someone enlighten me?
Humble grasshopper hops around.... confused...
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing.
-
Can't you use export/import with ROWS=N?
MH
I remember when this place was cool.
-
I think your looking for DBMS_METADATA.GET_DDL which was introduced in 9i
HTH
Jim
Oracle Certified Professional
"Build your reputation by helping other people build theirs."
"Sarcasm may be the lowest form of wit but its still funny"
Click HERE to vist my website!
-
That's why I couldn't find it... Thanks Jovery !!
Mr. Hanky: well, that's worth a try. I can create a script that creates a batch file, that executes "imp user/passw@db fromuser=x touser=x rows=N" for each user...
Thank's !!
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing.
-
I have a loooooong list of users spooled in a text file.
Is there a way to make a delimited horizontal list out of this 'vertical' list of names?
Example:
Now:
JOHN
LISA
MARTIN
Result:
JOHN,LISA,MARTIN
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing.
-
Write and UTIL file.
step 1) Read from file1 one which data like...
JOHN
LISA
MARTIN
step 2) write to file2... add COMMA to the value from file1.
Just check UTIL_FILE package whether you can append (Iam nit sure).
HTH
Cheers!
OraKid.
-
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing.
-
awk '{ a=a"," $0 } END { print substr(a, 2) }' your_text_file
-
Pando? What dialect are you talking?
Furthermore: I tried something, but now I see that many users are only created so they can access the application. The users have no objects, but are granted select/insert/etc rights to access the application-schema. Great!
Now I think to use to create a script from selecting DBA_USERS to create all those users at the other db.
Question :
How do I transport the password?
The following statement fails:
SELECT 'CREATE USER '||user_name||' IDENTIFIED BY '||password||';'
FROM DBA_USERS;
Is there a trick to create a users password by using the encrypted password in DBA_USERs?
Last edited by efrijters; 09-11-2003 at 10:27 AM.
An expert is one who knows more and more about less and less until he knows absolutely everything about nothing.
-
you can get the password by one method, but before populating into that table, you need to expire the acc & when login the user will have to enter new password. then you can capture old & new pass in the table using a function and assinging a profile.
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|