Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Creating a SQL User when making a temp table

Status
Not open for further replies.

ChuckG

MIS
Joined
Feb 28, 2001
Messages
211
Location
US
Running SQL 2005 and have a couple of programmers who have a Temp database in SQL that they routinely create/delete tables from within various programs.

Right now, if either of these programmers create a new temp table it's created as 'dbo.PR_2T0WQWMW' or
something similar. (the PR_2T0WQWMW is the random temp name they are using).

Now both of these people are members of a Domain group called SQL Users.

Their attempts to add and remove these temp tables are working fine for them.

Now we add a new user into the equation.
This third user, has been added to the same domain group as the programmers (SQL Users), but when he attempts to create a temp table (running the same process as the two programmers) it creates a new user in the Security>Users folder for that database, the username is DOMAIN\USERNAME
who has no database role membership, and under Schema's owned by this user is one called "DOMAIN\USERNAME".
and it creates a table called "DOMAIN\USERNAME.PR_2X0lO0ZT"

We're at a loss as to why this one new user is having a personal account automaticly created, and instead of creating tables with dbo.xxxx it's creating domain\username.xxx

Anyone have any suggestions for me to pass on?

Thanks
Chuck
 
YOu can specify dbo as the owner in the create table statement.

Questions about posting. See faq183-874
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top