1. Paul Murray
  2. PowerBuilder
  3. Sunday, 6 May 2018 04:25 AM UTC

Greetings All,

It seems like I have created all of my datawindows in all of my applications using an SQL Login that has dbo rights.

So now we are trying to implement new SQL Logins without DBO rights and the tables appear as 'dbo.table_name' instead of 'table_name'.  And the application does not work and I think it is because the datawindow cannot find 'table_name' because only 'dbo.table_name' is available.

Is there a workaround for this without me having to open the source of each datawindow in each application and doing a replace of 'dbo.' with ''?

Thanks!!

Paul

Lubos Nevesely Accepted Answer Pending Moderation
  1. Monday, 7 May 2018 08:39 AM UTC
  2. PowerBuilder
  3. # 1

In SQL anywhere You can try this.

GRANT CONNECT TO NewUser IDENTIFIED BY "xxx";
GRANT GROUP TO DBO;
GRANT MEMBERSHIP IN GROUP DBO TO NewUser;

Lubos.

Comment
  1. Lubos Nevesely
  2. Monday, 7 May 2018 08:45 AM UTC
and grant all table like this



GRANT DELETE, INSERT, SELECT, UPDATE ON dbo.yable1 TO NewUser;



 

  1. Helpful
There are no comments made yet.
mike S Accepted Answer Pending Moderation
  1. Sunday, 6 May 2018 11:46 AM UTC
  2. PowerBuilder
  3. # 2

is this MS sql server?  some version after 2005?

what is the user's default schema? it should be set to dbo if object are all in dbo schema.  It will default to their username/login if you don't set it otherwise.  you can use sql enterprise manager to look at the user and see their default schema. (user, not login)

Unlike oracle or postgresql, you can't set a schema for the duration of a session.  So you do it during the initial create of the user, or later with alter user.

Also make sure the user has rights to the dbo schema.  

 

 

Comment
  1. Paul Murray
  2. Monday, 7 May 2018 05:24 AM UTC
Thanks Mike,



I think it turns out that I was using a login with DBA rights (as opposed to DBO rights).  Members of my team say it should not matter when deployed, so perhaps I am barking up the wrong tree?



Thanks!!



Paul

  1. Helpful
There are no comments made yet.
  • Page :
  • 1


There are no replies made for this question yet.
However, you are not allowed to reply to this question.
We use cookies which are necessary for the proper functioning of our websites. We also use cookies to analyze our traffic, improve your experience and provide social media features. If you continue to use this site, you consent to our use of cookies.