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
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Problem in assigning custom schema as default sche

Author  Topic 

rashidbilgrami
Starting Member

3 Posts

Posted - 2012-05-15 : 19:14:39
Dear All

I have one online application which is running perfectly, i got the db backup and try to run the application offline. When i run the application locally the system did not locate the store procedure name after analysis i found because of custom schema name (assigned by hosting) it is not identify the sp and table name

I found following items in the db

1) There are some tables and sp which is under DBO schema

2) There are custom tables, sp and views which are with the custom schema

What i have done before posting

1) I checked out the DB security and find the user the user have a same schama

2) The application is running with the same db user name

Major difference between local and online db

In local db i can't able to access table name with out schema name (myshcmea.tablename) but in online the same table i can eaisly access with out schema name (tablename)

what i understand that my custom schema is unable to set as a default schema under my restored database

I need some solution very urgent i worked on it last 7 days tried very thing but failed

Can any one tell me how can i resolve this issue

Note: I already tried to change the custom schema to dbo but after that applciation giving error becuase it don't identity the custom schema with many table

Waiting for your reply and its really urgent

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-05-15 : 22:23:39
are you using same credential in local as well as other db? are they mapped to same roles in both cases?

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page

Ifor
Aged Yak Warrior

700 Posts

Posted - 2012-05-17 : 11:39:41
You can alter the default schema at a user level:

USE YourDB
GO
ALTER USER YourUser WITH DEFAULT_SCHEMA = YourSchema;
GO
Go to Top of Page

rashidbilgrami
Starting Member

3 Posts

Posted - 2012-05-17 : 18:20:14
i already tried

USE YourDB
GO
ALTER USER YourUser WITH DEFAULT_SCHEMA = YourSchema;
GO

not workable i don't know why


i use one user myusername and its already maped with the db and when i saw it property it shows me the default schema as custom schema i don't know why its happened even i tried to login and check with this user but no success
Go to Top of Page

rashidbilgrami
Starting Member

3 Posts

Posted - 2012-05-17 : 18:20:35
and thanks for your reply
Go to Top of Page
   

- Advertisement -