I am working on to find some workaround for moving SQL Server 2005/2008 instances from one data center to another data center without changing database configuration setting at application end because application team is not sure what all places server name and database name is hardcoded. I know this is bad practice but application is developed by third party and we don't have control on application code.
So challenge here is to keep the server name and database name and IP is same.
Note : OS is not supporting for Image Backup so this option is ruled out.
Please let me know your thought.
Thanks,
Venkat.
Related
I have an application that cannot be modified that connects to a SQL Server database using a hardcoded connection string with windows authentication.
I need to move the database to another server but as I cannot modify the hardcoded connection string - I am looking for something to act as a local connection that will then relay the query to the remote database and return the result back to the app.
The only other way I can see to do this is to upgrade from SQL Server Express and use database replication but that will be expensive option for what I need.
Can anyone suggest any software to do this or recommend an alternative method?
Thanks
Update:
The connection string also uses Windows authentication which will not work on the remote server.
If your workstations don't need access to the old server, you could perhaps solve this with DNS, using a cname record to point the old server name to the new. If you can't do this organization wide, you might be able to use entries in the hosts file on the impacted workstations.
I just saw this in the comments:
the database server is the same machine where the app runs (ie, 'localhost')
In that case, you want to figure out what the connection string is using, and the hosts entry should be able to accomplish this.
In old server you can define linked server, pointing it to new one and create queries to link to remote tables; you can use different credentials for it. You may get some performance problems (esp update statements may slow down).
We are maintaining Microsoft Access 2016 database for Locker Management Inventory. The database contains complex queries (Computed Columns) , Reports and Database backend file is also on the same computer.
We are required to use SQL Server Management Studio 2012 as our Back-end for Microsoft Access Forms and this form is required to be accessed by 10 Users on LAN. Please guide Step by Step Procedure for this task.
Thanks in Anticipation.
Access is inherently multi user and has no problem linking to tables on a SQL Server that is on the same LAN.
The design steps are typically to design the application in Access, unsplit, in a single file. Then when the app is ready - one splits the file into a back end and front end that are linked. One can copy the front end multiple times for multiple users.
These steps above are all Access and you'll find good documentation online and in any textbook for the Access database.
The final step, if one must use SQL Server as the back end, is to then import those tables from the Access back end file into the SQL Server. This is not uncommon but the instructions for this would be in SQL Server area.
Hope this helps.
One must understand the fundamental architecture: a multi user Access application is 2 files: front and back (this is actually what they are called). There is only 1 back file - it is where the tables are held. The front file can be copied repeatedly, 1 per user, and all fronts link to the single back end file.
SQL Server is the back end and Access is the front end - in your case.
One only really needs the SQL Server product as the back end file if the payload is particularly high. Pay load is combination of the quantity of records and simultaneous users.
The basic approach is to split your database into two parts. A built in database splitter is built into Access. Once done, you could in theory just place the back end accDB access file on some server folder that is shared to everyone. You then use the linked table manager in Access to link to the back end file.
Since you been “mandated” to use SQL server, then you would migrate the back end accDB file tables to sql server, and then re-link (again use the built in table manager) to link the tables to SQL server. So the process for linking to an access file, or linking to sql server is near identical. The end result is your access application will now be using tables that reside on SQL server. From a developer and even user point of view your forms, code, reports etc. will continue to run as before.
And as a general rule it only makes sense to run SQL server on your machine for development use. You would have to copy/transfer the sql database to that “mandated” instance of SQL server they are telling you to use that presumably is running on some server. It would not make sense to mandate use of SQL server without you being provided with some server running SQL server.
It certainly is possible to allow users to connect to YOUR computer running SQL server, but that seems less than ideal since if you re-boot, shut down or your computer freezes, then all other users would suffer a connection break and much inconvenience.
I mean, right now if you have a shared folder for all users, such folders are typically NOT placed on one users computer, but some dedicated machine that acts as some kind of server for everyone.
So if they are telling you to use SQL server, then it quite much assumed they are providing a dedicated machine that is running SQL server. So certainly for development you can (and even should) run SQL server on your machine. However you would then have to transfer that database to the computer/server they are telling you to use with SQL server. And then you would re-link your Access application tables to now point to that production server. The last step would be to then distribute this correctly linked application to each user. So just like all software you purchase such as word, or Excel, you STILL install that software on each computer. Now that you are building software, then you as a developer will adopt the same concept – that is to distribute and install your software on each workstation. So while you might use word or Excel (or Access) from the local computer, you also may well often “share” some data files (but NOT the application) on the server.
As long as the application you distribute to each workstation is correctly linked and points to the server based edition of SQL server, then you all be sharing the same database. You will NOT in practice have multiple users working on and using the application you created, but distribute that Access application to each workstation. How you “get” that application to each workstation is not really any different then how you would supply a word document or Excel sheet – the only requirement here being that each workstation gets their own copy. Since each users copy of this application has linked tables that point to SQL server, then you all working on and sharing a common database.
So the first concept to grasp is that of spitting a database. I explain this concept here:
http://www.kallal.ca/Articles/split/index.htm
As for some steps and migrating to sql server, here is a great starting point:
https://www.fmsinc.com/MicrosoftAccess/SQLServerUpsizing/index.html
We have a single SQL server hosting 2 instances. One instance just cannot be upgraded do to legacy software. A separate project is addressing that but is over a year away. The second instance can be upgraded, but there are thousands of Excel workbooks pointing to it for reporting purposes. So in short neither connection string can be changed at this time.
Is it possible to redirect a connection from one instance to another on a second server while keeping the connection strings the same?
I need a connection from SqlServer\Instance1 to stay on that instance while SqlServer\Instance2 goes to SqlServer2\Instance2
Creative solutions may work but need to be rock solid and maintenance light.
I believe what you may be looking for has something to do with tunnels. SQL server configuration manager > SQL Native XX.X Configuration. Here, you can specify alias for instances.
Go nuts!
Please keep in mind that you might need to get your network admin involved if both DNS name are being used at the same time. A local DHCP entry can help you come up with a proof of concept. This tunnel works for instances.
I have written an application in vb.net, based on SSCE. Now I need to shift in SQL Server Express because I need to run the application on Sharing (LAN) and several users need to access the database at the same time.
I am absolutely new to SQL Server. I need to know the following:
1) Do I create SQL Server DB by Adding New Item in my VS 2008? or they need to be created in SQL Server mgmt Express ONLY?
2) How do I distribute these database, same way like SSCE databses?
3) Can these databases be used like we use Access DBs in sharing (just put in the shared folder)?
4) If no to Question 3, how to set the connection string as I donot know the name of computer of the user who will install my application.
Thanks
To create a new database, the easiest thing would probably be to do
into SQL Server Management studio, open the instance of SQL Server
where the database will live, right click on the "Databases" folder
and select "New Database...". Once the database is there you can add tables and the like.
You will not distribute this database. Instead you will include a
connection string in your application that references this DB. All
data will live on a single instance.
No, you will not share this like you shared an Access Database. One
problem I have with Access is that the untrained masses are set
loose on the database to do as they please. I would give as few
people as possible access to the database. And when you give them access limit their permissions to the bare minimum they need. If you want someone to
change the data in there create an application that allows them to
modify table records as you see fit.
Take a look at this link for an explanation of how you should setup
your connection string. The connection string itself will not vary
between machines. You will just need to use the appropriate account
that has the appropriate access to the DB. You will also need to
make sure that the server where the DB is running is accessible.
Good luck!
I have to move a production SQL Server database onto another server soon, and I'm keen to catch any little programs which have been written by hard coding the server name into them. I have only recently inherited the system, and there seem to be a lot of Excel files scattered around connecting in using ODBC connections.
My initial thought was to find something that redirected any SQL server requests for a particular database to the new server, but I'm not aware of any such beastie. Anyone know if such a thing exists?
Ideally, it should redirect at server level and log the source so that I can go and change it to point to the new one.
If the server name is hard coded, why not give the new server the same hostname? If it's listed in DNS set the TTL to a very low value now (2 minutes) and then when the changeover happens the downtime of moving the actual database files across will help smooth over the transition.
Alternatively you can be evil, turn the other server off and force people to fix their apps when stuff breaks - which method you choose is down to your sysadmin style.
The SQL Server Client Network library supports aliases and redirects, see How to: Create a Server Alias for Use by a Client (SQL Server Configuration Manager). The alias is global for the client machine though, meaning all applications on the client host machine will obey the alias redirect.