Unable to add domain users to Sql Server login - sql-server-2008

I have configured SQL Server 2008 R2 for mixed mode authentication on a Windows Server 2008 R2 box. I have logged in using domain administrator account into Windows as well as into Sql Server. Now I am trying to add another domain user account as a new login but I am getting the error saying "Windows NT user or group '\' not found. Check the name again. (Microsoft SQL Server, Error: 15401)" though this user is present in domain. I am adding using Management Studio -> Logins -> New Login. When I search for the domain user using the search button the system searches successfully for the user but when I click ok button to create the login I get the above error. I have tried using T-SQL also to create the login but with the same error.
Need help!!

The problem was with SIDs. As we were using VMs the SID was the same and this was causing the error. After changing the SID using sysprep the problem got resolved.

Related

Cannot connect to Reporting Services 2005 Server from SSMS

We have SQL Server Reporting Services 2005 (SSRS) installed and running just fine. I can connect via SQL Server Management Studio 2005 using "Connect -> Reporting Services" and "Windows Authentication".
When I am connected, I can bring up the server properties and view Permissions and see myself there w/ System Administrator checked, but not System User. Which is fine because I have no problem accessing the entirety of the server.
Using the same "permissions" dialog, I use the "Add Group or User" button to add my colleagues domain account (I have tried this with just "System Administrator" and also with "System User" checked).
My colleague cannot connect. He gets the following error message when trying to connect:
TITLE: Connect to Server
Cannot connect to XXXXXXXXXX.
ADDITIONAL INFORMATION:
A connection to the report server failed. Most likely, you do not have
permission to connect to the computer. You should either try to
connect using a report server URL for the Server name, or if the
Distributed COM Users group exists on the remote computer, verify that
you are a member. (Microsoft.SqlServer.Management.UI.RSClient)
Anyone know what else I need to do to allow him to connect to Reporting Services via SSMS?
Note: I can give him permissions to reports and he can view those reports via the SSRS website.
The Microsoft link below has an article that summarizes the connection syntax, operations, and permissions required to connect to SSRS.
Basically, the user connecting has to be assigned to the System Administrator role. If this doesn't work, you will need to add the account to the 'Distributed COM Users' local group, that should let you connect via SSMS.
see here http://technet.microsoft.com/en-us/library/ms159797.aspx and
http://www.mssqltips.com/sqlservertip/2793/sql-server-reporting-services-2012-permissions/

How do you create ad-hoc users on SQL Server 2008

I use SQL Server Management Studio to manage my SQL Server. I need to add a genericReadOnly and genericReadWrite to use when accessing it from automated vba code in Excel. The file that contains this code will be distributed to a number of people, more than I want to individually add to the server.
I've tried adding this generic user account, but get told
genericReadOnly is not a valid login or you do not have permissions.
The server admin believes that a username has to exist in Active Directory.
Is this standard, or is it a sitting that can be changed, if so how?
If you are using mixed authentication on your SQL Server, you can create a SQL Server login (via the security\logins tree on SSMS object explorer) and then a user on your database.
If you are using windows authentication only, then yes, you need an Windows login account mapped to that user.
To change the authentication mode... http://msdn.microsoft.com/en-us/library/ms188670.aspx

Microsoft SQL Server 2008 Management Studio - Connect/Server/Instance Issue

firstly i recently installed this program as I’m working on a project to create a database to use in Microsoft visual studio.
This is the first time I’m using the program, so I’m having a few problems setting it up. I can't connect to a server because presumably i don't have one. I typed in my machine name to create a default/localhost server using windows authentication but i received an error.
Error:
TITLE: Connect to Server
A network-related or instance-specific error occurred while
establishing a connection to SQL Server. The server was not found or
was not accessible. Verify that the instance name is correct and that
SQL Server is configured to allow remote connections. (provider: Named
Pipes Provider, error: 40 - Could not open a connection to SQL Server)
(Microsoft SQL Server, Error: 2)
Could someone guide me on how i can setup up a local host to connect and thus be able to create my database. Also I’d like to know afterwards how i can create a server (ftp) to connect into and create my database there allowing me to view this on my laptop or a different machine.
Btw i have looked on Google for this, but I’m getting a bit confused, because I’m unsure what I’m searching for. If anyone can shed some light on my problem i would be greatly appreciated.
Thanks.
Does Your server name looks like : "localhost ( or IP of Your server
)"\"server name", E.G : localhost\SQLEXPRESS
Open application on Start -> -> Configuration Tools -> SQL Server Configuration Manager
Check, if MSSQL Server Service was started in :Sql Server Configuration Manager -> SQL Server Services. If not, right click on service and choose Start
Check on Configuration Manager on "SQL Server Network Configuration" does "TCP\IP" protocol is enabled and has "Listen All" enabled
Check, do You have firewall on port 1433
If that doesn't help, write a message
I faced same problem and I have solve this problem by doing following 2 step:
1st Task:
Open application on Start -> -> Configuration Tools -> SQL Server Configuration Manager
Check, if MSSQL Server Service was started in :Sql Server Configuration Manager -> SQL Server Services. If not, right click on service and choose Start
Check on Configuration Manager on "SQL Server Network Configuration" does "TCP\IP" protocol is enabled and has "Listen All" enabled
2nd Task:
Provide Server Name : [hostname]\SQLEXPRESS
Authentication : SQL Server Authentication or Windows authentication
Note:
If Server you have installed with Mixex mode then only it will work for SA (SQL Server Authentication) or else we need to used Windows authentication
Now you should be able to connect if you follow this 2 task.
-> Go To SQL Server Configuration Manager
-> Click to SQL Server Services
-> Right click to SQL Server(MSSQLSERVER) and click start, then see the magic.
One the main SQL Server Studio screen, enter for Server name:
\.\pipe\MSSQL$"your instancename"\sql\query
After a number of trials of restarting services in configuration manager, allowing port 1433 in firewall, restarting computer etc. nothing was working, at last I tried .\SQLEXPRESS ('.' represents localhost) rather than MYMACHINENAME\SQLEXPRESS and it worked straight away. Hope it will help someone.
Open Startup Menu and type 'SQL Server Configuration Manager'. After staring the utility select 'SQL Server Services'. Run 'SQL Server' service, that's all.
Right-click on 'SQL Server' service and select properties. Under service pane, set the 'Startup Mode' to automatic, so it will automatically start in future.
I had same issue but i tried to resolve it .
Please follow these steps to connect to your SQL server Management studios
Run->services.msc->search for SQL Server(MSSQLServer)->Right click on it and try to "start" running it.
By doing this you can surely solve connection issue of SQL server.
Alekya
I had this problem, So I enabled Named pipes protocol and it works for me.
Hi every one.
I find out the solution.
To establish connection follow these stips.
1.Click on Start >> Sql Server Management Studio.
Management studio windows will open .and will ask to connect to the sever name etc. Just cancel it the connect window.
Now you go to the left panel of your Object explorer which is Registered servers.
Click on Database engine.
3.It has normally a folder Local server group. Open it by clicking the plus sign.
which will show you your server name with cross sign ON.
4.Right click on it and then click on service control. and then click Start.
Now it will start your database engine.
5.Now double click on you engine and it will work as normal.

SQL Server windows Authentication connection issue

While i am installing SQL Server 2008, i selected mixed authentication mode. But after the installing while i am trying to connect with the database in Windows authentication it gives the following error :
TITLE: Connect to Server
------------------------------
Cannot connect to DEWASISH-PC\SQLEXPRESS.
------------------------------
ADDITIONAL INFORMATION:
Login failed for user 'dewasish-PC\dewasish'. (Microsoft SQL Server, Error: 18456)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&EvtSrc=MSSQLServer&EvtID=18456&LinkId=20476
------------------------------
BUTTONS:
OK
------------------------------
But when in am trying the same with SQL Server authentication mode, I am able to connect with the database. Can any one tell me in what manner i able to connect with the database with the help of windows authentication ?
In your instance Security you'll need to add either:
Your Windows login name as a Windows login user, including domain if applicable, or
If you are a member of a Windows domain security group, add the group name as a Windows login user.

Only Administrator can login to SQL Server

I'm using Windows Server 2003 to run a server application which utilizes SQL Express 2008. I'm also using Windows Terminal Services to host a bunch of thin clients, so I've had no need for active directory domain server and other stuff like that.
Now I have "small" problem regarding logging in to the SQL Server. Only the Administrator account can do this, even if I give my other (test) user administrator privileges by adding him to the Administrators group.
This is the error received: Cannot attach db file to database [Client 127.0.0.1]
I've already checked that the filepath is accessible by the user in question, and like I said, this works perfectly fine for the administrator user.
What account is the SQL Server itself running under? Often it may be running under a domain service account, and it may not have permission to certain folders. Also, the C: drive has progressively become more locked down in Windows with regard to SQL Server database files.
Seems I found the answer. Using SQL Management Studio i gave the "Users" group sysadmin permission for the database, now everything works as expected.