OSQL create tables without sysadmin priveledges

  • Hi All,

    I've got a problem where I'm trying to lock down our SQL 2005 servers to our developers (basically not make them sysadmins), everything is OK except that they need to be able to run scripts into the databases using OSQL.

    The problem I've encountered is... If you are not a sysadmin and run a create table command via OSQL (where you are a dbo on the database) it creates the tables as .

    This is different behavior than if the same user runs exactly the same create table command in sql query window (it creates it as dbo. )

    Does anybody know a way around this? Or alternatively do you think that using SQLCMD instead of OSQL will resolve this as this is also an option, but would just require a larger change of our processes.

    Thanks in advance.

    Stu

  • Please don't cross post. It fragments answers and wastes people's time. If you posted in the wrong forum, you should be able to delete the thread.

    Continue here

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply