Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Need Access DB without ObjectOwner

Author  Topic 

tripleM
Starting Member

8 Posts

Posted - 2009-12-01 : 04:59:07
Hi All,

I am tryint to setup a webapplication developed in PHP, Apache2.0 and SQLServer2000 as backend which is running smoothly on a system in UK. I got the code and database backup from the Production Server.
Restored the DB backup and table names are like sf.tablename and dbo.tablename. Same structure i got in my local system. When i try to run the application, i am getting error DBConnect Failed. I analysed the problem and made changes to a very first query like prefixed the objectowner to the tablename in the code. for example select user from sf.Users. Then login and validation done succesfully. But i cant change it everywhere. and its not required as in the production its running without the objectowner in the queries. So i am not sure if any change is required on SQLServer side. So pls let me know if any configuration/setting is required from SQLServer side?

In simple words, from the PHP code if i run query like
" select * from users " is not running . if i modify query in the code like
" select * from sf.users ". its working fine. but my query is i wont change it in the code. if i required i will change any configuration on SQLServer.

Thanks,
tripleM



tripleM

gangadhara.ms
Aged Yak Warrior

549 Posts

Posted - 2009-12-01 : 06:15:23
I guess if you change schema of your local machine as same as in production server the issue may resolve.
Go to Top of Page

tripleM
Starting Member

8 Posts

Posted - 2009-12-01 : 06:18:43
I have 2 queries,
1.just tell me why i need to change the schema. because simply i restored the DB back.
2.If i need to change, tell me how and where i need to do that?



tripleM
Go to Top of Page

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2009-12-01 : 09:23:14
you can't do that because it's sql 2000. in sql 2005 you could change the default schema of the logged in user.

you'll need to copy the login and all permissions used by the application in production to your system and log in with the same.

by the way, it's not a schema, it's an object owner.
Go to Top of Page

tripleM
Starting Member

8 Posts

Posted - 2009-12-11 : 05:58:15
quote:
Originally posted by russell

you can't do that because it's sql 2000. in sql 2005 you could change the default schema of the logged in user.

you'll need to copy the login and all permissions used by the application in production to your system and log in with the same.

by the way, it's not a schema, it's an object owner.




The Problem is resolved. it is just configuration problem.

Thanks,
tripleM

tripleM
Go to Top of Page
   

- Advertisement -