Why the default user can't login into sql server 2012? - sql

I'm trying to run some PowerShell script to install some apps in my pc, the script is trying to create a user and roles for that user in sql server 2012, but I'm getting this error when I installed sql server in mixed mode authentication.
Getting bellow error when I installed the sql server in only windows authentication mode.
What can be the issue? Am I missing any settings?

The reason is written clearly:
cannot open database "Sessions" requested by login
Change it to master and retry

Related

SQL Server windows authentication Login failure

I have installed SQL Server 2008 in my pc having windows 8 version and after installation while i am trying to login to SQL Server using windows authentication it is showing error as shown below
And I tried as shown below
Resolving SQL Server Connection Error 26
And i got the below error while i tried the above suggestion
During the installation, you didn't Add the current user as Windows Authenticated User, you need to re-install the SQL Server, then add the current user as one of the Authenticated User

SQL server Login Fail for user 'ROMANCH9326/romanch'

I installed SQL server 2012 developer addition.
My windows is working on Parallel Access installed on MAC.
When I tried opening SQL server, It initiated a call to connect to server. And when I clicked on connect it gave me error.
I've never installed SQL server 2012 in my personal PC. WHen I was installing I chose Windows authentication mode and user ROMANCH9326 came out automatically.
Please help me, I'm clueless about this problem.
TITLE: Connect to Server
Cannot connect to ROMANCH9326.
ADDITIONAL INFORMATION:
Login failed for user 'ROMANCH9326\romanch'. (Microsoft SQL Server, Error: 18456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft%20SQL%20Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
On Start > Search type "sql configuration"
Open SQL Configuration Manager
SQL Server Network Configuration >Protocols for [SQLINSTANCENAME]
Check if Named Pipes is enabled, enable it if not.
Restart your SQL Server Instance.
Well This is a pretty silly solution but when I tried repair function on SQL server it said that my Database Engine libraries were not installed properly somehow.
So I reinstalled the software and now it worked just fine. I was able to log in.
Thanks :)

Lightswitch 2012 SQL server login error

Environment
Windows 7 machine running VS2012 Update 2
Server 2008 box running SQL Express 2012
Happily modifying existing Lightswitch application that connects to the SQL Server Express system using SQL Authentication. All of a sudden I start to get all sorts of funny errors (something weird happened at this point) so I stopped what I'm doing and restart both server and Win7 system.
When I now try to run/build my LS application it gets an error stating that login to the SQL Server failed because login is from an untrusted domain and windows authentication failed.
Problem is I am using SQL authentication??? I have triple checked my web.config settings and the connection string is definitely set for SQL auth. I created another "test" application, again using SQL auth and it works fine. (I compared the config files from app to app and the connection strings are identical.
In the VS IDE I have Data Connections defined to the SQL server using SQL auth and it works fine. If I do an "update" of the data source and check connection dialog it uses SQL auth and the update works fine.
But when I try to build/run the app it wants to use Windows Authentication.
(I am not using any application/screen level security in my app).
Got me stumped.
Any ideas?

SQL Server 2008 - Reporting Services Failed Login for User '...'

Good Afternoon,
I'm having difficulty running a report with a data source saved on the Report Server using credentials for a user I created on SQL Server named 'ReportUser'. Attempting to resolve this I've mapped the user to the 'ReportServer' database with the db_owner role as well as setting the default database to the 'ReportServer'. However, each time I attempt to run the report I receive the error message:
Cannot create a connection to data source 'Test'. Login failed for user 'ReportUser'.
I'm running SQL Server 2008 from my local machine and am able to successfully run the reports when I setup the datasource using Windows Authentication. Any idea on what could be causing the issues when attempting to use the SQL Authentication with the 'ReportUser'
Thank you very much for your help!
Thank you for your reply.
I believe I found the cause of my issue. Since this was a local install for testing purposes I just set up the instance of SQL Server with Windows Authentication. However, I made the mistake of not setting up the server for both Windows and SQL Authentication. The following link helped me resolve this.
http://forums.asp.net/t/1784261.aspx/1?Could+not+connect+to+database+login+failed+for+user+sa
After changing this setting and restarting the SQL Server everything appears to be running properly now.

Error upon connection attempt to SQL Server 2005 via SSMS

I was able to install SQL 2005 x86 dev edition onto windows 7 Professional but cannot connect to the server via SSMS. I get
"Login Failed for user 'Compaq\username'. (Microsoft SQL Server, Error: 18456)"
Any suggestions
This article might help. It says its due to a requirement to change the password for the account.
Also in the past with fresh install instances I have had problems on Win 7 if I did not run SSMS as admin with elevated privileges.
Error 18456 means the login is not setup directly or via group in SQL Server or Compaq\username is not an admin (which should already have rights)
How to fix with screenshots