sql server - rename function on live db to match local db -
i'm having trouble table function created in sqlserver 2008.
i created in local db , appears as:
[dbo].myfunction when view in management studio.
but when create function on live db (im using shared hosting btw) appears as:
[myusername].myfunction when view in management studio.
this causing me problems using sqlmetal generate classes based on db. i'd rather names consistent both db's
how can rename it? tried modifying tthat didnt work
run following statement (with user has sufficient permissions)
exec sp_rename '[myusername].myfunction', '[dbo].myfunction'
when user not member of db_owner role, object create without specifying schema created in "user schema"
to prevent in future, create function as:
create function dbo.myfunction() returns ...
Comments
Post a Comment