SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2005 Forums
 Other SQL Server Topics (2005)
 Problem in assigning custom schema as default sche
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

rashidbilgrami
Starting Member

Saudi Arabia
3 Posts

Posted - 05/15/2012 :  19:14:39  Show Profile  Reply with Quote
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

India
52309 Posts

Posted - 05/15/2012 :  22:23:39  Show Profile  Reply with Quote
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

576 Posts

Posted - 05/17/2012 :  11:39:41  Show Profile  Reply with Quote
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

Saudi Arabia
3 Posts

Posted - 05/17/2012 :  18:20:14  Show Profile  Reply with Quote
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

Saudi Arabia
3 Posts

Posted - 05/17/2012 :  18:20:35  Show Profile  Reply with Quote
and thanks for your reply
Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.06 seconds. Powered By: Snitz Forums 2000