Showing posts with label requested. Show all posts
Showing posts with label requested. Show all posts

Sunday, March 25, 2012

Cannot perform requested task because full-text manager is not

I am trying to import/transfer data tables from an existing MS SQL
2005 Express Adv install to an MS SQL 2000 Standard install (on
different boxes) but it is not working. It's seems to be failing with
the above mentioned error. Can anyone help with this?
Thanks,
J.Well, do you have full text indexes on Express Adv.? Did you install/enable
full-text on Standard? You are probably trying to move tables with
full-text indexes onto Standard, but it can't set them up because full text
is not there or not enabled...
<Jeffrey.TOL@.gmail.com> wrote in message
news:dbe41d4f-e3ed-416d-8b27-6a29030b453e@.e39g2000hsf.googlegroups.com...
> I am trying to import/transfer data tables from an existing MS SQL
> 2005 Express Adv install to an MS SQL 2000 Standard install (on
> different boxes) but it is not working. It's seems to be failing with
> the above mentioned error. Can anyone help with this?
> Thanks,
> J.|||Thanks for your reply. I was leaning towards this but was unsure.
Could you tell me how would I go about checking to see if it is
installed on both servers? Is there an SQL query that I can
perform...?
Cheers,
J.
On May 2, 2:48=A0pm, "Aaron Bertrand [SQL Server]"
<ten...@.dnartreb.noraa> wrote:
> Well, do you have full text indexes on Express Adv.? =A0Did you install/en=able
> full-text on Standard? =A0You are probably trying to move tables with
> full-text indexes onto Standard, but it can't set them up because full tex=t
> is not there or not enabled...
> <Jeffrey...@.gmail.com> wrote in message
> news:dbe41d4f-e3ed-416d-8b27-6a29030b453e@.e39g2000hsf.googlegroups.com...
>
> > I am trying to import/transfer data tables from an existing MS SQL
> > 2005 Express Adv install to an MS SQL 2000 Standard install (on
> > different boxes) but it is not working. =A0It's seems to be failing with=
> > the above mentioned error. =A0Can anyone help with this?
> > Thanks,
> > J.- Hide quoted text -
> - Show quoted text -|||> Thanks for your reply. I was leaning towards this but was unsure.
> Could you tell me how would I go about checking to see if it is
> installed on both servers? Is there an SQL query that I can
> perform...?
I would check the services applet in the control panel.|||Yup looked there but it didn't say much, so I tried a reinstall and
the option was there but unselected. Once the install went through,
all was well. I am copying the data now. Thanks!!!
Cheers,
J.
On May 2, 3:10=A0pm, "Aaron Bertrand [SQL Server]"
<ten...@.dnartreb.noraa> wrote:
> > Thanks for your reply. =A0I was leaning towards this but was unsure.
> > Could you tell me how would I go about checking to see if it is
> > installed on both servers? =A0Is there an SQL query that I can
> > perform...?
> I would check the services applet in the control panel.|||Jeffrey,
If you do not need the full text indexes, I suppose that you could go
through your databases (there are only a few, right) and try to drop all
full-text indexes.
Look under:
DatabaseName
Storage
Full Text Catalogs
From the catalogs you can determine which tables have full text indexes. If
you script a drop of the catalog it will script out a drop the indexes then
drop the catalogs. I have not tested this, but it is a free idea. If it
seems suitable, try it out and see if solves your problem.
RLF
<Jeffrey.TOL@.gmail.com> wrote in message
news:a3e0cfaf-2fef-47c9-af25-9a72bf3499d5@.y38g2000hsy.googlegroups.com...
Thanks for your reply. I was leaning towards this but was unsure.
Could you tell me how would I go about checking to see if it is
installed on both servers? Is there an SQL query that I can
perform...?
Cheers,
J.
On May 2, 2:48 pm, "Aaron Bertrand [SQL Server]"
<ten...@.dnartreb.noraa> wrote:
> Well, do you have full text indexes on Express Adv.? Did you
> install/enable
> full-text on Standard? You are probably trying to move tables with
> full-text indexes onto Standard, but it can't set them up because full
> text
> is not there or not enabled...
> <Jeffrey...@.gmail.com> wrote in message
> news:dbe41d4f-e3ed-416d-8b27-6a29030b453e@.e39g2000hsf.googlegroups.com...
>
> > I am trying to import/transfer data tables from an existing MS SQL
> > 2005 Express Adv install to an MS SQL 2000 Standard install (on
> > different boxes) but it is not working. It's seems to be failing with
> > the above mentioned error. Can anyone help with this?
> > Thanks,
> > J.- Hide quoted text -
> - Show quoted text -|||Well, the reinstall was a better idea. Congrats. - RLF
"Russell Fields" <russellfields@.nomail.com> wrote in message
news:%23Ag4UyIrIHA.524@.TK2MSFTNGP05.phx.gbl...
> Jeffrey,
> If you do not need the full text indexes, I suppose that you could go
> through your databases (there are only a few, right) and try to drop all
> full-text indexes.
> Look under:
> DatabaseName
> Storage
> Full Text Catalogs
> From the catalogs you can determine which tables have full text indexes.
> If you script a drop of the catalog it will script out a drop the indexes
> then drop the catalogs. I have not tested this, but it is a free idea. If
> it seems suitable, try it out and see if solves your problem.
> RLF
> <Jeffrey.TOL@.gmail.com> wrote in message
> news:a3e0cfaf-2fef-47c9-af25-9a72bf3499d5@.y38g2000hsy.googlegroups.com...
> Thanks for your reply. I was leaning towards this but was unsure.
> Could you tell me how would I go about checking to see if it is
> installed on both servers? Is there an SQL query that I can
> perform...?
> Cheers,
> J.
>
>
> On May 2, 2:48 pm, "Aaron Bertrand [SQL Server]"
> <ten...@.dnartreb.noraa> wrote:
>> Well, do you have full text indexes on Express Adv.? Did you
>> install/enable
>> full-text on Standard? You are probably trying to move tables with
>> full-text indexes onto Standard, but it can't set them up because full
>> text
>> is not there or not enabled...
>> <Jeffrey...@.gmail.com> wrote in message
>> news:dbe41d4f-e3ed-416d-8b27-6a29030b453e@.e39g2000hsf.googlegroups.com...
>>
>> > I am trying to import/transfer data tables from an existing MS SQL
>> > 2005 Express Adv install to an MS SQL 2000 Standard install (on
>> > different boxes) but it is not working. It's seems to be failing with
>> > the above mentioned error. Can anyone help with this?
>> > Thanks,
>> > J.- Hide quoted text -
>> - Show quoted text -
>

Tuesday, March 20, 2012

cannot open property page for sa account

When I do right click and Properies on the sa account I get this:

TITLE: Microsoft SQL Server Management Studio

Cannot show requested dialog.

ADDITIONAL INFORMATION:

Cannot show requested dialog. (SqlMgmt)

Property IsLocked is not available for Login '[sa]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

BUTTONS:

OK

Also for the other account I created,

TITLE: Microsoft SQL Server Management Studio

Cannot show requested dialog.

ADDITIONAL INFORMATION:

Cannot show requested dialog. (SqlMgmt)

Property MustChangePassword is not available for Login '[myLogin]'. This property may not exist for this object, or may not be retrievable due to insufficient access rights. (Microsoft.SqlServer.Smo)

BUTTONS:

OK

I am running SQL Server Developer Edition SP2 in Windows Vista Ultimate.

Why is this happening to me?

I added my Vista account to the administrators using the Provisioning tool, and restarted the computer but this did not help.
I allowed SQL to have Mixed Mode (2)
What do I have to do to get SQL working?

Let's eliminate the rights and permissions question first. Log out of everything except the operating system. Then right-click the SQL Server Management Studio and select "Run as Administrator". See if the problem persists.

Second, are you running the Management Studio against the same version of SQL Server? In other words, are you trying to manage a SQL Server 2000 instance from 2K5?

|||

Given that this is a tool question, I'm moving this thread to the tools forum.

Thanks
Laurentiu

|||Its SQL Server 2005 Dev edition. No 2000 in my box.

I have solved the problem, because After updating the SQL server 2005 to SP2, it makes the sql only Windows Authentication. I had to change that to Mixed authentication.

Once I did that, I changed the sa password with ALTER USER sa WITH PASSWORD='mypassword' UNLOCK.

Then things worked out.

But I think MS should tell people about this, so that we dont spend a day figuring out what the problem is.sql

Cannot Open Database while Building

Hi Everyone,
I'm facing this problem now.

Cannot open database "C:\myDB" requested by the login. The login failed.
Login failed for user 'myLaptop\ASPNET'.

May i ask how can i resolve?
Please feel free to let me know the information you need.
Thank You!Can you show your connection string?|||Hi Hello,
Here goes:

<connectionStrings>
<add name="CapsLockedConnection" connectionString="Server=(local)\SqlExpress;Integrated Security=True;Database=CapsLockedDB" providerName="System.Data.SqlClient"/>
</connectionStrings
Thanks for responding.|||Here's a screenshot of the build error

http://img65.imageshack.us/my.php?image=error8mf.png

Cannot open database requested in login...

Hi,

I am using ASP to connect to an MS SQL database. The script connects to the database OK and I can retrieve recordset data and add new rows without a problem.

However, when I try to edit a recordset (using the recordset.update command), I get the following error:

Cannot open database requested in login 'andthen_development'. Login fails.

My first thought was that it must be a permissions problem, but that doesn't explain why I can view and add rows, but not edit. Any ideas?

Thanks, Pauldid you try an "Update" command

objCommand.ActiveConnection = objConnection objCommand.CommandText = "Update Table tbl set ..."
Call objCommand.Execute

just see if this works with your login

or try updating with the QA and your login|||then we'll see why the RecordSet.Update doesn't work|||Just tried an "UPDATE TABLE..." command directly and it works fine. However, I have an ASP include file that I use to handle all database functionality centrally. Included in this is the following function:

Function editRow(sqlString, rowParameters)
'#-- UPDATES AN EXISTING DATABASE ROW

'#-- SET UP RECORDSET FOR EDITING A RECORD
Set recordSet = Server.CreateObject("ADODB.RecordSet")
recordSet.CursorLocation = adUseServer
recordSet.CursorType = adOpenForwardOnly
recordSet.LockType = adLockOptimistic

recordSet.Open sqlString, connection, , ,adCmdText

'#-- ITERATE THROUGH rowParameters TO UPDATE ITEM'S FIELDS
Dim rowField
For Each rowField In rowParameters
recordSet(rowField) = rowParameters.Item(rowField)
Next

'#--UPDATE RECORDSET (UPDATE RECORD)
recordSet.Update

End Function

The function accepts an SQL string to identify the row (e.g. "SELECT * FROM...") and a Dictionary object that contains keys relating to field names and values giving the new contents for the row.

This produces an error on the recordset.Update line.

Paul|||maybe it's the cursor location
or one of the option of the recordset

Set recordSet = Server.CreateObject("ADODB.RecordSet")
recordSet.CursorLocation = adUseServer
recordSet.CursorType = adOpenForwardOnly
recordSet.LockType = adLockOptimistic

Cannot open database requested in login '-u'

How do I fix this error:
Cannot open database requested in login '-u'. Login fails. Login
failed for user 'INTERN3\ASPNET'.
I was trying to fix a rsFailedToDecryptConfigInformation error and did
something like "rsconfig -c -s intern3 -d -u IUSR_INTERN3 -a Windows".
Now, I can't view any reports. I just get the above error. I tried
"rsconfig -c -s intern3 -d -u ASPNET -a Windows", but no luck.
I'd rather not reinstall. Please help...Do I need to reinstall'|||No, you do not need to reinstall. You most likely don't want to use the
ASPNET account to talk to the DB. Instead you should use either a low
privlage sql account or domain account. Is your SQL server on the same box?
If not then the ASPNET account is not known to the sql box.
--
-Daniel
This posting is provided "AS IS" with no warranties, and confers no rights.
"Steven" <montgoss@.hotmail.com> wrote in message
news:a73f4c07.0408160516.7bb409fd@.posting.google.com...
> Do I need to reinstall'

Cannot open database requested in login 'northwind'. Login fails.

I work for DataDirect-Technologies. My customer is using our Connect for ODBC
5.00.0059 driver on Solaris 8 to connect to SQL Server 7 on Win 2000. When he
tries to connect using a simple C application he gets the error
"[DataDirect][ODBC SQL Server Driver][SQL Server]Cannot open database
requested in login 'northwind'. Login fails." The customer has tried using
the IP Address and the machine name. He has tried connecting to Northwind and
Master. He is using the sa login with a password. He is able to connect with
the same information from a Windows machine either using Windows
Authentication or SQL Server authentication.
There must be some setting within his SQL Server database that does not
allow remote connections, is anyone aware of something like this?
Actually, to update the issue: the customer can connect from a remote Windows
client to his SQL Server 7 database using the MS ODBC driver. However, if he
takes that same data source on his remote Windows client and changes the
connection info to point to the machine name and port number of the Solaris
box where a TCP/IP packet sniffer
(ftp://ftp.datadirect.com/download/da...ools/snoop.jar) is running and
the packet sniffer re-routes the connection to the SQL Server database, he
sees the same error that he gets with the DataDirect ODBC driver on Solaris.
So it appears that SQL Server must be configured only to disallow connections
coming from that Solaris machine, not necessarily all remote connections.
Does anyone know what setting is controlling this?
"Pat Frost" wrote:

> I work for DataDirect-Technologies. My customer is using our Connect for ODBC
> 5.00.0059 driver on Solaris 8 to connect to SQL Server 7 on Win 2000. When he
> tries to connect using a simple C application he gets the error
> "[DataDirect][ODBC SQL Server Driver][SQL Server]Cannot open database
> requested in login 'northwind'. Login fails." The customer has tried using
> the IP Address and the machine name. He has tried connecting to Northwind and
> Master. He is using the sa login with a password. He is able to connect with
> the same information from a Windows machine either using Windows
> Authentication or SQL Server authentication.
> There must be some setting within his SQL Server database that does not
> allow remote connections, is anyone aware of something like this?

Cannot open database requested in login 'northwind'. Login fails.

I work for DataDirect-Technologies. My customer is using our Connect for ODB
C
5.00.0059 driver on Solaris 8 to connect to SQL Server 7 on Win 2000. When h
e
tries to connect using a simple C application he gets the error
"[DataDirect][ODBC SQL Server Driver][SQL Server]Cannot open dat
abase
requested in login 'northwind'. Login fails." The customer has tried using
the IP Address and the machine name. He has tried connecting to Northwind an
d
Master. He is using the sa login with a password. He is able to connect with
the same information from a Windows machine either using Windows
Authentication or SQL Server authentication.
There must be some setting within his SQL Server database that does not
allow remote connections, is anyone aware of something like this?Actually, to update the issue: the customer can connect from a remote Window
s
client to his SQL Server 7 database using the MS ODBC driver. However, if he
takes that same data source on his remote Windows client and changes the
connection info to point to the machine name and port number of the Solaris
box where a TCP/IP packet sniffer
(ftp://ftp.datadirect.com/download/d...tools/snoop.jar) is running an
d
the packet sniffer re-routes the connection to the SQL Server database, he
sees the same error that he gets with the DataDirect ODBC driver on Solaris.
So it appears that SQL Server must be configured only to disallow connection
s
coming from that Solaris machine, not necessarily all remote connections.
Does anyone know what setting is controlling this?
"Pat Frost" wrote:

> I work for DataDirect-Technologies. My customer is using our Connect for O
DBC
> 5.00.0059 driver on Solaris 8 to connect to SQL Server 7 on Win 2000. When
he
> tries to connect using a simple C application he gets the error
> "[DataDirect][ODBC SQL Server Driver][SQL Server]Cannot open d
atabase
> requested in login 'northwind'. Login fails." The customer has tried using
> the IP Address and the machine name. He has tried connecting to Northwind
and
> Master. He is using the sa login with a password. He is able to connect wi
th
> the same information from a Windows machine either using Windows
> Authentication or SQL Server authentication.
> There must be some setting within his SQL Server database that does not
> allow remote connections, is anyone aware of something like this?

Cannot open database requested in login fail for 'Computer\NetSDK'

Hello;
I tried almost everything I can, give permission to ASPNET to the folder
application, start and restart ASPNET, SQL$Server, checked my sqlstring
connections in the global.axp.vb and still cannot connect to the database.
I am using MSDE (Free engine from microsoft), Can someone please help me?
thank you.
JoeHi
Give Computer\NetSDK permission to login to SQL Server, Grant permissions in
the DB for tables and other objects in the DB.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jaz2003" <jaz2003@.discussions.microsoft.com> wrote in message
news:98FC9CC8-DBB6-46F5-BAB4-BEA89D40600A@.microsoft.com...
> Hello;
> I tried almost everything I can, give permission to ASPNET to the folder
> application, start and restart ASPNET, SQL$Server, checked my sqlstring
> connections in the global.axp.vb and still cannot connect to the database.
> I am using MSDE (Free engine from microsoft), Can someone please help me?
> thank you.
> Joe

Cannot open database requested in login fail for 'Computer\NetSDK'

Hello;
I tried almost everything I can, give permission to ASPNET to the folder
application, start and restart ASPNET, SQL$Server, checked my sqlstring
connections in the global.axp.vb and still cannot connect to the database.
I am using MSDE (Free engine from microsoft), Can someone please help me?
thank you.
Joe
Hi
Give Computer\NetSDK permission to login to SQL Server, Grant permissions in
the DB for tables and other objects in the DB.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jaz2003" <jaz2003@.discussions.microsoft.com> wrote in message
news:98FC9CC8-DBB6-46F5-BAB4-BEA89D40600A@.microsoft.com...
> Hello;
> I tried almost everything I can, give permission to ASPNET to the folder
> application, start and restart ASPNET, SQL$Server, checked my sqlstring
> connections in the global.axp.vb and still cannot connect to the database.
> I am using MSDE (Free engine from microsoft), Can someone please help me?
> thank you.
> Joe

Cannot open database requested in login etcetera...

This summary is not available. Please click here to view the post.

Cannot open database requested in login dbName. Login fails. Login failed for user machine

Been looking through the forums for a solution to this problem.
I already tried granting access through statements such as:
exec sp_grantloginaccess N1'machineName\ASPNET'
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.

osql -E -SInstanceName -C -Q "sp_grantlogin 'computer\ASPNET'"
osql -E -SInstanceName -ddatabase -Q "sp_grantdbaccess 'computer\ASPNET'"
osql -E -SInstanceName -ddatabase -Q "sp_addrolemember 'db_owner', 'computer\ASPNET'"InstanceName -C -Q "sp_grantlogin 'computer\ASPNET'"
InstanceName is optional if you only installed the default instance.
|||You need to grant login permissions to the ASPNET account as well asdatabase permissions. Do you have Enterprise Manager? Thiswould help you to set permissions using a GUI tool. Assuming youdo not, then you could use the osql commandline utility. I amalso further assuming this is a local instance of SQL Server.
Usingosql, from the command prompt, this will connect you to your instanceof SQL Server and put you into an interactive mode with osql:
osql -E -S (local)

Now you can enter the commands in the interactive mode:
1>EXEC sp_grantlogin 'machineName\ASPNET'
2>GO

1>USE yourDatabase
2>GO

1>EXEC sp_grantdbaccess 'machineName\ASPNET'
2>GO
1>EXIT


Edit: sorry, didn't see Darrell's post :-)
|||That just shows there's more than one way to do it! Smile [:)]
|||Thanxs '%orton'
I went with tmorton's instructions because it looked easier and more straightforward. I enabled me to get my app running after a few minor adjustments. I described what I did below but don't fully understand why it worked. Could you please help clarify?
I was able to grantlogin to 'machineName\ASPNET', however, got an error stating that permissions already existed for 'machineName\ASPNET' when I tried to grantdbaccess. I do have EnterpriseManager and went into the Users of the database I needed to use. I deleted the 'machineName\ASPNET' from that list. Then ran the sp_grantdbaccess 'machineName\ASPNET' again. This time succeeding. Thus my application has permissions to run. But when I went back ino the database/users, I didn't see 'machineName\ASPNET' in the User list. Why is that?
Where can I look to see the results of executing the sp_grantlogin & sp_grantdbaccess? Shouldn't there be a list for that somewhere?
And just to make sure that I understand what is happening. The sp_grantlogin simply gives the user 'machineName\ASPNET' permission to login into the SQLServer (1st level). Then sp_grantdbacess gives the user 'machineName\ASPNET' permission to access the specified database (from the use yourDatabase)
Thanxs again!!!|||After referring someone else to this post I realized that I never answered your questions. I am sorry!

MEight wrote:

Thanxs '%orton'
I was able to grantlogin to'machineName\ASPNET', however, got an error stating that permissionsalready existed for 'machineName\ASPNET' when I tried to grantdbaccess.


Then you really didn't need to do anything further with *that* command.

MEight wrote:


I do have EnterpriseManager<snip>
But when I wentback ino the database/users, I didn't see 'machineName\ASPNET' in theUser list. Why is that?


Enterprise Manager is not good about refreshing data. Eitherclose Enterprise Manager completely and reopen it, or start at yourserver right-clicking and choosing Refresh on each node all of the waydown until you get to the node for the data you are concernedwith.

MEight wrote:


Where can I look to see the results ofexecuting the sp_grantlogin & sp_grantdbaccess? Shouldn't there bea list for that somewhere?


You can see this in Enterprise Manager (after forcing the data to refresh), or you can execute thesp_helplogins system stored procedure from Query Analyzer (or the osql commandline utility):
EXEC sp_helplogins

MEight wrote:


And just to make sure that Iunderstand what is happening. The sp_grantlogin simply gives the user'machineName\ASPNET' permission to login into the SQLServer (1stlevel). Then sp_grantdbacess gives the user 'machineName\ASPNET'permission to access the specified database (from the use yourDatabase)


Yes, you've got it! You can read up on what MSDN has to say aboutsp_grantlogin andsp_grantdbaccess for more information.
If you haven't done so already, you should installSQL Server 2000 Books Online. This is a great free SQL Server reference.


|||

i can not do anything with sql. This is what i got :

----------------------------

C:\Users\User>osql -E -S
[SQL Native Client]VIA Provider: The specified module could not be found.
[SQL Native Client]Login timeout expired
[SQL Native Client]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.

---------------------------

also, i cant create database directly from SQL Server Management Studio Express!

the error is The permission denied in database 'master'. What should i do?

Cannot open database requested in login ?!(help me ! )

Hi
I'm new in using "SqlClient" I have SQLSERVER 2000 on my computer and I made a Database named "TestDB", and a code like this both Using VS.net :

// begin test Code ///////////////////////////////////
string connectionString =
"Integrated Security=SSPI;Persist Security Info=False;Initial Catalog= TestDB;Data Source=HOSSEIN-COM;Workstation ID=HOSSEIN-COM";
string commandString =
"Select * from Categories";
SqlDataAdapter DataAdapter =
new SqlDataAdapter(
commandString, connectionString);
DataSet DataSet = new DataSet( );
DataAdapter.Fill(DataSet,"CategoryID");
Label1.Text= DataSet.Tables[0].Rows[0]["CategoryID"].ToString();

// end test code /////////////////////////////////////

And at browser I found this error when I Start Building the project:

"Cannot open database requested in login 'testdb'. Login fails. Login failed for user '(my coputer name / my name )' "

Then I changed Catalog= TestDB to Catalog= Northwind and the table name to and available table name and it works , then I tried to create a table at northwind database but this error appeared :
"SELECT permission denied on object 'testTB', database 'Northwind', owner 'dbo'"
TestTB = my northwind table
I guess there must be some security setting in creating databases and tables that I do not know , And when I tried to install quick start the database was not installed ,
I have XP and VS.net and SQLserver 2000 . please halp me as You always do ;) …you need to add the user machinename/ASPNET to the db and also give select permissions to this user on the tables.

hth

Cannot open database requested in login . Login fails.

Hey gang. Trying to figure out where to start troubleshooting this error message while my boss (he who is better with SQL Server than I am) is on vacation. Can someone point me in the right direction?

I'm getting the "Cannot open database requested in login '--'. Login fails." error on a query to a MS-SQL database in a ColdFusion app. Can't even make it go with the sa user. I know the login and password are just fine; when I give it a different, incorrect password, the error message is different ("Login failed for user 'sa'."). Also, I'm able to get into the console and run my query via Enterprise Manager with no problem.

For what it's worth, my boss re-created this database right before he left and I'm thinking he just missed setting a property somewhere; on the old version of the database this ColdFusion page and this query worked fine under the same username/pass.

Any suggestions? Hope this isn't too incoherent.Are you connecting via ODBC? I sometimes get this error message if the default database is improperly set in the ODBC source.

Dirk|||Via a ColdFusion ODBC datasource--all the settings there look good.|||Hey Sapphireblue,

This article can be helpful, I experienced the same problem with my app.
http://support.microsoft.com/default.aspx?scid=kb%3Ben-us%3B283860

Cannot open database requested in login

Hi there i'm having a bit of trouble with my asp.net authorisations and was wondering
if anyone would have any idea how I can solve it - as it's driving me nuts!.

On my local machine (I've MDSN) running with Web Matrix - my connection works fine.

However since i've uploaded it to my Hoster - Forms and DB - I get the error

Cannot open database requested in login 'TestDB'. Login fails. Login failed for user AUTHORITY\NET SERVICE'.

Can anyone give me any pointers on where I should be going?

I've been told by my Hosting co. that the server should be set to localhost (as shown)
but thats about it!

My Web.config file looks like:-

<configuration>
<!-- application specific settings -->
<appSettings>
<add key="ConnectionString" value="server=localhost;Trusted_Connection=true;database=TestDB" />
</appSettings
<!-- forms based authentication --
<system.web>
<!-- enable custom errors for the application -->
<customErrors mode="Off"/>
<!--RemoteOnly" defaultRedirect="ErrorPage.aspx" -->
<!-- disable session state for application -->
<sessionState mode="Off" />
</system.web>
</configuration
Thanks in advance for any help.

Dave.Did the host say whether you should use NT Authorization or Sql Authorization? You are using NT Authorization now but perhaps it should be Sql Authorization. If so you'll have to change your connection string to something like:

data source=localhost;initial catalog=TestDb;password=whatever;user id=whatever;packet size=4096

Of course you'll need to find out what username and password to use.|||I know netiquete etc but had to thank you!

Just like to say thanks for that invaluable piece of information!

If anyone else has the problem i've been getting then the solution proposed by McMurdoStation was absolutly spot on.

Thanks again.

Dave|||Your welcome.

Cannot open database requested by the login. The login failed.

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=localhost\SQLEXPRESS;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 'GERTIE\IBM USER'.

Description:Anunhandled exception occurred during the execution of the current webrequest. Please review the stack trace for more information about theerror 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 'GERTIE\IBM USER'.

Source Error:

Line 19: MyBase.New()
Line 20: myConn = New SqlConnection(_connStr)
Line 21: myConn.Open()
Line 22: End Sub
Line 23:


Source File: C:\Documents and Settings\IBM USER\Desktop\Entertainment\wwwroot\App_Code\cDB.vb Line: 21

Stack Trace:

[SqlException (0x80131904): Cannot open database "EFM" requested by the login. The login failed.
Login failed for user 'GERTIE\IBM 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 Settings\IBM USER\Desktop\Entertainment\wwwroot\App_Code\cDB.vb:21
_Default.Page_Load(Object sender, EventArgs e) in C:\Documents and Settings\IBM USER\Desktop\Entertainment\wwwroot\Default.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

Did you recreate the user in SQL? Is the system still named GERTIE? The user still exists in the new system?

Jeff

|||

the user exists in the database... no change from the proviously working version...

the system name should be irrelevant because of using localhost in the string? or is that not correct.

i don't understand what you mean by the user still exists in the new system. maybe this line of thought has something to do with it...

|||

been searching, and have never seen this issue solved...

i'm starting to get worried...

|||

Some one might be interested to know that i solved this all by myself in the end. It would appear to have somehing to do with IIS not being installed... each time this happens to someone it seems to be moving the systems accross onto a new pc... well it happens very often... I installed IIS, rebooted the pc and then unattached and then reattached the database

worked a charm!!!

Hope this helps someone some where... Oh an i want some points for this contribution!!!;)

|||

Just to be clear, IIS was installed. Otherwise you never would have received an ASP.NET error, since the file could never be processed.

Jeff

sql

Cannot open database requested by the login.

Visual Studio
MS SQL Server
i have this connection string...
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated Security=SSPI;
but an error appears on my conn.Open();
Cannot open database "dbName" requested by the login. The login failed.
Login failed for user 'SERVER\yshie'.
yshie is my username in the computer i use. just to clarify, there are two
user accounts in my pc but both of them are administrators.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-connectivity/200703/1
ok.. i'll start from a scratch! kindly help me build my connection string!
pls don't refer me to different websites because i can't understand those
terms(user instance... etc) so its useless for me. all i know is that i have
this visual studio 2005 and isn't it that inside there is ms sql server where
i created my database. what connection string will i use?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forums.aspx/sql-server-connectivity/200703/1
|||One of the problems with the approach of "just tell me what
string to use and I don't understand the terms so don't go
into that" is that the problems you are having with the
connection string is from not understanding what those parts
of the string mean. It's like creating classes without
wanting to know what properties or methods are.
You said you are using this string:
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated
Security=SSPI;
And that you get the error:
Cannot open database "dbName" requested by the login. The
login failed.
Login failed for user 'SERVER\yshie'.
The problem is that the login user (you) do not have access
to the database dbName or the database dbName does not exist
on the server. If the database you are using in your string
really is dbName then that database must exist on the server
and you must have access to it.
Just as a connection test, trying changing your Initial
Catalog to master. Keep the data source as: .\SQLEXPRESS
And keep the Integrated Security set to SSPI
-Sue
On Fri, 30 Mar 2007 04:25:14 GMT, "yshie via droptable.com"
<u32884@.uwe> wrote:

>ok.. i'll start from a scratch! kindly help me build my connection string!
>pls don't refer me to different websites because i can't understand those
>terms(user instance... etc) so its useless for me. all i know is that i have
>this visual studio 2005 and isn't it that inside there is ms sql server where
>i created my database. what connection string will i use?

Cannot open database requested by the login.

Visual Studio
MS SQL Server
i have this connection string...
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated Security=SSPI;
but an error appears on my conn.Open();
Cannot open database "dbName" requested by the login. The login failed.
Login failed for user 'SERVER\yshie'.
yshie is my username in the computer i use. just to clarify, there are two
user accounts in my pc but both of them are administrators.
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...tivity/200703/1ok.. i'll start from a scratch! kindly help me build my connection string!
pls don't refer me to different websites because i can't understand those
terms(user instance... etc) so its useless for me. all i know is that i have
this visual studio 2005 and isn't it that inside there is ms sql server wher
e
i created my database. what connection string will i use?
Message posted via droptable.com
http://www.droptable.com/Uwe/Forum...tivity/200703/1|||One of the problems with the approach of "just tell me what
string to use and I don't understand the terms so don't go
into that" is that the problems you are having with the
connection string is from not understanding what those parts
of the string mean. It's like creating classes without
wanting to know what properties or methods are.
You said you are using this string:
Data Source=.\SQLEXPRESS;Initial Catalog=dbName;Integrated
Security=SSPI;
And that you get the error:
Cannot open database "dbName" requested by the login. The
login failed.
Login failed for user 'SERVER\yshie'.
The problem is that the login user (you) do not have access
to the database dbName or the database dbName does not exist
on the server. If the database you are using in your string
really is dbName then that database must exist on the server
and you must have access to it.
Just as a connection test, trying changing your Initial
Catalog to master. Keep the data source as: .\SQLEXPRESS
And keep the Integrated Security set to SSPI
-Sue
On Fri, 30 Mar 2007 04:25:14 GMT, "yshie via droptable.com"
<u32884@.uwe> wrote:

>ok.. i'll start from a scratch! kindly help me build my connection string!
>pls don't refer me to different websites because i can't understand those
>terms(user instance... etc) so its useless for me. all i know is that i hav
e
>this visual studio 2005 and isn't it that inside there is ms sql server whe
re
>i created my database. what connection string will i use?

Cannot open database "xx" requested by the login. The login failed.

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 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

Looks like your application attempts to login using "OBJECTS" as the default database and the database does not exist. Is that database supposed to always exist or is it occasionally dropped and recreated? Your application should not attempt to connect to the database if it might not exist.

Thanks
Laurentiu

|||Hi Laurentiu,

the database always exists. So it must always be available for connection.
But for some reason SQL fails to see the database.

Also, it's not one and the same database that has this problems. We have more than 100 databases on the sql server, and the connection error popups randomly with other databases.

Greets
Tom|||

Can you check your server errorlog and post the errors that show up there? Also, does this happen during server startup by any chance? Is your database on a special volume, such that it would take longer to start up, for example, is it on an EFS volume?

Thanks
Laurentiu

|||Hi Laurentiu,

I'll check the correct SQL serverlogs when this error occurs.

The server is not starting up but running as normally. Remember, this is a production server.
No special volumes.

Additional information :

As told the connection is made in our ASP pages , using an ADO connectionstring.

Now it seems that the initial connection setup works :
e.g

set pCn = Server.CreateObject("ADODB.Connection")
pCn.connectionstring=lstr
pCn.Open

And the first executes always seem to work :
e.g.
pcn.Execute ("select * from thetable")

But in the same page, more executes are performed with the same connection (pC).
And after some executes, it fails with the above error.

Again, this does not happen always, and not with the same database !
And we are not starting up the server, or doing special tasks (aka backups,etc) which would add an extra load on the server.
The moments that this error occures are random, as are the databases with which the error occurs.

Greetings
Tom

|||

If you hit the error again, can you please provide the errorlog entries?

Thanks
Laurentiu

|||

Hi Laurentiu,

sorry for the delay in getting back to you.

There are no error entries in the primary sql server error logs
Only an error pops up in the secondary (mirror) server, stating the login failed.
And this of cours 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 my code I give a secondary server as reference.

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 lconstirng lconstring

where lconstring is a dsn param : e.g. "filedsn=c:\data\dsn\mastercon.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

Any ideas ?

Greets
Tom|||

Hi Tom,

For these questions, I suggest trying the Database Mirroring forum or the SQL Server Data Access forum. These are the forums that address issues related to mirroring and server connections.

Thanks
Laurentiu

Monday, March 19, 2012

Cannot open database "xx" requested by the login. The login failed.

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:\data\dsn\mastercon.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

This will occur if you client has intermittent problems accessing the principal. The mirroring principal will send the name of the mirror server to the client after the first connection. If the client loses connection, it does not know if the principal has failed (it could have been destroyed by a natural disaster for example) so it will try to connect to the mirror to see if there has been a failover to the mirror. Since there was no server side failover in this case, you will get the connection failure logged on the mirror server. I recommend you monitor your network to see if there are intermittent problems causing this behavior.

Regards,

Matt Hollingsworth

Sr. Program Manager

SQL Server High Availability

|||At this point we can't find any immediate problems.

What information could help us to identify the reason causing the 'intermittent problems accessing the principal' ?

Are there logs I can consult ?

Greetings

Tom|||

I found an interesting link, which could be the reason for our problem.

But we are unaware that we disbled pooling :

http://groups-beta.google.com/group/microsoft.public.sqlserver.odbc/browse_thread/thread/9c79f6f4e8adce7b/f99b340d2fd76aef

Would this fix help even when pooling is enabled ?

Greetings,
Tom

|||Any solution for this with SP2 for 2005 ?

Cannot open database "xx" requested by the login. The login failed.

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:\data\dsn\mastercon.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

This will occur if you client has intermittent problems accessing the principal. The mirroring principal will send the name of the mirror server to the client after the first connection. If the client loses connection, it does not know if the principal has failed (it could have been destroyed by a natural disaster for example) so it will try to connect to the mirror to see if there has been a failover to the mirror. Since there was no server side failover in this case, you will get the connection failure logged on the mirror server. I recommend you monitor your network to see if there are intermittent problems causing this behavior.

Regards,

Matt Hollingsworth

Sr. Program Manager

SQL Server High Availability

|||At this point we can't find any immediate problems.

What information could help us to identify the reason causing the 'intermittent problems accessing the principal' ?

Are there logs I can consult ?

Greetings

Tom|||

I found an interesting link, which could be the reason for our problem.

But we are unaware that we disbled pooling :

http://groups-beta.google.com/group/microsoft.public.sqlserver.odbc/browse_thread/thread/9c79f6f4e8adce7b/f99b340d2fd76aef

Would this fix help even when pooling is enabled ?

Greetings,
Tom

|||Any solution for this with SP2 for 2005 ?