Solved

Sql Server 2005 Database Names

Posted on 2012-04-04
4
368 Views
Last Modified: 2012-06-21
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
Comment
Question by:angelalaw
4 Comments
 
LVL 6

Expert Comment

by:Patrick Tallarico
Comment Utility
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
 
LVL 32

Accepted Solution

by:
ewangoya earned 350 total points
Comment Utility
>>CAD and RCSQL database names point to the same database on the clients server

This is not possible as far as I know
0
 
LVL 6

Assisted Solution

by:SJCFL-Admin
SJCFL-Admin earned 150 total points
Comment Utility
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
 

Author Closing Comment

by:angelalaw
Comment Utility
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

Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

Join & Write a Comment

Entering time in Microsoft Access can be difficult. An input mask often bothers users more than helping them and won't catch all typing errors. This article shows how to create a textbox for 24-hour time input with full validation politely catching …
Whether you've completed a degree in computer sciences or you're a self-taught programmer, writing your first lines of code in the real world is always a challenge. Here are some of the most common pitfalls for new programmers.
This video shows how to set up a shell script to accept a positional parameter when called, pass that to a SQL script, accept the output from the statement back and then manipulate it in the Shell.
Viewers will learn how to use the SELECT statement in SQL to return specific rows and columns, with various degrees of sorting and limits in place.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now