Stored procedure not showing under list

  • hi

    ok i found it under database but in different schema,how to change schema to dbo

  • ok i found it under database but in different schema,how to change schema to dbo

    Did you miss it last time?

    If ALTER works, good else recreate it with new SCHEMA NAME.

  • sp_changeobjectowner 'wrongschema.procname','dbo'

    Lowell


    --help us help you! If you post a question, make sure you include a CREATE TABLE... statement and INSERT INTO... statement into that table to give the volunteers here representative data. with your description of the problem, we can provide a tested, verifiable solution to your question! asking the question the right way gets you a tested answer the fastest way possible!

  • daveriya (11/11/2011)


    hi

    ok i found it under database but in different schema,how to change schema to dbo

    DROP and recreate (and specify the schema) or use ALTER SCHEMA to transfer the object.

    ALTER Procedure won't work and sp_changeobjectowner is deprecated SQL 2000 syntax that shouldn't be used any longer

    The Alter Schema syntax would be

    ALTER SCHEMA dbo TRANSFER object::<current schema name>.<procedurename>

    Gail Shaw
    Microsoft Certified Master: SQL Server, MVP, M.Sc (Comp Sci)
    SQL In The Wild: Discussions on DB performance with occasional diversions into recoverability

    We walk in the dark places no others will enter
    We stand on the bridge and no one may pass
  • thanks everybody,my prob is solved now

Viewing 5 posts - 16 through 19 (of 19 total)

You must be logged in to reply to this topic. Login to reply