I have a set of tables with data in one user schema.
I want a copy of those to another user.
Can this be done with SQL?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If the two users are on the same database, and provided sufficient
GRANTSare present, then just run the below statement in the new user schema:EDIT:
Copy the below set of statements in a text file. Replace
<oldueser>with the existing schema name and<path>with a path in the unix/windows machine where you want the spool to be written. Run this file in the existing schema. A spool file will be written in the path specified with the nametbls.sql. Take thistbls.sqland run it in the new schema, where you want the tables to be replicated.