I have 3 SQL Server Windows NT processes running and they consume the resources, I read that they are instances and if I'm not using some of them I should remove them, but I'm new to SQL Server and I don't know which instance I'm using.
How can I find out which instance I'm working on? and would deleting the folders in program files be enough cause I can't find them in apps & features?
SELECT ##servername will give you server/instanceName
Server: Is your sever name (Your machine name)
InstanceName: is the instance installed
After you know which instance you are using (MSSQLSERVER in your case) follow this article to uninstall other instances.
You can get the process id from the windows task manager, and search it in the SQL Server logs. Follow this Step by step article for more information.
Also you can benefit from the sp_Who2 and sp_who procedures:
From SQL management studio run EXEC sp_Who, and you will find the process that are using the instance.
Related
Does the change of the host name of the server impact the functioning of Microsoft SQL Server?
Yes, there are some additional steps that you need to perform after changing the host name.
I could not find the relevant documentation for SQL Server 2012 online any more, but here is the official document for SQL Server 2016-2019:
Rename a Computer that Hosts a Stand-Alone Instance of SQL Server
In a nutshell, you need to execute
sp_dropserver <old_name\instancename>;
GO
sp_addserver <new_name\instancename>, local;
GO
to update system metadata and then restart SQL Server.
Additional steps (see the linked document above) might be necessary if you use:
a failover cluster,
replication,
Reporting Services,
database mirroring,
Windows groups containing a hard-coded reference to the computer name,
remote logins,
linked server configurations or
named pipes.
Obviously, the connection strings of any clients connecting to your server will need to be updated as well.
I looked at How can I determine installed SQL Server instances and their versions? already but CMD returns nothing:
C:\Windows\system32>sqlcmd -L
C:\Windows\system32>
But when using Visual Studio (v2019), I go to View > SQL Server Object Explorer, I see two SQL Server instances with system databases inside. One is called (LocalDB)\MSSQLLocalDB and the other (LocalDB)\ProjectsV13.
Both are using SQL Server 2016 (v13.0.4001). Using that I was able to connect through SSMS 2018 as well.
My question is: why aren't these instances showing up in the command line? And can I delete one of the server instance? Why are there two?
Using SSMS, in the connection manager typing the following in the server name box does it:
.
open cmd and type hostname, and use that
(LocalDB)\MSSQLLocalDB
(LocalDB)\ProjectsV13 I think this depends on the installation
I'm doing the SSRS setup in my DEV environment. I've been using (LocalDb)\MSSQLLocalDB for some of my databases. Now that I want to start using SSRS, can I use (LocalDb)\MSSQLLocalDB as a data source for SSRS? I already tried, but I'm not able to connect it. However, if I use the server name (name of my computer) it works.
Do I have to use the actual server name? Is local database (LocalDb)\MSSQLLocalDB a wrong way of doing it? I'm assuming that the actual server name will be the best practice.
If I have to use the server name, that means that I will need to migrate my databases from (LocalDb)\MSSQLLocalDB to the instance of the server name.
What do you recommend?
LocalDb instances run in your desktop session, and are meant for desktop applications (particularly Visual Studio). So no. You should migrate your databases to a service-based SQL Server instance for SSRS (which runs as a Windows Service) to access them.
We have an application called IpSwitch Whatsup and it's installed in a machine that I can connect to remotely as administrator. This is all in our intranet.
We need to connect to the sql server database being used by IpSwitch Whatsup, but this particular machine doesn't have sql server installed. On the other hand, in sql server configuration manager there is indeed a sql server installation for whatsup (the entry says SQL Server (WHATSUP)).
So, two questions:
How does one go about in connecting to this database? I'm pretty sure I know the name of the database and I already know the server name and instance, so I would like to connect to this DB from a sql server installation in another machine.
How does one configure a sql server installation to receive remote connections if it doesn't have sql server installed?
Thanks.
For the first question, you just type in (or browse) the appropriate instance name and authentication options using SSMS - which is the GUI tool used to manage sql server instances. Note - the term "sql server installation" can mean different things so it is not a useful reference.
As for the second question, review the information here. Note that any task you do in SSMS can be done via tsql - you can see the appropriate commands using the script button in the SSMS dialog windows.
And you can also (and probably should based on these questions) install SSMS on the same machine as your server instance so you can do "anything" "anywhere". Now would probably be a good time to review your disaster recovery options (and start backing up your databases regularly).
I don't have the management studio installed and cannot install the express version as there seems to be a problem with my computer set up.
However I have VS2013 and I can open up query windows.
I created Indexes but then since then I have added a lot of new data. Is there some way I can update statistics for my SQL Server 2012 database from the SQL Script command line?
Try EXEC SP_updatestats to update all database statistics.
You can access the SQL command line using the tool sqlcmd that is installed as part of SQL 2012.
Here's a link to the update statistics command that you'll need to put together and execute.
http://technet.microsoft.com/en-us/library/ms187348.aspx
You can always create a script for the update statistics command, then execute that.
If you have both SQL and SQL Express installed, please make sure that you are connecting to the correct instance of SQL Server. the machine name alone or localhost should take you to the full sql 2012, (the default instance name for this is MSSQLSERVER) and the SQL Express should have an instance name of SQLEXPRESS (if I remember correctly) you'll need to use the naming convention server\instance to make the connection (you probably knew this bit already)
Try this
EXEC sp_updatestats;
MSDN