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 142367
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 11, 20262026-05-11T07:55:31+00:00 2026-05-11T07:55:31+00:00

We have a SQL server that has a database for each client, and we

  • 0

We have a SQL server that has a database for each client, and we have hundreds of clients. So imagine the following: database001, database002, database003, …, database999. We want to combine all of these databases into one database.

Our thoughts are to add a siteId column, 001, 002, 003, …, 999.

We are exploring options to make this transition as smoothly as possible. And we would LOVE to hear any ideas you have. It’s proving to be a VERY challenging problem.

I’ve heard of a technique that would create a view that would match and then filter.

Any ideas guys?

  • 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. 2026-05-11T07:55:31+00:00Added an answer on May 11, 2026 at 7:55 am

    Create a client database id for each of the client databases. You will use this id to keep the data logically separated. This is the ‘site id’ concept, but you can use a derived key (identity field) instead of manually creating these numbers. Create a table that has database name and id, with any other metadata you need.

    The next step would be to create an SSIS package that gets the ID for the database in question and adds it to the tables that have to have their data separated out logically. You then can run that same package over each database with the lookup for ID for the database in question.

    After you have a unique id for the data that is unique, and have imported the data, you will have to alter your apps to fit the new schema (actually before, or you are pretty much screwed).

    If you want to do this in steps, you can create views or functions in the different ‘databases’ so the old client can still hit the client’s data, even though it has been moved. This step may not be necessary if you deploy with some downtime.

    The method I propose is fairly flexible and can be applied to one client at a time, depending on your client application deployment methodology.

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

Sidebar

Related Questions

I have a SQL Server 2005 database that has been deleted, and I need
We have a SQL Server 2008 database that has stored procedures to handle reads/writes/etc.
I have an SQL Server 2008 database with a table that has a column
I have a SQL Server database and several clients that use it (via a
I have an xml column in my SQL Server database that has records in
My product uses a SQL Server database - each client has their own deployed
I have a SQL Server DB that has a table of products, and another
I have an SQL Server 2005 table that has a varchar(250) field which contains
I have a SQL Server table in production that has millions of rows, and
I have a service that has a dependency on SQL server express (2005). Every

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.