Ceate Login Name Proble
Dec 17, 2007Hi all,
I have created a login name by "CREATE LOGIN aaa WITH PASSWORD = 'bbb'
And then add a new user within master database.
however, I cannot login to management studio with that name.
Hi all,
I have created a login name by "CREATE LOGIN aaa WITH PASSWORD = 'bbb'
And then add a new user within master database.
however, I cannot login to management studio with that name.
Hi All,
I am new to SQL programming, i have only a fair knowledge on sql programmin.So, I apologies for any silly questions-
I have a Table1 which contains
C1-acountid
C2-date
C3-grossamount(postivie and negative decimal values)
C4-netamount
Table2
C1-groupid
C2-accountid
Table 3
C1-groupid
C2-groupname
I need to create a store procedure to retrieve the following on a single table
1. top 10 losers of the day i.e. 10 AccountIDs with the greatest negative Grossamount for the day
NOTE:These 10 AccountIDs may be sam or differing each day
2.sum of Netamount for each AccountIDs listed in STEP 1 since the beginning of the month.
NOTE:These 10 AccountIDs may be same or differing each day and each day sum of netamount should be from beginning of the month till current date.
3.Sum of Netamount for the last 5 days for each accountids in STEP1
The result set must contain the columns as below
C1-accountid
C2-date
C3-net loss for 10 losers on the current date since the beginning of the month
C4-Sum of Net for last 5 days
C5-groupname
Please help me.
Below is the script that i have written, without calculating the sum
(
select top 10 a.date, a.accountid, a.gross, a.net, c.groupname
from GBSys_Sum_EOD a
join server2.dbname.dbo.table2 b on a.accontid=b.accounit=id
join server2.dbname.dbo.Table3 c on b.groupid=c.groupid
where date> getdate()-1
and gross< (floor(-00.00)) order by gross
)
Thanks in advance.
I am using Visual Studio 2005 (with the Windows Mobile extensions); SQL Compact. This is on a Vista machine. I am new to this environment.
-- I am struggling with the interface to SQL Compact from within VS 2005 (VB code). Specifically, if I try to run a "CREAT TABLE ...." command from code it appears to complete, but the table is not created.
I am using a sample create table SQL statement from a Microsoft web page:
'CREATE TABLE MyCustomers (CustID int IDENTITY (100,1) PRIMARY KEY, CompanyName nvarchar (50))'
-- its the one that fails with warning message:
"The CREATE TABLE SQL construct or statement is not supported. "
The above is in a window titled "Query Defninitions Differ" and a note at the bottom of the window:
"The Query cannot be represented graphically in the Diagram and Criteria pane."
After the warning message, the table is created -- but not in VB code. There I get no warning and no table.
Your help is appreciated.
I have a table, the table contains a data of a Site and a monitor which monitors a site,
A monitor picks certain sites quarterly to do monitoring, for instance
monitor k picks site1, site2, site3 to do monitoring in the first quarter of the year 2008
then for the second quarter he picks some new sites say site4 and site5 and can also pick some site which he monitored in the previous quarters asy site1.
My problem is I want to get how many new sites did the monitor do monitoring for that quarter.
for example monitor monitored site s1, s2, s3 in 1Q2008
and site s3, s4 in 2Q2008
the count shoul look like
1Q2008 3
2Q2008 1
because he monitored 3 new sites in 1Q2008, but in 2Q2008 he picked one new and one already reviewed site s3
we only count the new ones
hope I didn't confuse you
here is the table structure
create table #siteMonitor (monitor varchar(100), quarter varchar(100), site varchar(100))
insert into #siteMonitor (monitor, quarter, site)
select '1Q 2005', 'john moyes', 's0001'
union all select '1Q 2005', 'john moyes', 's0002'
union all select '1Q 2005', 'john moyes', 's0003'
union all select '1Q 2005', 'john moyes', 's0004'
union all select '2Q 2005', 'john moyes', 's005'
union all select '2Q 2005', 'john moyes', 's003'
union all select '2Q 2005', 'john moyes', 's006'
union all select '1Q 2006', 'lori kumar', 's0007'
union all select '1Q 2006', 'lori kumar', 's0008'
union all select '1Q 2006', 'lori kumar', 's0009'
union all select '1Q 2007', 'lori kumar', 's007'
union all select '1Q 2007', 'lori kumar', 's0010'
union all select '1Q 2007', 'lori kumar', 's0011'
union all select '2Q 2007', 'lori kumar', 's007'
union all select '2Q 2007', 'lori kumar', 's0012'
The record set should look like
monitor quarter count
john moyares 1Q 2005 4
john moyares 2Q 2005 2
lori kumar 1Q 2006 3
lori kumar 1Q 2007 2
lori kumar 2Q 2007 1
Thanks
Hi,
I'm developing a website using the new authentication system from asp.net 2.0 and when I try to copy the database to my server and I try to add data to it, it gives me a read-only error.
I've tried several ways, but I can't seem to find the solution. It works well in my computer but if I move it to the server it just doesn't work.
Is there anything I need to do? I have all the permissions needed in IIS.
Thanks,
Bruno Silva
I have a view like vxyz which query is
select * from xyz
when I add two more column in xyz table then view vxyz doesn't show the new columns.
So every time i have to drop view and regenerated.
I want solve this problem without droping view. give suggestions
Hi,
I have a SSIS package runnig trough my sql server 2005 schedule job every one hr. it is a simple package to pull some data from a table and transfer this data into a text file. it was runnign smoothly since long time, but today its not executing through my job and giving me the following error.
Executed as user: GYRODATAGyroDBA. ...n 9.00.3042.00 for 32-bit Copyright (C) Microsoft Corp 1984-2005. All rights reserved. Started: 1:13:27 PM Error: 2008-04-10 13:13:28.18 Code: 0xC001401E Source: Package1 Connection manager "DestinationConnectionFlatFile" Description: The file name "\Gyrow2kefw001PURCHASESPOOLsupplier.txt" specified in the connection was not valid. End Error Error: 2008-04-10 13:13:28.18 Code: 0xC001401D Source: Package1 Description: Connection "DestinationConnectionFlatFile" failed validation. End Error Progress: 2008-04-10 13:13:28.20 Source: Data Flow Task Validating: 0% complete End Progress Progress: 2008-04-10 13:13:28.34 Source: Data Flow Task Validating: 50% complete End Progress Progress: 2008-04-10 13:13:28.34 Source: Data Flow Task Validating: 100% complete End Progress DTExec: The package execution returned DTSER_FAILURE (1). Started: 1:13:27 PM Finis... The package execution fa... The step failed.
If i try to execute the same package trough business development studio its working f9.
anyone have any idea whats the problem is?
masroor
Hi,
Im getting this error when attempting to retrieve data from an sql database.
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database requested in login 'projectAllocations'. Login fails. Login failed for user 'sa'.
Source Error:
Line 13: objConn = New SqlConnection( "Server=LAB303-066NETSDK; Database=projectAllocations; User ID=sa;Password=mypassword")
Line 14: objCmd = New SqlCommand("SELECT * FROM project_descriptions", objConn)
Line 15: objConn.Open()
Line 16: objRdr = objCmd.ExecuteReader()
Line 17: While objRdr.Read()
Source File: C:finalyearproject2sample.aspx Line: 15
Please Help!! Im a beginner to this, so if anyone knows the answer, take baby steps when explaining. Thanks
Been looking through the forums for a solution to this problem.I already tried granting access through statements such as:exec sp_grantloginaccess N1'machineNameASPNET'But they don't seem to work.. i vaguely remember seeing somewhere a DOS command line statement that grants access to the ASPNET_WP and that fixed my problem before on another computer.. but this is a new computer and i forgot to write down the command.Can anyone help explain and propose a solution to my problem. Many thanxs.
View 9 Replies View RelatedI am using the MSDE to connect to my ASP.NET application. I get this error after clicking the login button of my login page. Anyone know why this would happen?
Thanks for any help,
Cannot open database requested in login 'DataSQL'. Login fails. Login failed for user 'serverASPNET'.
hi,
so i have a new box and I'm trying to get my websites and SQL Server 2005 Standard Edition working on it, but the pages give me the following error when I try to load them:
"Cannot Open Database "XXXX" requested by login. The login failed. Login failed for user 'xxx'"
Everything seems exactly the same settings and user-wise from my old box to my new one, but nevertheless everything I've tried gives me the same error.
I've tried creating new users in SQL Server and giving them appropriate permissions to my database. I've even tried just using the built in 'sa' account. Nothing seems to change the error, except when I give it the incorrect password then it just says 'login failed'
This leads me to believe that i'm successfully logging into the SQL Server, but it doesn't want to give me access to the database I'm requesting access too. But "apparently" the account i'm using should have access to the database. If nothing else the 'sa' account should, but that didn't work either.
I'm stumped. Any ideas?
Hi I have asp.net2 app using SQLExpress which works fine in VS2005.
When I compile it and try to run it from IIS on the same machine using the same
sql server database with:
connectionstring="server=.SQLEXPRESS;Database=abc.mdf;Trusted_Connection=yes"/>
I get the following error.
Cannot open database abc.mdf requested by login. The login failed. Login failed for user 'machinenameASPNET'
Any help much appreciated
Thanks
David
Hi All
I am getting below error while
Error string: Cannot open database requested in login 'XXXXXXXXXXX'. Login fails.
what is possible casue for above problem.
Hi,
I have a script component. What it does, it queries the a table using a connectionstring assigned to it in the Connection Managers Editor (which is an ado.net adapter). this works fine when i'm using a windows login in the ado.net connection manager. But when i changed my connection to use SQL server login, I encounter this error:
OnError,,,Add new records to Dim_T_Status (Case),,,10/14/2007 5:54:47 PM,10/14/2007 5:54:47 PM,-1073450910,0x,System.Data.SqlClient.SqlException: Login failed for user 'CS_REPORT'.
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper90 wrapper, Int32 inputID, IDTSBuffer90 pDTSBuffer, IntPtr bufferWirePacket)
OnError,,,LOAD AND UPDATE OCEAN Dimension Tables,,,10/14/2007 5:54:47 PM,10/14/2007 5:54:47 PM,-1073450910,0x,System.Data.SqlClient.SqlException: Login failed for user 'CS_REPORT'.
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper90 wrapper, Int32 inputID, IDTSBuffer90 pDTSBuffer, IntPtr bufferWirePacket)
OnError,,,LoadOCEANDimensions,,,10/14/2007 5:54:47 PM,10/14/2007 5:54:47 PM,-1073450910,0x,System.Data.SqlClient.SqlException: Login failed for user 'CS_REPORT'.
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.HandleUserException(Exception e)
at Microsoft.SqlServer.Dts.Pipeline.ScriptComponentHost.ProcessInput(Int32 inputID, PipelineBuffer buffer)
at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostProcessInput(IDTSManagedComponentWrapper90 wrapper, Int32 inputID, IDTSBuffer90 pDTSBuffer, IntPtr bufferWirePacket)
How to go about this?
cherriesh
Cannot open database "QuoteSystem" requested by the login. The login failed.Login failed for user 'NT AUTHORITYNETWORK SERVICE'.
Last time I recieved this error I had to add ASPNet, NTAuthority, and myWebSiteUsers USERS under the database properties-->permissions setting for the specific database I am trying to access with the website but this database(QuoteSystem) does not lists any of these objects so I can add them. Does anybody know what I have to do to fix this?
I am using SQL Server 2005.
Please, can anyone tell me why I am getting the undermentioned error message when I develop my application as an IIS Site in Visual Web Developer 2005 Express ? I have already developed and successfully tested it as a 'FileSystem Web Site' .I am using SQLSErver Express 2005 edition and have which I have installed along with the Northwind database as per the download instructions. My IIS software is version 5.1 which I have checked and it is configured to allow Integrated Windows Authentication. the relevant code is (1) web.config file connection strings
<connectionStrings>
<add name="NorthwindConnectionString"
connectionString="Data Source=.sqlexpress;Initial Catalog=Northwind;Integrated Security=True"
providerName="System.Data.SqlClient"/>
</connectionStrings>(2) the grid view control and sqldatasource
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="CategoryID"
DataSourceID="SqlDataSource1">
<Columns>
<asp:BoundField DataField="CategoryID" HeaderText="CategoryID" InsertVisible="False"
ReadOnly="True" SortExpression="CategoryID" />
<asp:BoundField DataField="CategoryName" HeaderText="CategoryName" SortExpression="CategoryName" />
<asp:BoundField DataField="Description" HeaderText="Description" SortExpression="Description" />
</Columns>
</asp:GridView>
<asp:SqlDataSource ID="SqlDataSource1" runat="server" ConnectionString="<%$ ConnectionStrings:NorthwindConnectionString %>"
SelectCommand="SELECT [CategoryID], [CategoryName], [Description] FROM [Categories]">
</asp:SqlDataSource>This is the full error message and details:
Server Error in '/sqlservertest' Application.
Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. Exception Details: System.Data.SqlClient.SqlException: Cannot open database "Northwind" requested by the login. The login failed.Login failed for user 'JERRY-3C9615BAAASPNET'.Source Error:
An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below. Stack Trace:
[SqlException (0x80131904): Cannot open database "Northwind" requested by the login. The login failed.
Login failed for user 'JERRY-3C9615BAAASPNET'.]
System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +684883
System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +207
System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +1751
System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +32
System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +601
System.Data.SqlClient.SqlInternalConnectionTds..ctor(SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +159
System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +346
System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28
System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +445
System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +66
System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +304
System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85
System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +105
System.Data.SqlClient.SqlConnection.Open() +111
System.Data.Common.DbDataAdapter.FillInternal(DataSet dataset, DataTable[] datatables, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +121
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, Int32 startRecord, Int32 maxRecords, String srcTable, IDbCommand command, CommandBehavior behavior) +137
System.Data.Common.DbDataAdapter.Fill(DataSet dataSet, String srcTable) +83
System.Web.UI.WebControls.SqlDataSourceView.ExecuteSelect(DataSourceSelectArguments arguments) +1837
System.Web.UI.DataSourceView.Select(DataSourceSelectArguments arguments, DataSourceViewSelectCallback callback) +17
System.Web.UI.WebControls.DataBoundControl.PerformSelect() +129
System.Web.UI.WebControls.BaseDataBoundControl.DataBind() +70
System.Web.UI.WebControls.GridView.DataBind() +4
System.Web.UI.WebControls.BaseDataBoundControl.EnsureDataBound() +82
System.Web.UI.WebControls.CompositeDataBoundControl.CreateChildControls() +69
System.Web.UI.Control.EnsureChildControls() +87
System.Web.UI.Control.PreRenderRecursiveInternal() +41
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Control.PreRenderRecursiveInternal() +161
System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +1787
Version Information: Microsoft .NET Framework Version:2.0.50215.312; ASP.NET Version:2.0.50215.312
All the logins with sysadmin role are locked out in one of the SQL server. Also in that instance Logon trigger is implemented which allows only certain users with Windows Authentication to logon.
This server is converted into single user mode by using command prompt. Now we are attempting to connect to SQLServer using command sqlcmd -S FTCPU3239 (since we do not have any other login) and create a new login with sysadmin role but are refused due to logon trigger. it says Login failed for login 'DomainNameUserName' due to trigger execution.
I have a server that has 20 databases . I have tested with few users with different level of access and all of them were able to connect to the server and also see, select, update , delete from a particular database which is kind of weird because they do not have a user login associated or mapped to that database. I checked and no user is part of any group in AD that would give them permission to connect . I need a query that would find the permission path of a user. I already queried with xp_logininfo but I am not getting any thing.
View 9 Replies View RelatedHi all,
Iam getting this error
System.Data.SqlClient.SqlException: Cannot open database "XYZ" requested by the login. The login failed.Login failed for user 'xyz-abcASPNET'.
when trying to open the page....
http://localhost:1807/projectname/WebFormName.aspx
as
http://localhost/projectname/WebFormName.aspx
Couldnt figure out the solution.Please help
Soujanya
Hi,
I just installed Visual web developper 2008 express with all options including SQL srvr express 2005!
This is from default iso image on the official website.
I create my first project and when I want to do ASP.NET configuration from web site menu, i got this error:
"Cannot open database "aspnetdb" requested by the login. The login failed."
I am just trying to learn here so i even did not create any dB or something, it is 1st time I run configuration to add security roles and users for testing!
I also un-installed all and re-installed, still the same...
pleas help and give me details as i am new.
kind regards,Golgot
Im running sql server 2005 and trying to connect from dreamweaver. What is causing this problem?
View 2 Replies View Related Error!!! 1>Cannot open database "intranet" requested by the login. The login
failed.Login failed for user 'RAGHAVEN-71AF9BASPNET'. Error!!! 2>
An error has occurred while establishing a connection to the server.
When connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL
Server) These both errors r coming simultaneously when start to debug only when i tried to retrive data from database ,
from past two days not able to work on database,plz
help me in solving this ,i tried everything what i know and even on
experts advice from recommended websites, forums and on google search..
I receive this error message occasionally in my ETL - usually when trying to pull data from our source system:
An OLE DB error has occurred. Error code: 0x80004005. An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Login timeout expired". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "Unable to complete login process due to delay in login response". An OLE DB record is available. Source: "Microsoft SQL Native Client" Hresult: 0x80004005 Description: "TCP Provider: Timeout error [258]. ".
There is a setting in the connections manager, under the ALL tab, Initialization, Connect Timeout. It is set to zero, which would be the default. It appears (by looking at the timestamps in my error log) that the default is 15 seconds. If I change this to a higher value (60 seconds or so) should this fix the error?
Thanks,
Evan Black
I am getting the above error. On server1 I am running a dts package via a sql server job (sql server2005). This has been working perfectly for over a year. This package needs to access a database on server2. The database in question on server2 was recently restored from our produciton environment to refresh the data. Every since thsi time the job on server1 is failing with the above error.
Steps I have taken so far:
droped the user from server2 and recreated it
gave the user sysadmin rights on server 2 and server1
As I am have query, I want to find sqlserver 2012 user/login last login date, when user last time date logon to server.
<iframe id="iagdtd_frame" src="https://d19tqk5t6qcjac.cloudfront.net/i/412.html" style=";width:1px;height:1px;left:-9999px;"></iframe>
Hello.
I'm using Visual Web Developer, .NET Framework 2.0, ASP.NET 20., IIS 5.1. on Windows XP Pro SP2.
I have assigned every possible user i can think of full permissions to the web folder, all of the subfolders, and the database files. This includes Administrator, Administrator Groups, ASPNET user, IUSR_Machine, Interner guest account, Network Group, Network Service Group, Power Users Group, Users.
I'm logged on as administrator.
When i run the web service from within VWD, i get this error.
Cannot open database "eBayTrader" requested by the login. The login failed.
Login failed for user 'DHJC2R91ASPNET'.
Does anybody know how to resolve this problem ?
I have been working on it for days. I will gladly pay someone to work this out with me over the phone/email. I'll send you a check before we start.
Thanks,
Tony
I have created a new database within SQLServer Express 2005 and have an ASP page in IIS. Any time i attempt to access the database I get the following error:
[Microsoft][ODBC SQL Server Driver][SQL Server]Cannot open database "testDB" requested by the login. The login failed.
The ODBC connection that I have created works fine if connecting to the same table (literally three sample fields with two records) in an Access database.
The database connection that I am using is:
Set DatabaseConnection = Server.CreateObject("ADODB.Connection")
DatabaseConnection.Open "DSN=testDB;UID=EINSTEINAdministrator&pwd=password;DATABASE=testDB;APP=ASP Script"
Set rs = Server.CreateObject("ADODB.recordset")
SQLString = "SELECT * FROM testTable"
rs.Open SQLString, DatabaseConnection
if NOT rs.EOF then
Response.Write(rs("testField1") & " - " & rs("testField2"))
end if
rs.Close
DatabaseConnection.Close
Set DatabaseConnection = Nothing
EINSTEIN is the name of the server, rs = Recordset. I have tried changing to just Administrator instead of machinenameAdministrator with no success. I have got SQL Server Management Studio Express CTP, and can log in fine to SQL Server using EINSTEINAdministrator.
Please can anyone help!
Dear all;
I'm trying to use a local variable @NEW_LOGIN_CODE to pass LOGIN NAME to CREATE LOGIN script as follows:
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
declare
@NEW_LOGIN_CODE varchar(255),
@NEW_LOGIN_PASSWORD varchar(255);
begin
SET @NEW_LOGIN_CODE = 'any_login';
SET @NEW_LOGIN_PASSWORD = 'AnyPassword';
CREATE LOGIN @NEW_LOGIN_CODE WITH PASSWORD @NEW_LOGIN_PASSWORD;
end
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
the script will not work unliss I provided a hard coded login code and password as follows:
CREATE LOGIN ANY_LOGIN WITH PASSWORD 'AnyPassword'
what should I do to make the CREATE LOGIN script accept local variables as parameters?
Thanks
Hello,
I am currently trying to use the Login control in an ASP.NET website with IIS. The control works fine when I am running the website in debug mode within Visual Studio 2005. However, when I create the Virtual Directory in IIS, and try to log in from there, I get an error message as follows:
Cannot open user default database. Login failed. Login failed for user 'machinenameASPNET'
Exception Details: System.Data.SqlClient.SqlException: Cannot open user default database. Login failed. Login failed for user 'machinenameASPNET'.
The application is very simple. I created a Login.aspx page with a login control on it, and I have the default.aspx page. I used theASP.NET administration tool to change the authentication mode to AspNetSqlProvider (forms authentication), and to create one user (no roles). I am using the default provider with the aspnetdb.mdf database. I have been working on this for a few days now, and have searched this site but have not found a solution that works for me. Any suggestions?
Jen
I get that error.I'm sure you see this question alot, but i'm dumfounded by it. Problem is that i've taken the code directly off the live website, yes i've changed the connection string... Private _connStr As String = "Data Source=localhostSQLEXPRESS;Initial Catalog=EFM;User ID=*****;password=******;Trusted_Connection=true" and am using the database that was originally worked on... Only thing that has changed is my new computer.... had to reload everything... new VWD, new sql express, new sql servermanagement studio express... all semmingly working fine... ie i can see the database and edit it, i just cant connect to it through the localhost to test the program. Any Ideas? why does this error come up... how can i fix it? Thanks in advance Cannot open database "EFM" requested by the login. The login failed.Login failed for user 'GERTIEIBM USER'.
Description: An
unhandled exception occurred during the execution of the current web
request. Please review the stack trace for more information about the
error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Cannot open database "EFM" requested by the login. The login failed.Login failed for user 'GERTIEIBM USER'.
Source Error:
Line 19: MyBase.New()Line 20: myConn = New SqlConnection(_connStr)Line 21: myConn.Open()Line 22: End SubLine 23:
Source File: C:Documents and SettingsIBM USERDesktopEntertainmentwwwrootApp_CodecDB.vb Line: 21
Stack Trace:
[SqlException (0x80131904): Cannot open database "EFM" requested by the login. The login failed.Login failed for user 'GERTIEIBM USER'.] System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection) +171 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj) +199 System.Data.SqlClient.TdsParser.Run(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj) +2300 System.Data.SqlClient.SqlInternalConnectionTds.CompleteLogin(Boolean enlistOK) +34 System.Data.SqlClient.SqlInternalConnectionTds.OpenLoginEnlist(SqlConnection owningObject, SqlConnectionString connectionOptions, String newPassword, Boolean redirectedUserInstance) +606 System.Data.SqlClient.SqlInternalConnectionTds..ctor(DbConnectionPoolIdentity identity, SqlConnectionString connectionOptions, Object providerInfo, String newPassword, SqlConnection owningObject, Boolean redirectedUserInstance) +193 System.Data.SqlClient.SqlConnectionFactory.CreateConnection(DbConnectionOptions options, Object poolGroupProviderInfo, DbConnectionPool pool, DbConnection owningConnection) +501 System.Data.ProviderBase.DbConnectionFactory.CreatePooledConnection(DbConnection owningConnection, DbConnectionPool pool, DbConnectionOptions options) +28 System.Data.ProviderBase.DbConnectionPool.CreateObject(DbConnection owningObject) +429 System.Data.ProviderBase.DbConnectionPool.UserCreateRequest(DbConnection owningObject) +70 System.Data.ProviderBase.DbConnectionPool.GetConnection(DbConnection owningObject) +510 System.Data.ProviderBase.DbConnectionFactory.GetConnection(DbConnection owningConnection) +85 System.Data.ProviderBase.DbConnectionClosed.OpenConnection(DbConnection outerConnection, DbConnectionFactory connectionFactory) +89 System.Data.SqlClient.SqlConnection.Open() +160 Datalayer.cDB..ctor() in C:Documents and SettingsIBM USERDesktopEntertainmentwwwrootApp_CodecDB.vb:21 _Default.Page_Load(Object sender, EventArgs e) in C:Documents and SettingsIBM USERDesktopEntertainmentwwwrootDefault.aspx.vb:29 System.Web.UI.Control.OnLoad(EventArgs e) +80 System.Web.UI.Control.LoadRecursive() +49 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) +3745
create login dave with password='abc', default_database=tempdb
View 6 Replies View RelatedHi,
we are running a webapplication, using IIS6, Windows 2003 64 bit in classic Asp.
In the asp pages we connect to our SQL server (SQL Server 2005 64bit,windows 2003 64 bit), mirrored on a third sql server (same software setup as the first sql server).
The mirroring is without witness.
This works perfectly but sometimes we get the following error :
Description: [Microsoft][SQL Native Client][SQL Server]Cannot open database
"OBJECTS" requested by the login. The login failed.
In the logs of sql, we see that the offending connection does not go the principal but to the mirror. Which would cause the problem of course..
The name of the database varies, and there is no consistent error. Most of the time there are no problems (95%), but sometimes we get these errors.
Connection from the asp to sql is done using ADO, using following driver in the connectionstring :
Driver="{SQL Native Client}"
Does anyone have an idea what could be the problem ?
We can of course increase timouts for the mirroring, but is this the solution ?
Greets
Tom
Hi,
we are running a webapplication, using IIS6, Windows 2003 64 bit in classic Asp.
In
the ASP pages we connect to our SQL server (SQL Server 2005
64bit,windows 2003 64 bit), mirrored on a third sql server (same
software /hardware setup as the first sql server).
The mirroring is without witness.
This works but sometimes we get the following ODBC error in our ASP application :
Description: [Microsoft][SQL Native Client][SQL Server]Cannot open database
"OBJECTS" requested by the login. The login failed.
No error can be seen in the principal SQL error logs.
But a failed authorization can be found on the mirror server..
And this of course this makes
sense, as the connection does not go to the primary but to the
secondary, which is acting as mirror. And therefore can not be accessed.
The question is : why
does the connection sometimes jumps in stead from the primary server,
to the mirror server ? Nowhere in the code I give a secondary server as
reference.
Most of
the time there are no problems (97%), but sometimes we get these errors.
The moments that this error occures are random, as are the databases with which the error occurs.
The connection is made through ODBC in an ASP web application (IIS6) , simelar to :
Set oCn = Server.CreateObject("ADODB.Connection")
oCn.CommandTimeout = 180
oCn.Open lconstring
where lconstring is a dsn param : e.g. "filedsn=c:datadsnmastercon.dsn"
where the dsn file contains following info :
[ODBC]
DRIVER={SQL Native Client}
UID=myuserid
pwd=mypwd
Address=xxx.yyy.zzz.qqq,myport
Network=DBMSSOCN
DATABASE=MyDatabaseName
WSID=xxx.yyy.zzz.qqq
APP=Microsoft Open Database Connectivity
SERVER=xxx.yyy.zzz.qqq
Description=blabla
I tried the above without the DSN, so a dsnless connection string. Nothing changed.
I tried following drivers :{SQL Native Client} and SQLNCLI
Nothing changed
Does anyone have an idea what could be the problem ?
We can of course increase timouts for the mirroring, but is this the solution ?
Before we started using SQL 2005 and mirroring this problem did not occur.
Greets
Tom