AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |
Back to Blog
Sql server rename column11/3/2022 Existing compiled plans should work, as I would guess these are bound to the object id in the plan, but any recompilation might fail because trying to find the old schema name would be an issue. #Sql server rename column codeI get the reasons not to allow this, as all your code will use the old name. I'm not sure why, as this is really a meta data item in a DMV somewhere. Once a schema is set, we can't alter the meta data. A quick hint, there is no rename syntax, but we'll show how you can move a class of objects to a new schema. This article looks at the way in which you might try to rename all the objects in a schema to a new schema name. I don't recommend this, but I know that changing process is hard. This is often a way of avoiding conflicts in a shared database. When their code works, someone moves their object to the dbo (or other) schema, where it gets "merged" into the main application schema. The developers work in their schema, such as the "Steve" schema. I've even worked in some environments that use schemas like branches, with a schema for each developer. These allow the same table structure that might exist in other schemas, and help organize objects that are related, but separate. In other places, schemas are used for different purposes, such as staging tables with an ETL schema, auditing with an Auditing schema, and more. In some development shops, everyone always uses the dbo schema and that's it. Schemas are a construct that it seems are either never used or extensively used in different organizations.
0 Comments
Read More
Leave a Reply. |