We help IT Professionals succeed at work.

How to set up a localhost for sql server on my PC

brgdotnet
brgdotnet asked
on
On my home Laptop, my SQL server is setup on my local hard drive, and I can created databases locally and access Query analyzer management studio. However at work, my Sql server does not have  a local host account, and it only accesses databases on a target server.
I can't figure out how to use my localhost account at work. First question is "Does anyone know how I can set up a localhost account on my work pc".
Second question, can I install SQL server express next to my Sql server 2008 (On my work computer)? Because I am thinking that maybe I can just have my Sql server express access my local hard drive.
Comment
Watch Question

Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
'localhost' Only works on the 'local host', the computer you are on.  It can not be used to access anything on another computer.

Installing SQL Server Express shouldn't be a problem on your own computer...  if they allow you to install software.  It is unlikely and probably undesirable to install it on another computer that has SQL Server 2008 that is used by everyone else.
Vitor MontalvãoIT Engineer
Distinguished Expert 2017
Commented:
I don't know if I really understood your first question.
What you mean? At home you have a local installation in your PC but at work the SQL Server is installed in a remote server so when you use SSMS you need to give the target server name instead of localhost? Is that?

For your second question, the answer is yes. By default the instance name will be SERVERNAME\SQLEXPRESS.
brgdotnetcontractor

Author

Commented:
At home I have my own laptop, and it is a Toshiba. I have sql server 2008 installed on it. It accesses my local hard drive.

I have a HP laptop at work and it has sql server installed, but the databases are located on other servers, and when I start query analyzer, the database I chose is located on a remote server.

So for my work HP laptop, I access databases located on remote servers using Query Analyzer.
So my question is: How do I set up my Sql server on my HP laptop, so that I can have a local
database on my local C: drive that I can access using query analyzer?
Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
it has sql server installed, but the databases are located on other servers
I don't think it works that way.  I'm pretty sure the server has to be where the database files are.  You can connect to a remote server without an SQL Server being installed on your local machine.

As fro actually having it installed on your local machine, just download SQL Server Express and install it.  I recomment you get the version that includes SSMS (SQL Server Management Studio).  You can connect to any database you have a login for with SMSS, local or remote.
brgdotnetcontractor

Author

Commented:
Well I would have to disagree with your conclusion Dave. A few years ago, I worked for a company and I was able to have a local database on my C:\ drive, and also be able to access remote sql servers on the companies servers using SQL server 2008 management studio. Typically for your own machine the username is "sa" account. Anyway it can be done.
One other person who replied to my post noted that having the full version of sql server 2008 and the Express version on my machine at the same time might not be such a great idea.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014

Commented:
True for SQL Server Management Studio which I have on a couple machines here... but it is not the SQL Server itself, it is a utility program.
brgdotnetcontractor

Author

Commented:
Hi Dave, which utility program are you referring to?
Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
SSMS, SQL Server Management Studio.  It is a utility program.  It is not the SQL Server program.

The SQL Server program does not appear on the desktop.  It only runs as a service as do all the other SQL server type programs like MySQL, Oracle and PostGreSQL.  They all require external programs to access them.  On my computer there are two services that are the actual interfaces to MS SQL Server, 'sqlwriter.exe' and 'sqlbrowser.exe'.  'sqlbrowser.exe' is used to connect to 'named instances' on port 1434.
brgdotnetcontractor

Author

Commented:
Ok, thanks Dave. I am still confused as to why I am not able to have sql server point to a local database on my c drive. Typically this involves use of an sa account.
Dave BaldwinFixer of Problems
Most Valuable Expert 2014
Commented:
From what you have said so far, I do not think you actually have SQL Server installed on your own work machine.  The 'sa' account is not necessary for that.  In SSMS, you can select any server on your network by clicking on the down arrow on the server selection.  You can even ask it to browse the network to find installed instances that are not listed.  Here's a pic of the SSMS login window on this machine.
SSMS login window
Vitor MontalvãoIT Engineer
Distinguished Expert 2017
Commented:
So for my work HP laptop, I access databases located on remote servers using Query Analyzer.
Query Analyzer it's a tool for SQL Server 7 and 2000. You can't access recent versions of SQL Server with Query Analyzer. You'll need SSMS.
Do you have SSMS in you work laptop?
brgdotnetcontractor

Author

Commented:
Yes Vitor, I have SSMS installed on my work laptop?
IT Engineer
Distinguished Expert 2017
Commented:
Can you post a screen shot on how are you trying to connect to SQL Server? Something similar as Dave posted.