• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 384
  • Last Modified:

Sql Server 2005 Database Names

I know this is highly unorthodoxed but here is the scenario

I have a DB named RCSQL.  This RCSQLDb is used by a purchased 3rd party software called Zoll and clients access the software via remote desktop.

I have another piece of Software that integrates with ZOLL called Ezpcr to provide other fuctionality not provided by ZOLL to the client company.  Its Database is PCR

However Ezpcr, software combines data in tables in stored procedures from the two databases CAD and PCR.

Now this web based software was never meant to be taken out of house.  Meaning installed as a standalone piece and was meant to been done via hosting for other companies.

I have to now create it so it can standalone on another server where it accesses the client's own copy of the ZOLL database.  Their Database is called CAD and it is referenced through installs on different machines with the client software.

So know I have a SQL Server with PCR DB and CAD DB for the Zoll Software.  But for the EZPCR software to work the Zoll software DB needs to be named RCSQL not CAD.

My Question is can I make some form of an Alias or mutiple datbaase names for the CAD DB that is on the client server that point to the same database.

Meaning
CAD and RCSQL database names point to the same database on the clients server.

This way two sets of code does not need to be created and maintained just for the databasename reference.

I hope you guys and gals followed that.  And yes I know this is not usual or best practice.  But this is just a fix until I build new software which will no longer do that.

So I don't have to maintain two sets of code and do a massive change to the existing code all for a database name.
0
angelalaw
Asked:
angelalaw
2 Solutions
 
Patrick TallaricoCommented:
Could installing it on a second instance of sql server solve the problem?  Perhaps you could install all of this as a standalone installation on a secondary instance of sql server so that you can name the databases whatever you need.

I am unsure if you need the data between the current system to synchronize with the new standalone system. You could set up some sort of replication or replication process if you need to synchronize data between the two instances.  You should be able to set each instance as a linked servers to the other.
0
 
Ephraim WangoyaCommented:
>>CAD and RCSQL database names point to the same database on the clients server

This is not possible as far as I know
0
 
SJCFL-AdminCommented:
Perhaps we need to refame the issue.

You have a customer that has chosen to call a databse 'CAD' that most every other ZOLL customer calls 'RCSQL'. Correct?    (And we are a ZOLL customer, and we do indeed have a database named RCSQL but not CAD that is used by the ZOLL package...)

You have software that wants to refer to a database called 'CAD' and the application expects it to be in the same instance as ZOLL.  The references are hardcoded and there is no easy way you can run throgh a converted to change the references.  Especially having chosen a database name as short as CAD where you would get numerous false conversions...  (Not a critisism, just a qualification)

And Sql Server isn't the easiest for allowing parameterized database names...

It does, however handle schema very well.  ZOLL tables are all in the dbo schema.  It is doable ( but you would need to be careful on maintenance / upgrades) but you could establish your tables under the same database under a different schema.  

This is not my favorite resolution, but it might work if your application could handle the named schema.

A better solution would be to contact ZOLL and see how difficult it would be for the customer to rename their database.  After all, the standard name for the ZOLL billing databse is RCSQL.  It surely must be much easier for everyone if they went with the standard naming convention.  I wonder if even the customer is wondering why they insisted on a different name at this point.  It would be like deciding to call 'Excel' 'AddIt'.whenever you asked a question everyone must be wondering what you are taking about?
0
 
angelalawAuthor Commented:
I gave partial solution answers.  The ewan was correct as far as I can tell this is not possible on the smae sql server.  And SJCFL had better information for me about Zoll software itself which helped. stmpt had a solution but i think that would be way more expensive and create a huge slowness issue.
0

Featured Post

Free recovery tool for Microsoft Active Directory

Veeam Explorer for Microsoft Active Directory provides fast and reliable object-level recovery for Active Directory from a single-pass, agentless backup or storage snapshot — without the need to restore an entire virtual machine or use third-party tools.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now