Is Changing a SQL Server Server Name Advisable

I got this wild hair to build a website. I went back to HTML and CSS and relearned enough to create a number of web pages for entering data that will be used on the website. That led to the need to gather data from those forms and store it where it could be accessed and used later.

A few weeks back I started to learn about SQL because I knew I needed a database to support my website. I looked around first trying XAMPP, MySQL and MyphpAdmin but got discouraged by the interface. That led me to Microsoftā€™s free SQL Server (MSSQLS) and Sequel Server Management Studio (SSMS). Iā€™ve learned enough to create 8 or 9 tables that will contain my data. By no means do I have even a basic understanding of SQL, but I did install the tools and Iā€™ve been using them to create tables, etc.

Iā€™ve reached the point where I need to learn how to take data entered on those forms I created and store it in my database. But it soon became apparent that my server name is a kludge.

I chose the default name when I installed MSSQLS which is basically my system name in Windows. This is too funky to remember for entering the server name in php and elsewhere; so I thought I might rename it to something simpler that I could remember and type accurately. A little searching led me to issues I donā€™t understand about server names; so, before proceeding I thought to get advice here.

I donā€™t have any other users accessing the server. The only thing ā€˜attachedā€™ to it is my instance of MSSQLS and its UI, SSMS. I can proceed without fear of disrupting anyone elseā€™s use of the server.

Iā€™d like the server name to be simple, something like ā€œmyserverā€ but a little less easy for hackerā€™s to guess. Should I proceed to rename it? If so, what cautions should I observe in the process? If I should lose the database Iā€™ve created, I can easily re-create it even if my backup/restore doesnā€™t work.

Any advice?

Programmatically, you would just be entering the server name once, and store it in a variable. All the code will refer to the variable server for example. You shouldnā€™t hard-code it or need to type it over and over.

If itā€™s the local host you might just refer to it as 127.0.0.1 the loopback IP

Alternatively you could call it anything else and enter a mapping in your local hosts file to the correct name or IP

1 Like