Can someone tell me how I would set up a web front end to use NT authentication? I know that I would use a IUSER Account. However how does the web actually use that account? Once i have a NT account created how do i configure it on the web server..
I had a few packages created with Windows Authentication which now needs to be migrated to run with SQL Server Authentication. I tried changing it in the connection managers but the packages failed to validate at the SCD transformations.For a few packages I had Configuration files for these packages where i tried to do it but it dint run giving the following Error Message: [Connection manager "Target"] Error: An OLE DB error has occurred. Error code: 0x80040E4D. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80040E4D Description: "Login failed for user <<with my network id>>.".
[Execute SQL Task] Error: Failed to acquire connection "Target". Connection may not be configured correctly or you may not have the right permissions on this connection.
When creating connections for source and destination in a package what is the recommended approach, window authenticatation or sql? I will be deploying to filesystem, what would be best.
this is my first ssis package, so pardon my ignorance.
hey all, i have a weird authentication error.i have two servers, both running sql server 2005. one is on my workstation the other is on my dev server. i backed up my workstation database and restored it on the dev server. my workstation is xp and my server win2k3. i'm developing an asp.net 2.0 app that talks to my sql server using windows auth. on my workstation my website runs under the ASPNET account, IUSER_COMPUTERNAME and i had that account setup in sql on my workstation in the main security folder, then again in the db security folder the name of it was [ASPNET LOGIN]. each sproc had EXEC permission for [ASPNET LOGIN].when i restored it over to my win2k3 box i deleted that login from the database and revoked it on all the sprocs. i then setup another account for the application and set my website to use that account. i couldn't use the original account because of the group it was in, blah blah blah, not important. the thing is, i got rid of all instances of that ASPNET LOGIN account and i'm running the website under a new account, and some of the stored procedures work, but some of them i get the error "Cannot find the user 'ASPNET LOGIN', because it does not exist or you do not have permission." which is crazy, because i've gotten rid of all references to that. it's not anywhere i see in the database, not in either security/users folder, it's not on any of the stored procedures. and it's NOWHERE in the website. not in IIS or code. furthermore some of the stored procedures work. as far as i can tell, the ones that are not called from my custom MemberShipProvider are working. so i went back to my database on my workstation, revoked exec permission on the sprocs, deleted the login from the db and then from the sql server instance, backed it up again, restored on my server and i'm still getting this issue.where can that ASPNET LOGIN be hiding? i restarted too thinking maybe it was cached somewhere. this is my connection string that the entire app uses: "Server=[serverName]; Database=[dbName]; Trusted_Connection=true;"my web.config is using <identity impersonate="true"/> and my website is running under the account i created.any ideas? i've been battling this for half a day.and why would it only happen with the membership provider? it's using the same connection string the rest of the app is.
I'm building a reporting server that will grab data off of a an old HP3000, all of that is being done in a background task (non asp.net) and uploaded to an sql server. I'm using a web interface to allow people within the company to view the data. This will be in a single domain, behind a firewall, and will not be accessable from outside of the company. In IIS, I have anonymous login unchecked and only Integrated Windows Auth checked. The pertinate parts of my web.config look like this: <authentication mode="Windows" /> <identity impersonate="true" /> <authorization> <allow users="*" /> <deny users="?" /> </authorization> My connection string looks like this: public static string SqlServerConnect = "Integrated Security=SSPI;Initial Catalog=[name of database];Data Source=[sqlserver IP]"; The website (for now) is on my local development computer. When I run the program everything works fine, when I attempt to view the web page on another computer, I get the following error Server Error in '/reports' Application. Login failed for user 'NT AUTHORITYANONYMOUS LOGON'. I'm at a loss as to how to fix this. I dont really want each user to have to enter any log in information, frankly, the permissions dont even matter in this case. My main problem is with the sql connection and trying to get adequate permissions to run queries. Any help would be apprieciated
I am stuck... I am trying to use a linked server in sql 2005 (xls sheet), it works great using windows authentication but since the program will not be running locally i would prefer to use sql auth...
when i log in using the sql name i have created. it only has connect & execute permissions on the main database (as it should), but i also need to query this linked server, when i try to query it i get authentication failed. how do i fix that?
the xls is on a fat32 partition and can be moved to an ntfs partition with out any problems.
Usually, we set up a SQL login for an applucation to use. On this occasion, the connection is being done through NT authentication. I am having to set up a login for each DOMAINuser.
Is there a better way of doing this maybe a logn for a group and add the users to the group?
I assumed SQL login was the preferred way as if you designed an app for thousands of users, you would have a large amount of administration if everything was done through NT ?
I want to interogate the catalog, so I can hae a job execute and do the grants in case a developer forgets
I mean I guess I can do the all everytime, but I don't know what the impact would be. It appears to be none, because of already done that, but in DB2 that would be bad as it would keep adding rows to the system tables
I have this so far
select * from syspermissions p inner join sysusers u on u.uid = p.grantee inner join sysobjects o on o.id = p.id where u.name = 'mepuser' and o.name not like 'dt_%' order by p.id
I am trying to set up the web administration for a website that uses login controls. I have set up the ASPNETDB database using the regular aspnet_regsql command on my SQLEXPRESS.
To set up the web admin tool, I created a vdir to point to %WINDIR%Microsoft.NETFrameworkv2.0.50727ASP.NETWebAdminFiles. This works absolutely fine. I also changed the configuration of this website to use the ASPNETDB on my SQLEXPRESS.
The administration website works fine till I click on the security tab, and I get the following error:
Cannot open database "aspnetdb" requested by the login. The login failed. Login failed for user 'HOMEASPNET'
What I don't understand is why the application is using the ASPNET account to connect to the database when impersonation is enabled. Isn't it supposed to use the credentials of the windows user? I read a couple of posts on MSDN which advise to explicitly create a login for the ASPNET user in the ASPNETDB database (which will definitely work) but somehow it seems counter-intuitive to me. Any advise anyone?
Hi All: Need quick help guyz. I am implementing Forms Authentication on my website below is the code for the same... However I am getting the following error .... Line 1: Incorrect syntax near 'SQLSTR'. at System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream) at System.Data.SqlClient.SqlCommand.ExecuteReader() at GreyHounds.Login.btnLogin_Click(Object sender, EventArgs e) in c:inetpubwwwrootGreyHoundsLogin.aspx.vb:line 49 Private Sub btnLogin_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnLogin.Click Dim con As New SqlConnection("server=localhost; initial catalog=Grey Hounds; integrated security=SSPI")Dim SQLSTR As String = "Select * from Emp_Login" Dim cmd As New SqlCommand("SQLSTR", con)Dim p1 As New SqlParameter("@EmpId", SqlDbType.VarChar)Dim p2 As New SqlParameter("@Password", SqlDbType.VarChar) p1.SqlDbType = SqlDbType.VarChar p1.Value = txtEmpID.Text p2.SqlDbType = SqlDbType.VarChar p2.Value = txtPass.Text cmd.CommandType = CommandType.Text cmd.Parameters.Add(p1) cmd.Parameters.Add(p2) Try con.Open()Dim dr As SqlDataReader = cmd.ExecuteReader() If Not txtEmpID.Text.Equals("") Or txtPass.Text.Equals("") Then If dr.Item("Emp_Login") = p1.Value And dr.Item("Password") = p2.Value ThenFormsAuthentication.RedirectFromLoginPage(txtEmpID.Text, True) Response.Redirect("http://localhost/greyhounds/Default.aspx") Session("Emp_ID") = p1.Value End If Else lblMessage.Text = "Invalid Credentials!Please try again" End If lblMessage.Text = "Cannot leave the boxes empty! Please enter the values"Catch ex As SqlException Response.Write("<b>" & ex.Message & ex.HelpLink & "</b>") Response.Write(ex.StackTrace)Catch ex1 As Exception Response.Write(ex1.Message & ex1.Source & ex1.HelpLink) Finally con.Close()End Try End Sub
Your quick help is highly appreciated... Thanks! Brandy
I'm attemting to replicate from a SQL7 box to SQL2000.
The snapshot works fine, but it fails when it tries to push the subscription to the SQL2000 box with a trust error (I don't recall the exact message). I noticed that it fails when Enterprise Mgr is configured as: "Tools/Replication/Configure Publishing, Subscribers and Distribution", Subscriber Tab, "Impersonating SQL Service Agent". It works if I change to "SA".
This is only the case when we replicate from SQL7 to SQL2K. SQL7 to SQL7 works fine with "Impersonating". Has anybody seen this behavior? Any workarounds, other than using SA?
I'm attemting to replicate from a SQL7 box to SQL2000.
The snapshot works fine, but it fails when it tries to push the subscription to the SQL2000 box with a trust error (I don't recall the exact message). I noticed that it fails when Enterprise Mgr is configured as: "Tools/Replication/Configure Publishing, Subscribers and Distribution", Subscriber Tab, "Impersonating SQL Service Agent". It works if I change to "SA".
This is only the case when we replicate from SQL7 to SQL2K. SQL7 to SQL7 works fine with "Impersonating". Has anybody seen this behavior? Any workarounds, other than using SA?
Howdy,I have a SQL server in a completely different forrest than theworkstation I am running query analyzer on. However in query analyzerwhen I choose windows authentication I cannot manually specify"domainusername" as I could when mapping a file share across domainsor forests. Is there any way around this without resorting to using SQLServer authentication?Thanks
Hi All,I have a SQL Server 7 installation running on a windows 2000 server.SQL Server switches from mixed mode authentication to Windows Only onreboot. Has anyone else experienced this? Any help would be greatlyappreciated.Service Pack Reports:Microsoft SQL Server 7.00 - 7.00.1077 (Intel X86) Sep 6 200215:10:15 Copyright (c) 1988-2002 Microsoft Corporation StandardEdition on Windows NT 5.0 (Build 2195: Service Pack 3)I only see two strange entries in the log:2004-05-01 00:38:09.55 spid37 Using 'xpsqlbot.dll' version'1998.11.13' to execute extended stored procedure 'xp_qv'.2004-05-01 00:38:01.71 spid1 Failed to obtainTransactionDispenserInterface: Result Code = 0x8004d01bI don't believe that either of these are related to the configurationoption for Windows Only, though.
I cannot log in to SQL Server 2005 Dev Edition in my local machine using Windows Authentication. The server returned "Login failed..." when connecting with SQL Server Management Studio.
I have not change anything since installation of this server.
This problem happens in RTM and SP1 versions, both running on Windows Vista RTM.
Anyone having this kind of problem too? Any solution? I'm guessing it's Vista-related.
Is there any way to provide 'Windows' credentials to connect the Management Studio to a remote SQL 2000 DB when I am not logged on as that user (on the dev machine where I am running Mgmt Studio)?
I do of course have local machine admin rights via an AD domain account added to the machine administrators on the remote SQL box itself.
We are having problems in our project. We have ETL packages we call from our web app that we want to run and the user is the logged in one in the web.
We use Windows Authentication in our web app and we used the CreateProcessAsUser to impersonate the user. <identity impersonate="true"/> is also in our web.config.
We were able to call the dtexec successfully (with the user for the process as the logged in the web -- thus impersonation was successful.)
But, a problem arises when we use Windows Authentication for the connection of the ETL to the db (SQL Server). When we run the ETL on our local machine using dtexec/dtexecui, it works fine.
But when we ran it in our server, it fails. According to the event logs, it can't connect to the db server even though impersonation is successful.
Btw, the client, web server, db server are three different machines.
I can't seem to set up SQL server authentication for SQLserver 2005 Express edition..
I simply can't find the settings for that. I have Management Studio Express installed and I can see the SA user but I can't login using that user.. I know that there's supposed to be a setting for turning on SQL auth. but it's not like it used to be in Enterprise manager :) so I can't find it.. ;/ I couldn't find any documentation on how to do this so I thought I'll try here..
(I need SQL auth for my project :) - it must be done with that..)
Hi Guys, I have an Intranet web application and I have to use windows authentication. They are 4 main users group to access the application, each with different set of permission on my store procedures. I have created a windows group for each of those group in my windows environemnt. My DB Connection String in web.config is set to Integrated Windows Authentication ( Integrated Security=SSPI) I have done all configuration based on this article: http://msdn2.microsoft.com/en-us/library/ms998292.aspx I have 4 different database Roles in my database and 4 different database users. I also add NT AUTHORITYNETWORK SERVICE as a member of each of those database Roles. Now I get connected, fine and set permission on the database roles. 1 thing I want to know, How Can I get the Windows Group name in the database, which has the same name as my SQL Login and Database Roles or User I tried all SUSER_SNAME() and ... they all return NT AUTHORITYNETWORK SERVICE I want to get AppPowerUser Role or windows group name. I think I should be able to because I am using windows authentication. Any help is appreciated. Mehdi
I have implemented the Forms Authentication in Reporting Services 2000. In addition, we have a reports web application that uses the authentication to access the reports in the Reports Server. I have implemented a similar code that is posted in http://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspxhttp://msdn2.microsoft.com/en-us/library/aa902691(SQL.80).aspx for the Reports Server and Reports Manager. For the web application, I added reference to the custom security assembly, created a new ReportsServerProxy, and then called the LogonUser().
Now, one of the functionality we have in the applicaiton is to set the reporting services Timeout for reports that take too long to run. The weird thing is the Timeout (in milliseconds) is getting ignored by the ReportServerProxy using the custom security assembly. I verified that without the custom secuirty assembly, the Timeout property is getting set.
I did find the code for ReportServerProxy's GetWebRequest(Uri uri) is setting the request.Timeout to -1. I thought this was interfering with the rs.Timeout, but removing the code did not make any difference.
How do I set the Timeout property correctly? Do you know of any issues with setting the Timeout property for Reporting Services with Forms Authentication?
Can anybody help PLEASE? I need an answer ASAP. Thanks in advance for your help.
/**partial UILogon.aspx code for ReportServerProxy below**/
I have SQL 2005 Std Edition, Mixed Security, and remotely connecting by TCP/IP works great.
Named Pipes (and the SQL Native Client) is the only issue.
The problem _appears_ to be that I'm not authenticated under the SQL Machine; however, I'm not attempting to use Windows Authentication, I'm strictly using SQL, so I do not understand why I'm having a problem.
My reasoning for the above conclusion, is that the command "net use \[server_name]ipc$" will allow me to connect to the server, and Named Pipes will begin working. Again, remember that I'm only trying to access named pipes using SQL Authentication.
I've read through everything on the forum and tried everything I could find. Below are the answers from the most common suggestions posted here:
------------------------------------------------------------------------ Version: SQL Server 2005 - 9.00.1399.06 (Intel X86) This is the Default & Only Instance of SQL 2005, named: MSSQLSERVER ------------------------------------------------------------------------
1. The error message with the SQL Native driver (v 9.00.3042): Error 1326, SQL State 08001 [Microsoft][SQL Native Client]Named Pipes Provider: Could not open a connection to SQL Server [1326]
2. The error messgae with the ODBC SQL driver (v 03.85.1117):
Error 1326, SQL State 01000 [Microsoft][ODBC SQL Server Driver][Named Pipes]Connection Open (Connect())
Connection Failed: SQL Error 17, State 08001 [Microsoft][ODBC SQL Server Driver][Named Pipes]SQL Server does not exist or access denied.
3. Local Connection on Win2003 Server works fine for IP & Named Pipes
4. Remote Connection using SQL Authentication WORKS for IP, does not work for Named Pipes
5. Absolutely *no firewalls* or blocked ports are being used on either machine
6. Configuration Manager & Surface Area Config -- both enabled TCP/IP & Named Pipes Currently listening on ALL IP's. The LOG reports:
Server is listening on [ 'any' <ipv4> 1433]. Server named pipe provider is ready to accept connection on [ \.pipesqlquery ]. Server is listening on [ 127.0.0.1 <ipv4> 1434]. Dedicated admin connection support was established for listening locally on port 1434.
9. Tried both named instance and unnamed instance (although I'm not sure if I'm passing the 'named' instance properly):
Tested: \MYSERVERpipesqlquery Tested: \MYSERVERpipeMSSQL$MSSQLSERVERsqlquery (although the named instance doesn't work on the server either)
10.I've setup an alias for the named pipe connection. This was based on a suggestion posted here, but didn't work.
11.I've removed the shared-memory protocol, on another suggestion here, but no luck.
12.If I execute "net use \[server_name]ipc$" it asks for credentials and if I enter the server credentials I have no problem with executing that command. In other words the logged-on user is not an authenticated member of the server; however, I'm not attempting to use windows authentication, I'm using SQL Authentication.
Hello!, I'm trying to connect from a local server to a remote server using the OPENROWSET function (SQL 2000).
I'm having problems with the authentication, if I put a "SQL" user, everything goes Ok, but if I change the SQL user for a windows NT user, I get the error "login failed for user 'xx'"
For example, this query works fine:
SELECT a.* FROM OPENROWSET('SQLOLEDB','myserver';'sqluser';'mypassword', 'SELECT * FROM myDataBase.dbo.myTable') AS a
But if I try WinNT login, it fails...
SELECT a.* FROM OPENROWSET('SQLOLEDB','myserver';'MyDomainMyWinNTUser';'ThePassword', 'SELECT * FROM myDataBase.dbo.myTable') AS a
Hi-I have a program that I am developing on a laptop, then deploying it on a server.I have the prgram running passing a username and PW in the connection object, but like the idea of using windows authentication MUCH better.I just joined the domain, so I am domain/me for example.If I log into the server, and look at securities, logins and added domain/me to the logins.I then try and set up a sql connection via both visual studio, and sql server magt studio, and get the dreaded "Cannot generate SSPI context" error. Anyone else have this problem? SHOULD V.S. be using domain/me to connect? TIA dan
I seem to be having a strange problem with accessing the SQL Express database under the following configuration.
Install Longhorn Server Beta 2 Add WSS role, setup default site, everything seems to be working fine (using NTLM auth for the site). Content database clearly working fine to the embedded SQL Server Express. Want to switch to Forms Based Authentication with SQL Membership Provider. Follow insructions for it and discover the following issues accessing the database:
aspnet_regsql (running locally on same box) fails and says it can't connect to the database try using the surface area configuration tools to enable remote access/ protocols etc. aspnet_regsql still fails and says it can't connect to the database Install the SQL Management Studio Express - try connecting it to the databse to explore the tables etc. SQL Management Studio Express fails to connect to the database Try switching client config to connect via shared memory rather than over TCP/IP etc. Still fails to connect to database Try install a third party tool called MSSQL Maestro (does some similar things to SQL Management Express) Lo and behold - MSSQL Maestro connects to the database just fine, can explore the tables etc. No problems. Try aspnet_regsql again, try SQL management express again after doing lots of things (try restarts etc. restarts of services). No luck.
So I'm confused. WSS seems to connect to the SQL Express config database fine. MSSQL Maestro connects to the database fine and will allow me to explore it. Using the exact same host and database name (the WSS configured default) aspnet_regsql and SQL Management Studio express both fail with the exact same error.
EDIT: Some significant additional details:
- I have two databases .MICROSOFT#SSEE (which is the WSS default internal database) and .SQLEXPRESS (installed when I installed the rest of SQL Express to get the management tools etc.)
- I can connect to them both by command line with sqlcmd -S.MICROSOFT#SSEE and sqlcmd -S.SQLEXPRESS just fine. They're both running.
- I CAN connect to.SQLEXPRESS from SQL Management Express Studio, but I cannot connect to .MICROSOFT#SSEE
- A look at the error log, shows a line like the following about listening on the named pipe for SQLEXPRESS database, but I don't see a similar entry for the MICROSOFT#SSEE (even thought it's configured to do so in configuration manager...)
"Server local connection provider is ready to accept connection on [ \.pipeSQLLocalSQLEXPRESS ]."
- I've run SQL Management Express as administrator - no change
- The error I get is either error 26, or error 40 when using Shared Memory protocol
- I get the same error and error code from aspnet_regsql
Hello, I have run into a strange problem with RS 2000. I have a base class that will call a reporting server web service, render a report to pdf, then write the report output to the stream. This has worked fine for me for reports.
However, when I render a graph to pdf, I get the following exception:
I only get this exception in our staging environment, not locally.
Here is a code snippet from the ReportServerProxy class, but it is pretty textbook according to the MSDN samples..
public class ReportServerProxy : ReportingService { protected override WebRequest GetWebRequest(Uri uri) { HttpWebRequest request; request = (HttpWebRequest)HttpWebRequest.Create(uri); // Create a cookie jar to hold the request cookie CookieContainer cookieJar = new CookieContainer(); request.CookieContainer = cookieJar; Cookie authCookie = AuthCookie; // if the client already has an auth cookie // place it in the request's cookie container if (authCookie != null){ request.CookieContainer.Add(authCookie); } ...
}
As I said, I can run reports one after another without issue, graphs are causing me problems.
create a new Connection Manager by right-clicking in the Connection Managers section of the design area of the screen. Select New OLE DB Connection to bring up the Configure OLE DB Connection Manager dialog box. Click New to open the Connection Manager. In the Provider drop-down list, choose the Microsoft Jet 4.0 OLE DB Provider and click OK. Browse to the Access database file and connection set up---all good!!!
Dataflow task Add an OLE DB Source component Double-click the icon to open the OLE DB Source Editor. Set the OLE DB Connection Manager property to the Connection Manager that I created . Select Table from the Data Access Mode drop-down list. I cannot see the tables set up as set up as pass-through table types to a Oracle 9i db
I have recently upgraded to SQL2014 on Win2012. The Access front end program works fine.
But, previously created Excel reports with built in MS Queries now fail with the above error for users with MS 2013. The queries still work for users still using MS 2007.
I also cannot create any new queries and get the same error message. If I log on as myself on the domain to another PC with 2007 installed it works fine, so I don't think it is anything to do with AD groups or permissions.
We need to insert data/rows from a SQL Server 2014 database into MS Access database. The problem is, there are so many columns (100+) in the table and there are so many insert transactions of this kind (from different tables) that it is not very easy to write the code in VB.NET that lists all column names.
Both the Access and SQL Server tables have the same number of columns and the equivalent data types, so inserting is not really the problem. It's just that is there a way to do an insert statement in T-SQL that does not name all the columns?
I've been developing desktop client-server and web apps and have used Access and SQL Server Standard most of the time. I'm looking into using SQL CE, and had a few questions that I can't seem to get a clear picture on:
- The documentation for CE says that it supports 256 simultaneous connections and offers the Isolation levels, Transactions, Locking, etc with a 4GB DB. But most people say that CE is strictly a single-user DB and should not be used as a DB Server. Could CE be extended for use as a multi-user DB Server by creating a custom server such as a .NET Remoting Server hosted through a Windows Service (or any other custom host) on a machine whereby the CE DB would run in-process with this server on the machine which would then be accessed by multiple users from multiple machines?? Clients PCs -> Server PC hosting Remoting Service -> ADO.NET -> SQL CE
- and further more can we use Enterprise Services (Serviced Components) to connect to SQL CE and further extend this model to offer a pure high-quality DB Server? Clients PCs -> Server PC hosting Remoting Service -> Enterprise Services -> ADO.NET -> SQL CE
Seems quite doable to me, but I may be wrong..please let me know either ways
The SQL Server is installed on SERVER-A. SERVER-A and SERVER-B are Windows 2003 servers on the same Windows 2003 domain. The SQL Server and SQL Server Agent services are running under the domain account SQLSERVICE. SQLSERVICE is a member of the Domain Admins group. The Domain Admins group is part of the local Administrators group on SERVER-B. The SQLSERVICE account has also explicitly been given Full Control to the folder referenced by \SERVER-BSHARE xp_cmdshell use has been enabled on the SQL Server.
If I run the following command in SQL:
exec master.dbo.xp_cmdshell 'whoami'the following is returned: DOMAINSQLSERVICE If I change the command to access the c: drive instead of a network drive, it executes successfully.
Can anyone shed some light on why I still cannot access any of the files in this folder using xp_cmdshell?