Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7967969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:00:14+00:00 2026-06-04T07:00:14+00:00

We have a relatively new database project that we have been writing views and

  • 0

We have a relatively new database project that we have been writing views and stored procedures for over the last 6 months or so.

  • The database works
  • The views work
  • The stored procedures work

However, the general scope of the project has grown considerably since this project was started, and now some of the table names and field names are a little off base.

For example, the main table in the database is called SheetMetalRequest, but the project has grown to where an actual Sheet Metal Request is now but one of the enumerable types of requests. So, the name on this table is misleading to people coming into the project.

In addition to this main table, there are various columns in other tables that need to be changed as well (think SheetMetalRequestID, for example).

The problem with making this change are the 10 different Views and 30 Stored Procedures that are now a part of this database. Naturally, if something gets changed and not everything is changed with it, our working pre production database could take several man hours to get back to a running state.

It would be GREAT if there were a Refactor ability somehow like what exists in Visual Studio.

SELECT SERVERPROPERTY('productversion'), SERVERPROPERTY('productlevel'), SERVERPROPERTY('edition')

productversion | productlevel | edition
10.0.1600.22   | RTM          | Standard Edition (64-bit)
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-04T07:00:15+00:00Added an answer on June 4, 2026 at 7:00 am

    If a tool like SSDT does not work for you for whatever reason, you could do this manually at your own pace. Sometimes a “click one button and go home” approach is actually not what you want.

    You could start with introducing synonyms, e.g.

    CREATE SYNONYM dbo.Requests FOR dbo.SheetMetalRequest;
    

    Now you can refactor your code in pieces, pointing each reference to the new name. When you are confident that you have captured all references (and this won’t be easy even with a tool like SSDT, since it can’t see code outside of the database – or even code in dynamic SQL inside the current database), you can drop the synonym and rename the table:

    BEGIN TRANSACTION;
        DROP SYNONYM dbo.Requests;
        EXEC sp_rename 'dbo.SheetMetalRequest', 'Requests', 'OBJECT';
    COMMIT TRANSACTION
    

    (You’ll also want to update all of your modules with sp_refreshsqlmodule in a loop, twice, to make sure you’ve completely corrected dependencies.)

    This would allow you to update different portions of your code (not just views / stored procedures but also middle-tier classes and even front end stuff) to reference the right names, and not have to do it all at once.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am relatively new to Perl.I have been trying to insert data to database
I am relatively new to PHP/MySQL and have been having a problem that I
I'm relatively new to NHibernate, but have been using it for the last few
I am relatively new to assembly language. I have found so many tutorials that
I am relatively new to php and have a feeling that I am going
I am relatively new to MySQL and PHP and I have been trying to
I am relatively new to columnar database, please forgive ignorance. Lets say I have
I am relatively new Java developer that's been thrown in the deep end, my
I am relatively new to rails and have been working my way through the
I'm relatively new to using PHP and have been working on using it to

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.