How to find new server name and why the last not working - ssms

I have Microsoft SQL Server 2016. I used to go in with a server name and there was no problem.
Recently there was a problem with the boot file, also known as the 0x00000034 blue screen error.
After the patch, it does not let enter the local server name.
Before
but the result
I tried other names and also examined similar questions without any good results.
for example-
How to find server name of SQL Server Management Studio and also How to find server name of SQL Server Management Studio but without any success.

There might be an issue with the connection to the server instance. I would try the troubleshooting steps in the question and answer from this post How do I fix the error 'Named Pipes Provider, error 40 - Could not open a connection to' SQL Server'? or from this video https://www.youtube.com/watch?v=810cv3PunkA

The server name, that you enter there is the name of the computer, on which the SQL Server has been installed. This is called "default instance", because you do not specify a name of the instance, which is in the format "computer_name\instance_name". If you are trying to connect to an instance (either default or named) installed on your local computer, you can substitute computer_name with . (dot), i.e. you can connect to a default instance on your computer by giving ., or to a named instance as .\SQLEXPRESS for example.
So in your case if you specify only a dot for server name, you should be able to connect. If you don't connect, then the SQL Server instance is not working. You can check is the service started, but you may have to reinstall SQL Server.
If the connection is successful, then you can keep using . (or (local)). If you want to find your computer's name, from Windows Explorer right click This PC and select Properties, then look at Computer name:.
If you still can't connect to the SQL Server using this computer name, then you have issues not related to the SQL Server engine itself. Open a command prompt and try to ping the computer name: ping desktop-7t2s4sm. If you get an error, then you have a networking issue.

Press ⊞ Win + R or type run in start (open run)
Type services.msc
Look for SQL Server (MSSQLSERVER)
Right click on it
Click on start

Related

SQL Server Browser won't start

I want to start playing around with databases in Java to help with my university work however I can't get SQL Server to work properly. I've installed it using the wizard and selecting 'Basic' the installing SSMS. However when launching SSMS I get Error 26. When researching this it says to make sure that the SQL Server Browser service is running. Unfortunately this is the issue, every time I try to start the service it fails.
All the fixes I've seen about this topic have been related to servers on another machine where as I am trying to run the server on my own PC. I've tried them anyway but nothing has worked so far. The only thing I can find that might give you a clue in helping me is that in the log file it says that it failed to register the SPN.
When working on my local machine, I don't usually need SQL Server browser - but my SQL Server itself isn't set up to run automatically.
You can go to services (either via window and search for 'services', or in Windows 10 open the task manager, go to the last tab 'services'). Find the 'SQL Server' service (it helps to sort by description column) and right click -> start.
If you take note of the name (default is 'MSSQLSERVER') you can start the service (e.g., in a batch file, from command line) using sc start "MSSQLSERVER" (or whatever your server instance is called).

Cannot connect to local SQL SSMS2014

I just installed SQL Server Management Studio 2014 and I am trying to log in to my server but it is not allowing me to log in. I have attached a screenshot but basically when I enter my server name is say "Cannot connect to MYSQLSERVER" I have attached that screenshot a well.
Solved. I needed to add my machine name to the server name. Thank you #JiggsJedi for making me realize this.

SQL Server 2008 Error 233

I'm creating new login in SQL Server 2008 with following sql script:
CREATE LOGIN [xyz] WITH PASSWORD='xyz',
DEFAULT_DATABASE=[master], DEFAULT_LANGUAGE=[us_english],
CHECK_EXPIRATION=OFF, CHECK_POLICY=OFF
It creates new login successfully. But when I try to login with it using SQL Server Management Studio it fails saying:
A connection was successfully established with the server, but then an error occurred during the login process. (provider: Shared Memory Provider, error: 0 - No process is on the other end of the pipe.) (Microsoft SQL Server, Error: 233)
What's wrong? How do I solve this issue?
Here is how I done it, maybe it works for you too.
login Microsoft SQL Server 2012 with windows authentication.
right-click onto the server name in Object Explorer and click Properties
In the new tab click Security
select SQL Server and Windows Authentication
Ok
Close the SQL server management studio.
start+run
write services.msc
search for SQL there and restart all services.
that works for me.
It's also possible that you're trying to use SQL Server Authentication without having enabled it. To fix this, right-click Properties on your server instance in SQL Server Management Studio, and update the security settings to include "SQL Server and Windows Authentication mode".
Looks like you're trying to connect using named pipes, but SQL Server is not listening on that protocol. See MSDN.
The two fixes MSDN suggests are:
Connect using TCP/IP, or use the SQL
Server Configuration Manager to
enable remote connections using named
pipes.
Using SQL Server Configuration
Manager on the client computer, move
TCP before named pipes in the
protocol order list.
I had a similar issue:
1. log in as the master user or windows authenticated user.
2. right click on the database --> properties --> security -->
3. change Windows Authentication mode to "SQL server and windows authentication mode" by clicking on the radio button. (if it is not)
4. restart the server
I had the same issue when i first setup SQL Server 2014 on my local machine.
In my case the solution was to set a correct defualt database.
Login with Administrator in SQL Server
Go to Securities >> Logins >> select your user name and go to properties
From Status >> uncheck user account lock check box
Change password for the user
Restart the sql server and login with your username.
I was facing the same error.
I've resolved the error by following below mentioned steps:
Disable named pipes and restart sql services.
After restart sql server I enabled names pipes and did a sql server restart again (Link for Step 1 and 2)
Connect to SQL server via studio.
Right click on SQL instance --> Properties --> Connections --> "Set the Maximum number of 5. concurrent connections to '0' ".
Save the change.
Restart the SQL server if possible. (Link for step 3 to 6)
I hope this will help someone
This is might not be a connection issue . Check your default database and if that is online . More commonly this issues seen when the default database will be offline or not exists . If your default database other than master ,better check this option.
I got a way to go around the problem.
Open one instance and login using the windows authentication
allow sql and windows auth both by right cliking on the db server.
Open second instance and login using sql authentication.
bingo the sql authenticated instance open .. :)
Actually in this way we cheat the sql authenticated instance as it tries to find an already running instance.. worked fr me.. good luck
I tried most of the solution but was not able to solve it until I found this URL which says to do the following:
Open SQL Server Management Studio and run the these queries:
sp_configure 'show advanced options', 1;
go
reconfigure
go
sp_configure 'user connections', 0
go
reconfigure
go
The reason why we got this error is that the user connections was reset to 1, so only one user was able to connect with the SQL server.
just a simple query worked for. I hope this will work for others as well.
I have not used the script style, but login through GUI I encountered the same error code. I had entered wrong user name and this is why I was getting the Sql Server, Error: 233. In order to resolve this, you should input the following information:
Server Name: MachineName\SQLEXPRESS
Authentication: SqlServer Authentication
User Name: Assigned user-name or simply sa
Password: xyzpqr
NOTE: Here I have wrote above data for demo purpose only, actual data is your machine & software's properties.
According to: https://msdn.microsoft.com/en-us/library/bb326280.aspx
Go to --> Remot setting
Go to "Remote" tab
in "Remote Assistance", Tick "Allow Remote Assistance connection to this computer", Click the "Advance" button and tick the "Allow..." and in the "Invitation" set the "30 days"
Then in the "Remote Desktop" part
Just tick "Allow remote connection to this computer"
After following the examples here and still not getting in, I found that my sa login was disabled. The following got me in:
Logged back in under windows authentication.
Expanded Security Tab
Expanded Logins Tab
Right-clicked sa and selected Properties
Went to the Status Tab
Under Login: Clicked 'Enabled' radio
Restarted Server and logged in as sa.
This assumes you have set sa password already using
ALTER LOGIN sa WITH PASSWORD = '<enterStrongPasswordHere>' ;
"A connection was successfully established with the server, but then an error occurred during the login process."
I was getting this problem from sqllocaldb when used from within Docker. The problem was the Docker image was not allocated enough memory. Increasing the memory actually fixed the problem.

Installing SQL Server Express 2005 - but it already exists on the machine

I built an application for a client that requires SQL Server 2005 Express. Everything worked fine on all the machines except for one. On this one they already had an application that uses SQL Server Express, so it was already installed on the machine, but nobody knows which application uses it or any usernames/passwords.
Can I simply install another copy into a different folder? This just doesn't seem right to me, and I know this has to be a common scenario. Can someone point me in the right direction on how I should proceed?
Thanks!
Darvis
Yes you can just install into a different directory, as a new "named instance" of SQL Server Express.
To install, follow Step 8 on Microsoft's Install How-To:
On the Instance Name page, select a Default instance or a Named instance for your installation. If you select Default instance, an existing default instance will be upgraded. If you select Named Instance, specify an instance name
So what you need to do is specify the Named Instance and specify your own instance name, and connect to it using the URL format as above.
As the Microsoft How-To mentions, the default installation is a named instance as well, with the name "SQLExpress", which is why if you want to stop or start the service with net start or `net stop' you need to write something like:
net start mssql$sqlexpress
and the hostname part of the connection string for a default SQL named instance is:
.\SQLEXPRESS (or localhost\SQLEXPRESS)
You should be able to log into it using Integrated Windows Authentication using an administrator type account on the PC, and use that to reset passwords on any SQL server type logins.
Failing that, yes, you should be able install a "named instance". You connect to it by supplying "hostname\instancename" as the server name.
In all likelihood, the culprit is Outlook's Contact Manager.
You should just uninstall the "feature". If you can't, you can create an additional instance of SQL Express, which you can access as COMPUTERNAME\INSTANCENAME.

Error Opening CrystalReport viewer

I have this problem which I am trying to debug for a lot of time.
The setup is like this:
i. The application is a Windows application developed using VS2005, .net 2.0.
ii. I use the Cyrstal reports component Crystal Report Viewer and dynamically display various reports in the same form.
iii. The db is SQLSERVER Express 2005 and situated on a different machine.
When I run the application on the db server, I am able to view the report. However, when I run the application on a different machine which is connected to the above dbServer, I get an error. ( I dont get this error on my dev setup)
Source: CrystakReprotViewer.CS:SendDBLogonForReport() Details:Logon failed.
Details: ADO Error Code: 0x
Source: Microsoft OLE DB Provider for SQL Server
Description: [DBNETLIB][ConnectionOpen (Invalid Instance()).]Invalid connection.
SQL State: 08001
Native Error:
Error in File C:\DOCUME~1\admin\LOCALS~1\Temp\ActionPoints {52820D22-199C-4D46-A76B-70A55D9F54D5}.rpt:
Unable to connect: incorrect log on parameters. at CrystalDecisions.ReportAppServer.Controllers.DatabaseControllerClass.SetTableLocation(ISCRTable CurTable, ISCRTable NewTable)
at CrystalDecisions.CrystalReports.Engine.Table.set_Location(String value)
at Trivalve.UI.Client.Reports.CrystalViewer.CrystalReportViewer.SetDBLogonForReport(ConnectionInfo connectionInfo, ReportDocument reportDocument) in D:\Ramjee\Work\Projects\Trivalve\Trivalve\src\tfssetup\2008\Trivalve_2008\Trivalve\Reports\CrystalViewer\CrystalReportViewer.cs:line 127 rptcontrollers.dll SetTableLocation
For more information, see Help and Support Center at http://go.microsoft.com/fwlink/events.asp.
Thanks,
Ramjee
Use datasource=servername or ip address\instance name if available,port number
Default port number is 1433 or 1434
My problem was solved with this. Posting for the use of others.
If this is a standard installation of SQL Server Express, bear in mind that the only connection method installed by default is shared memory, and is only available on the server -- you would need to enable another connection protocol such as Named pipes or TCP/IP. To turn networking on, Use SQL Server Configuration Manager to enable relevant protocols and start SQL Browser.
It's telling you exactly what's wrong.
Details:Logon failed.
Great, we can't logon.
(Invalid Instance()).]Invalid
connection.
Okay. I bet we have "localhost" as part of the instance name in my connection string. Since I'm no longer on the "localhost", this obviously won't work. Let's try there first. Then perhaps it's the credentials that I'm using to query my database. Usually what I do is create a RO user that can only do selects on my db and use that for CR. If none of these are getting me close, let's try making sure that remote connections are enabled for SQLEXPRESS
Unable to connect: incorrect log on
parameters.
Ok it's definitely a connection issue.