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

Popular posts from this blog

delphi - How to convert bitmaps to video? -

jasper reports - Fixed header in Excel using JasperReports -

python - ('The SQL contains 0 parameter markers, but 50 parameters were supplied', 'HY000') or TypeError: 'tuple' object is not callable -