I am trying to install SQL Server 2012 with a service account. Installation is successful but the service account gets locked. How it can be removed?
I tried using another account and tried with my my own account but same happened
Start the instance of SQL Server in single-user mode by using either the -m or -f options.
More information here: https://community.spiceworks.com/how_to/118087-how-to-gain-access-to-sql-server-when-nobody-has-access
Related
At last, I used sqlserver often at 2005s. now just installed VS2017. and it seems MSSQLLocalDB 2016 connection name of instance is changed from .\SQLEXPRESS to something like: (localdb)\MSSQLLocalDB and it doesnt connects. and I checked the list services.msc and couldnt find any relevant name "sql".
is it removed in services ? or its not a service anymore maybe a standalone app ? (thanks)
and look! I dont ask why I cannot connect. Im asking the name of "SQL Server" in services.msc. is it now a standalone app ratherthan being a background server task?
it just doesnt exists anymore ? or am I missing something
it seems MSSQLLocalDB 2016 connection name of instance is changed from
.\SQLEXPRESS to something like: (localdb)\MSSQLLocalDB
These are just two differnt products.
LocalDB installation copies a minimal set of files necessary to start
the SQL Server Database Engine. Once LocalDB is installed, you can
initiate a connection using a special connection string. When
connecting, the necessary SQL Server infrastructure is automatically
created and started, enabling the application to use the database
without complex configuration tasks. Developer Tools can provide
developers with a SQL Server Database Engine that lets them write and
test Transact-SQL code without having to manage a full server instance
of SQL Server.
he cite is taken from here: SQL Server 2016 Express LocalDB
So SQL Server Express is a full server instance (and also win service) while Localdb is not.
You cant find SQL Server in services.msc
if you wish to configure the SQL SERVER you can just search in your computer an application named : "SQL SERVER 2016 Configuration Manager" - then you can for example turn off\on the SQL Server and etc .
(localdb)\MsSqlLocalDB does not run as a Windows/System Service, so you will not see it listed in Services.msc
As mentioned previously, MsSqlLocalDB is the 'developer edition' of SqlExpress and is normally run as an 'in-process' database server, not as a out-of-process service.
When your application runs, and it opens a connection to MsSqlLocalDB, the proces of Opening the DB connection will cause the MsSqlLocalDB engine to be instantiated within your current process, and then your application will be using it. When your application exits, MsSqlLocalDB will normally exit also.
You can run SqlExpress and MsSqlLocalDB at the same time. SqlExpress will normally be running as a Windows Service under the connection point '.\SqlExpress' and when your application runs it will instantiate '(localdb)\MsSqlLocalDB'
I'm trying to upgrade/install TFS 2017 over TFS 2015 update4. I've got SQL server 2016 installed.
TFS 2017 installed successfully and while trying to Create Team Project collection through TFS Administration console, i got the error as below
TF400711: Error occurred while executing servicing step 'Ensure
initial catalog data exists' for component InstallFrameworkApplication
during Install
TF30040: The database is not correctly configured. Contact your Team
Foundation Server administrator.. For more information, see the
configuration log.
Note: I've deleted the previous exiting TFS database and re-tried, still the error exits. Please suggest a solution
First, suggest you to check the Event Eview on TFS server, if there are some more error info for troubleshooting.
If your process of upgrading to Team Foundation Server (TFS) 2017 has been succeed( Double check this blog, if you have any thing missed). The error occurs during the usage of Team Project Collection Creation through Administration Console.
You could try to use below solution: add yourself as a sysadmin by starting SQL Server in single user mode follow below steps:
1. Open the Configuration Manager tool from the "SQL Server 2016| Configuration" menu
2. Stop the SQL Server Instance you need to recover
3. Navigate to the “Advanced” tab, and in the Properties text box add “;–m” to the end of the list in the “Startup parameters” option
4. Click the “OK” button and restart the SQL Server Instance
NOTE: make sure there is no space between “;” and “-m”, the registry parameter parser is sensitive to such typos. You should see
an entry in the SQL Server ERRORLOG file that says “SQL Server started
in single-user mode.”
5. After the SQL Server Instance starts in single-user mode, the Windows Administrator account is able to connect to SQL Server using
the sqlcmd utility using Windows authentication. You can use
Transact-SQL commands such as "sp_addsrvrolemember" to add an existing
login (or a newly created one) to the sysadmin server role. The
following example adds the account "Buck" in the "CONTOSO" domain to
the SQL Server "sysadmin" role:
EXEC sp_addsrvrolemember 'CONTOSO\Buck', 'sysadmin'; GO
6. Once the sysadmin access has been recovered, remove the “;-m” from the startup parameters using the Configuration Manager and
restart the SQL Server Instance
More details please refer this answer of a similar issue.
I installed sql server mgmt studio 2008 r2. i used default instance (MSSQLSERVER) user name, added current user and used the default windows authentication. but when I logged in, i couldnt even logged unless i use "(local)" as server name. I tried using MSSQLSERVER, SomePCName\MSSQSERVER but still I couldnt log in. I tried enabling those protocols on Configuration manager but still I couldnt log in. Anyone here know how to fix this?
Run SQL Server browser service.
It's disabled by default.
Using Configuration Management tool(not ssms), enable the service and set start mode automatic.
Below are some points you can check
1) Disconnect your machine from network then on command prompt write following command
SQLCMD - L
The output of this command will be SQL SERVER name installed on your machine. You can use these names to connect.
If you face still the same issue then as my friend mentioned check browser service & SQL Server service whether they are up or not.
I want to remote restart or stop SQL server service on SSMS. When I login in a DB using sa account, the menu bar still be disabled
I looked up some information, MS seems to disable it for security reasons from SQL server 2012
If there is any possible, I can alter some system settings to do that?
So to stop/restart an SQL Server instance from Object Explorer in SSMS, you would have to met the following requirements:
1. You must have to have at least public server role on the SQL Server instance.
2. You must have the privilege to start/stop services on the server that hosts SQL Server instance. For example, add your windows user to administrator group on the server.
Also,since SA uses SQL authentication, the best you can do is issue a SHUTDOWN command to stop SQL Server.
I had a new machine which windows crashed and I had to do a Windows reset which reinstalled Windows. Afterwards I deleted the old app user accounts in the C:\Users folder since the reinstall didn't delete it, these included SQL Server MSSQLServer and .net accounts because I was going to install all the apps from scratch I decided to clear it up and delete it.
I then ran SQL Server 2014 SP1 setup selecting database engine, client connectivity and Management Studio on default instance MSSQLServer
using mixed mode authentication and added my own sa password and my current windows user.
At the end of my installation I notice the installer takes a very long time at the following step
SqlEngineDBStartConfigAction_install_configrc_Cpu64
I then get an error
The following error occurred:
Could not find the Database Engine startup handle.
Logs
Feature: Database Engine Services
Status: Failed: see logs for details
Reason for failure: An error occurred during the setup process of the feature.
Next Step: Use the following information to resolve the error, uninstall this feature, and then run the setup process again.
Component name: SQL Server Database Engine Services Instance Features
Component error code: 0x851A0019
Error description: Could not find the Database Engine startup handle.
Error help link: http://go.microsoft.com/fwlink?LinkId=20476&ProdName=Microsoft+SQL+Server&EvtSrc=setup.rll&EvtID=50000&ProdVer=12.0.4100.1&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025&EvtType=0xD15B4EB2%400x4BDAF9BA%401306%4025
I open SQL Server configuration manager Services and noticed my MSSQLServer doesn't start up because it runs as NT Service\MSSQLSERVER user. I change that to local system account and start the service and the service runs.
However when I open SQL Server Management Studio and try to connect to the database engine I can't connect with neither my windows user I added during the SQL Server setup nor the sa user with password I specified.
Cannot connect to PCName. Login failed for user PCName\User. Microsoft SQL Server Error 18456
When I uninstall SQL Server and reinstall it I get the same issue. Even when I delete the program files directory C:\Program Files\Microsoft SQL Server\MSSQL12.MSSQLSERVER
How do I get it to work?
Why does a new SQL Server 2014 SP1 installation not create the MSSQLServer user?
How to I create the MSSQLServer user manually and what permissions and groups do I assign to it?
I tried everything to resolve it. Delete all the SQL Server folders. Remove registry entries as mentioned in other stackoverlow answers. Installed SQL Server 2014 SP1 again and the problem still occurs.
Even when I installed SQL Server 2012 SP1 on the default instance I would still get the error.
The only workaround I could get it to work was to install SQL Server as a separate instance and not the default instance.
This made me thinking if the issue is only related to the default instance.
I looked at my C:\Users folder and the default instance MSSQL user folder was not there meaning the installer never created it. The problem must have occurred that I previously deleted the User folder to clean up the machine where I should have deleted the windows users from Control Panel Admin Tools instead.
Solution: Use regedit.exe
The problem entry should be the corresponding S Folder in.
HKEY_LOCAL_MACHINE - SOFTWARE - Microsoft -Windows NT -CurrentVersion -ProfileList
Delete this user
Reinstall and verify in the C:\Users if the MSSQL user gets created.
I tried to be safe and deleted all references to the MSSQL user in the registry user after uninstalling all SQL Server references in Add/Remove Programs and clearing up the Program Files folders the one registry item is probably the cause.
This solution helped me to fix the issue.
I had deleted MSSQLServer and SQLAgent account while cleanup of SQLServer2016, but then MSSQLServer 2016 installer wasn't getting re-installed, reason being it could not create the service account, and my application is limited to support "only default SQL instance"
I have followed this and deleted the REG entries and this helped me to reinstall SQL Server smoothly.
Thank you so much .
Solution: Use regedit.exe
The problem entry should be the corresponding S Folder in.
HKEY_LOCAL_MACHINE - SOFTWARE - Microsoft -Windows NT -CurrentVersion -ProfileList