# Create script for a user

**URL:** <https://forums.toadworld.com/t/create-script-for-a-user/50980>\
**Category:** Toad for Oracle - Beta\
**Created:** [September 15, 2020, 6:07pm UTC](https://forums.toadworld.com/t/create-script-for-a-user/50980 "2020-09-15T18:07:20Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![espotnitz](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@espotnitz](https://forums.toadworld.com/u/espotnitz)\
**Post date:** [September 15, 2020, 6:07pm UTC](https://forums.toadworld.com/t/create-script-for-a-user/50980/1 "2020-09-15T18:07:20Z")

</div>

When I go to Schema Browser and follow the steps below the script either gets generated with only grants and no CREATE USER statement or no script gets generated if the user did not make grants to other users or roles. I expected the CREATE USER statement along with all the grants. Please see the attached.

 ![Example2S2](https://global.discourse-cdn.com/quest/original/2X/a/aede9f8106c868c35b4a5574144b2bd2bc191fad.png) ![Example2S1](https://global.discourse-cdn.com/quest/original/2X/3/3d2b9dbdb726f2dba26331a70d8e3fc28ad851c9.png) ![Example1S2](https://global.discourse-cdn.com/quest/original/2X/1/1d68277436b18faeec10c585bc3216c18ea4f89b.png) ![Example1S1](https://global.discourse-cdn.com/quest/original/2X/7/7c4481d21e69ee948cfbfd45ee28541490581e4f.png)

right click on a user, select Create, select script, script options, users, check "Grants on the user's objects to other users/roles", and then click okay

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 15, 2020, 6:11pm UTC](https://forums.toadworld.com/t/create-script-for-a-user/50980/2 "2020-09-15T18:11:44Z")

</div>

If the script were to create the user, and then also include the grants on the user's objects to other users and roles, then all of those grants would fail, because the objects don't exist yet.

---

<div class="post-metadata">

**Author:** ![espotnitz](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@espotnitz](https://forums.toadworld.com/u/espotnitz)\
**Post date:** [September 15, 2020, 6:26pm UTC](https://forums.toadworld.com/t/create-script-for-a-user/50980/3 "2020-09-15T18:26:24Z")

</div>

I see the logic now. Thank you

---

<div class="post-metadata">

**Author:** ![JohnDorlon](https://sea1.discourse-cdn.com/quest/user_avatar/forums.toadworld.com/johndorlon/32/9997_2.png) [@JohnDorlon](https://forums.toadworld.com/u/JohnDorlon)\
**Post date:** [September 15, 2020, 6:28pm UTC](https://forums.toadworld.com/t/create-script-for-a-user/50980/4 "2020-09-15T18:28:43Z")

</div>

It sounds like Generate Schema Script will give you what you want - create the user, objects and grants on those objects.

---

<div class="post-metadata">

**Author:** ![espotnitz](https://avatars.discourse-cdn.com/v4/letter/e/8edcca/32.png) [@espotnitz](https://forums.toadworld.com/u/espotnitz)\
**Post date:** [September 15, 2020, 7:26pm UTC](https://forums.toadworld.com/t/create-script-for-a-user/50980/5 "2020-09-15T19:26:43Z")

</div>

Yes. That will do it. Thank you
