Showing posts with label installed. Show all posts
Showing posts with label installed. Show all posts

Thursday, March 29, 2012

Cannot Remove SQL 2005 June CTP

I have SQL 2005 June CTP installed and running. I previously had VS 2005 CTP installed as well. I removed VS with the beta removal tool and installed the release version. I am now trying to remove SQL and cannot do it.

First I tried Add / Remove programs. I chose remove for SQL 2005 and it removed the entry from Add / Remove programs but did nothing else. I then tried the beta removal tool sqlbuw.exe on the CD which detectes 3 instances of SQL 2005 but when it tries to remove them it says "There are no SQL Server 2005 or .NET Framework components to uninstall. You may now run the setup wizard to install new instances."

When I run the setup wizard it says i must uninstall the previous incompatible beta versions first.

Talk about catch 22. Are there instructions for manually removing SQL 2005 June CTP?

Thanks
MartinMartin,

It sounds like you got yourself into trouble by removing VS prior to SQL Server. The SQL Server uninstall requires that .Net Framework 2.0 still be present on the machine. The reason for this is some assemblies are placed in the GAC (Global Assembly Cache) and the only way to clean up the GAC is through the .Net Framework.

We have an uninstall script that I can send you. You should know that this script is not supported and is not tested to a full release level. We've been using it internally and I've given it out to some folks - we've had no reports of the script causing any machine corruption, however, this is a run at your own risk deal. If you're interested in the script email me at dan.jones@.microsoft.com.

Cheers,
Dan|||Unfortuantly the script did not work and a rebuild was required. At least my computer is faster now :o)

Martin

Tuesday, March 27, 2012

Cannot remotely connect on SQL Server Instances by name.

Hi all,

On my computer I have installed two instances of SQL Server 2000. The first one is the default instance of SQL Server Personal Edition and the second one is an MSDE instance.

From other PCs on the company LAN I can connect, by name, only to the first one and not to the MSDE instance.

I have tried the combination IP Address, TCP Port and it work fine.

Anyone any ideas?

Thanks in advance,

Stavros Makridis.

did you get this fixed ever?|||


Hi,

the named instance is accessible with MachineName\InstanceName,PortNumber in SQL Server 2000.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de|||

Jens K. Suessmeyer wrote:


Hi,

the named instance is accessible with MachineName\InstanceName,PortNumber in SQL Server 2000.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

If tcp port is specified in the connection string, the instance name value is ignored.|||UDP port 1434 must be blocked somehow. SQL Browser needs this port to resolve srv\instance to a valid server:tcp_port.|||He is using SQL 2000, so no SQL Browser.|||

Yes there is. Browser is handled by the first instance of sqlserver internally.

|||

I wasn′t aware of that, do you have some links about this topic and this internal feature ?

|||You can find it in bol and on technet.

Here is an excerpt from bol (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/3cc00d3a-487c-4cd9-a155-655f02485fa0.htm):
"Background

Prior to Microsoft SQL Server 2000, only one instance of SQL Server could be installed on a computer. SQL Server listened for incoming requests on port 1433, assigned to SQL Server by the official Internet Assigned Numbers Authority (IANA). Only one instance of SQL Server can use a port, so when SQL Server 2000 introduced support for multiple instances of SQL Server, SQL Server Resolution Protocol (SSRP) was developed to listen on UDP port 1434. This listener service responded to client requests with the names of the installed instances, and the ports or named pipes used by the instance. To resolve limitations of the SSRP system, SQL Server 2005 introduces the SQL Server Browser service as a replacement for SSRP."

Cannot remotely connect on SQL Server Instances by name.

Hi all,

On my computer I have installed two instances of SQL Server 2000. The first one is the default instance of SQL Server Personal Edition and the second one is an MSDE instance.

From other PCs on the company LAN I can connect, by name, only to the first one and not to the MSDE instance.

I have tried the combination IP Address, TCP Port and it work fine.

Anyone any ideas?

Thanks in advance,

Stavros Makridis.

did you get this fixed ever?|||


Hi,

the named instance is accessible with MachineName\InstanceName,PortNumber in SQL Server 2000.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Jens K. Suessmeyer wrote:


Hi,

the named instance is accessible with MachineName\InstanceName,PortNumber in SQL Server 2000.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

If tcp port is specified in the connection string, the instance name value is ignored.|||UDP port 1434 must be blocked somehow. SQL Browser needs this port to resolve srv\instance to a valid server:tcp_port.|||He is using SQL 2000, so no SQL Browser.|||

Yes there is. Browser is handled by the first instance of sqlserver internally.

|||

I wasn′t aware of that, do you have some links about this topic and this internal feature ?

|||You can find it in bol and on technet.

Here is an excerpt from bol (ms-help://MS.SQLCC.v9/MS.SQLSVR.v9.en/udb9/html/3cc00d3a-487c-4cd9-a155-655f02485fa0.htm):
"Background

Prior to Microsoft SQL Server 2000, only one instance of SQL Server

could be installed on a computer. SQL Server listened for incoming requests on

port 1433, assigned to SQL Server by the official Internet Assigned Numbers

Authority (IANA). Only one instance of SQL Server can use a port, so when SQL

Server 2000 introduced support for multiple instances of SQL Server, SQL Server

Resolution Protocol (SSRP) was developed to listen on UDP port 1434. This

listener service responded to client requests with the names of the installed

instances, and the ports or named pipes used by the instance. To resolve

limitations of the SSRP system, SQL Server 2005 introduces the SQL Server

Browser service as a replacement for SSRP."

Cannot REinstall SQL2000 SP3 After Install MSAS

My development machine has win 2000 SP4, SQL server dev 2000 with SP3
and vs2003 etc. I installed Analysis services on my dev machine but
MSAS does not work (try to browse FoodMart2000 any cube gives error
"Unable to browse the cube 'Budget' Unspecified Error" ). Found an
article said to fix MSAS by reinstalling SQL2000 SP3. On another
machine, I re-installed Sp3 after MSAS then MSAS worked. Here is the
error from my Dev machine SP3 reinstall. I uninstalled MSAS,
reinstalled MSAS then tried SQL2000SP3 but still get the same error.
Any IDeas?
MSSQLSERVER has a newer version of Service pack installed. Setup will
now exit.
@.@.VERSION from machine that will not let me re-install SQL2000 SP3.
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
Hi,
First install SQL server without SP,
then install AS without SP,
Install SQL server SP3,
Install AS SP3
Funny, but will work
Regards,
Daniel
<abefuzzleduser2@.yahoo.com> wrote in message
news:1106922902.619763.105470@.c13g2000cwb.googlegr oups.com...
> My development machine has win 2000 SP4, SQL server dev 2000 with SP3
> and vs2003 etc. I installed Analysis services on my dev machine but
> MSAS does not work (try to browse FoodMart2000 any cube gives error
> "Unable to browse the cube 'Budget' Unspecified Error" ). Found an
> article said to fix MSAS by reinstalling SQL2000 SP3. On another
> machine, I re-installed Sp3 after MSAS then MSAS worked. Here is the
> error from my Dev machine SP3 reinstall. I uninstalled MSAS,
> reinstalled MSAS then tried SQL2000SP3 but still get the same error.
> Any IDeas?
> MSSQLSERVER has a newer version of Service pack installed. Setup will
> now exit.
> @.@.VERSION from machine that will not let me re-install SQL2000 SP3.
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
>
|||Thanks Daniel,
That is what I was afraid of, since there is no easy way to roll back
SP3.
I will work on reinstallation.
Paul
sql

Cannot REinstall SQL2000 SP3 After Install MSAS

My development machine has win 2000 SP4, SQL server dev 2000 with SP3
and vs2003 etc. I installed Analysis services on my dev machine but
MSAS does not work (try to browse FoodMart2000 any cube gives error
"Unable to browse the cube 'Budget' Unspecified Error" ). Found an
article said to fix MSAS by reinstalling SQL2000 SP3. On another
machine, I re-installed Sp3 after MSAS then MSAS worked. Here is the
error from my Dev machine SP3 reinstall. I uninstalled MSAS,
reinstalled MSAS then tried SQL2000SP3 but still get the same error.
Any IDeas?
MSSQLSERVER has a newer version of Service pack installed. Setup will
now exit.
@.@.VERSION from machine that will not let me re-install SQL2000 SP3.
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)Hi,
First install SQL server without SP,
then install AS without SP,
Install SQL server SP3,
Install AS SP3
Funny, but will work
Regards,
Daniel
<abefuzzleduser2@.yahoo.com> wrote in message
news:1106922902.619763.105470@.c13g2000cwb.googlegroups.com...
> My development machine has win 2000 SP4, SQL server dev 2000 with SP3
> and vs2003 etc. I installed Analysis services on my dev machine but
> MSAS does not work (try to browse FoodMart2000 any cube gives error
> "Unable to browse the cube 'Budget' Unspecified Error" ). Found an
> article said to fix MSAS by reinstalling SQL2000 SP3. On another
> machine, I re-installed Sp3 after MSAS then MSAS worked. Here is the
> error from my Dev machine SP3 reinstall. I uninstalled MSAS,
> reinstalled MSAS then tried SQL2000SP3 but still get the same error.
> Any IDeas?
> MSSQLSERVER has a newer version of Service pack installed. Setup will
> now exit.
> @.@.VERSION from machine that will not let me re-install SQL2000 SP3.
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
>|||Thanks Daniel,
That is what I was afraid of, since there is no easy way to roll back
SP3.
I will work on reinstallation.
Paul

Cannot REinstall SQL2000 SP3 After Install MSAS

My development machine has win 2000 SP4, SQL server dev 2000 with SP3
and vs2003 etc. I installed Analysis services on my dev machine but
MSAS does not work (try to browse FoodMart2000 any cube gives error
"Unable to browse the cube 'Budget' Unspecified Error" ). Found an
article said to fix MSAS by reinstalling SQL2000 SP3. On another
machine, I re-installed Sp3 after MSAS then MSAS worked. Here is the
error from my Dev machine SP3 reinstall. I uninstalled MSAS,
reinstalled MSAS then tried SQL2000SP3 but still get the same error.
Any IDeas?
MSSQLSERVER has a newer version of Service pack installed. Setup will
now exit.
@.@.VERSION from machine that will not let me re-install SQL2000 SP3.
Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)Hi,
First install SQL server without SP,
then install AS without SP,
Install SQL server SP3,
Install AS SP3
Funny, but will work
Regards,
Daniel
<abefuzzleduser2@.yahoo.com> wrote in message
news:1106922902.619763.105470@.c13g2000cwb.googlegroups.com...
> My development machine has win 2000 SP4, SQL server dev 2000 with SP3
> and vs2003 etc. I installed Analysis services on my dev machine but
> MSAS does not work (try to browse FoodMart2000 any cube gives error
> "Unable to browse the cube 'Budget' Unspecified Error" ). Found an
> article said to fix MSAS by reinstalling SQL2000 SP3. On another
> machine, I re-installed Sp3 after MSAS then MSAS worked. Here is the
> error from my Dev machine SP3 reinstall. I uninstalled MSAS,
> reinstalled MSAS then tried SQL2000SP3 but still get the same error.
> Any IDeas?
> MSSQLSERVER has a newer version of Service pack installed. Setup will
> now exit.
> @.@.VERSION from machine that will not let me re-install SQL2000 SP3.
> Microsoft SQL Server 2000 - 8.00.760 (Intel X86)
> Dec 17 2002 14:22:05
> Copyright (c) 1988-2003 Microsoft Corporation
> Developer Edition on Windows NT 5.0 (Build 2195: Service Pack 4)
>|||Thanks Daniel,
That is what I was afraid of, since there is no easy way to roll back
SP3.
I will work on reinstallation.
Paul

Cannot reinstall Sql Server Management Express

Hi,I just unistalled Sql Management Express and now I want to install it again but the installer says the product is already installed,Can somebody help me with this

What SQL components do you still show in Add/Remove Programs? Can you click on Remove and then on Report to show the detailed list and post the contents back to the thread?

Thanks,
Sam Lester (MSFT)

|||I was trying to reinstall from the setup package, using the change button in the add remove programs utility I was able to reinstall it thanks

Cannot Register the server

I've installed an Instance of MSDE on a Win2k Machine and and WinXP Machine.
I'm able to register the Instances locally through EM (v.8.0), but when I
try to register them from a different PC with EM on it, I get the following
error.
SQL Server does not exist or access is denied. ConnectionOpen (Connect()
Is MSDE limited to local Enterprise Management?
Wack
This message will self destruct.
hi Ray,
Ray Lewis wrote:
> I've installed an Instance of MSDE on a Win2k Machine and and WinXP
> Machine. I'm able to register the Instances locally through EM
> (v.8.0), but when I try to register them from a different PC with EM
> on it, I get the following error.
> SQL Server does not exist or access is denied. ConnectionOpen
> (Connect()
> Is MSDE limited to local Enterprise Management?
please verify the network protocols are enabled via Server Network Utility
(svrnetcn.exe)...
MSDE installs by default disabling network protocols in order to prevent
external connections/attacks... you have to provide the
DISABLENETWORKPROTOCOLS=0
parameter at install time in order to force network protocols to be enable,
or, later afte install, use svrnetcn.exe to enable and configure the desired
protocol
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Thanks. I finally discovered that. Also, on XP SP2, you need to allow port
1433 through the firewall.
Wack
This message will self destruct.
"Andrea Montanari" <andrea.sqlDMO@.virgilio.it> wrote in message
news:38p2mrF5riea7U1@.individual.net...
> hi Ray,
> Ray Lewis wrote:
> please verify the network protocols are enabled via Server Network Utility
> (svrnetcn.exe)...
> MSDE installs by default disabling network protocols in order to prevent
> external connections/attacks... you have to provide the
> DISABLENETWORKPROTOCOLS=0
> parameter at install time in order to force network protocols to be
enable,
> or, later afte install, use svrnetcn.exe to enable and configure the
desired
> protocol
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.10.0 - DbaMgr ver 0.56.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>

Cannot Register Sql Server Database

We have SQL Server installed on a Windows 2000 server machine. I have a cop
y of Sql Server Personal Addition - Client tools on my computer. When I ope
n the SQL Server Enterprise manager and try perform an New SQL Server Regist
ration, I get the following
error: Login Failed for user '(null)'. Reason: Not associated with a truste
d SQL Server Connection. I am using windows authentication.
I am able to connect to other sql server databases on other servers.
I also cannot connect to the server via ODBC. I get the error: Unable to lo
cate database server. Verify that the database server name you entered is c
orrect.
I am running microsoft XP / Microsoft SQL Server 2000 service pack 3a is on
the server.Hi,
Are you using Domain user id to login to your machine, if yes then check the
SQL server that you have given access to sql server.
How to check.
In Enterprise Manager, Security option, Check wheather ur login is there
with reqired previlages.
Thanks
Hari
MCDBA
"Allan Latts" <alatts@.yaoo.com> wrote in message
news:B571755C-B3AA-4ED1-94D9-FE11B0B8EE3E@.microsoft.com...
> We have SQL Server installed on a Windows 2000 server machine. I have a
copy of Sql Server Personal Addition - Client tools on my computer. When I
open the SQL Server Enterprise manager and try perform an New SQL Server
Registration, I get the following error: Login Failed for user '(null)'.
Reason: Not associated with a trusted SQL Server Connection. I am using
windows authentication.
> I am able to connect to other sql server databases on other servers.
> I also cannot connect to the server via ODBC. I get the error: Unable to
locate database server. Verify that the database server name you entered is
correct.
> I am running microsoft XP / Microsoft SQL Server 2000 service pack 3a is
on the server.

Cannot Register Remote Server

Dear all,
I've installed SQL2005 on my local machine. And there is another SERVER whic
h has install both SQL2000 and SQL2005. I can use my local Management Studio
to register the SERVER\SQL2000 instance but I cannot register SERVER\SQL200
5 instance.
How can I register and connect to the SERVER\SQL2005 server?
The SERVER\SQL2005 has been configured to enable the protocols of shared mem
ory, namepipe and tcpip already.
The SERVER has installed SQL2000 first and then install SQL2005 server.
Thanks a lot.
Regards,
Alex AUHi Alex
Can you conncet to this server using SQLCMD? If not check that Remote
Connections have been set in the surface area configuration tool.
John
"Alex AU" wrote:

> Dear all,
> I've installed SQL2005 on my local machine. And there is another SERVER wh
ich has install both SQL2000 and SQL2005. I can use my local Management Stud
io to register the SERVER\SQL2000 instance but I cannot register SERVER\SQL2
005 instance.
> How can I register and connect to the SERVER\SQL2005 server?
> The SERVER\SQL2005 has been configured to enable the protocols of shared m
emory, namepipe and tcpip already.
> The SERVER has installed SQL2000 first and then install SQL2005 server.
> Thanks a lot.
>
> Regards,
> Alex AU|||Alex AU wrote:
> Dear all,
> I've installed SQL2005 on my local machine. And there is another
> SERVER which has install both SQL2000 and SQL2005. I can use my local
> Management Studio to register the SERVER\SQL2000 instance but I cannot
> register SERVER\SQL2005 instance.
> How can I register and connect to the SERVER\SQL2005 server?
> The SERVER\SQL2005 has been configured to enable the protocols
> of shared memory, namepipe and tcpip already.
> The SERVER has installed SQL2000 first and then install SQL2005 server.
> Thanks a lot.
>
> Regards,
> Alex AU
Are both SQL2000 and SQL2005 installed as named instances on the server?
It could be that SQL2000 is installed as a default instance (hence you
can connect to it just with the servername) and SQL2005 is installed as
a named instance so you need to use that instance name to connect.
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator|||Dear John,
I've already setup the remote connections to accept namepine and tcpip conne
ction in the surface area configuration tool.
I can use ODBC to establish connection from my workstation to the SERVER\SQL
2005 but just cannot register the server in the Management Studio on my work
station.
Thanks.
Regards,
Alex AU
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:3238D38E-5324
-49BB-A188-43078C16F3A1@.microsoft.com...
Hi Alex
Can you conncet to this server using SQLCMD? If not check that Remote
Connections have been set in the surface area configuration tool.
John
"Alex AU" wrote:

> Dear all,
>
> I've installed SQL2005 on my local machine. And there is another SERVER wh
ich has install both SQL2000 and SQL2005. I can use my local Management Stud
io to register the SERVER\SQL2000 instance but I cannot register SERVER\SQL2
005 instance.
>
> How can I register and connect to the SERVER\SQL2005 server?
>
> The SERVER\SQL2005 has been configured to enable the protocols of shared m
emory, namepipe and tcpip already.
>
> The SERVER has installed SQL2000 first and then install SQL2005 server.
>
> Thanks a lot.
>
>
>
> Regards,
>
> Alex AU|||Dear Steen,
The SQL2000 is the default instance and SQL2005 is a named instance. When I
register the SQL2005 on my workstation's Management Studio, I've already use
d the name instance to try connect but it failed.
I've already set the remote connection with namepipe and tcpip in the servic
e area configuration on the server. When I try to use ODBC on my workstation
to connect to the SERVER\SQL2005, I can successfully establish the connecti
on. I just cannot register the SERVER\SQL2005 on my workstation's management
studio.
Thanks
Regards,
Alex AU
"Steen Persson (DK)" <spe@.REMOVEdatea.dk> wrote in message news:u0NxbpJrGHA.
2256@.TK2MSFTNGP03.phx.gbl...
Alex AU wrote:
Dear all,
I've installed SQL2005 on my local machine. And there is another SERVER whic
h has install both SQL2000 and SQL2005. I can use my local Management Studio
to register the SERVER\SQL2000 instance but I cannot register SERVER\SQL200
5 instance.
How can I register and connect to the SERVER\SQL2005 server?
The SERVER\SQL2005 has been configured to enable the protocols of shared mem
ory, namepipe and tcpip already.
The SERVER has installed SQL2000 first and then install SQL2005 server.
Thanks a lot.
Regards,
Alex AU
Are both SQL2000 and SQL2005 installed as named instances on the server? It
could be that SQL2000 is installed as a default instance (hence you can conn
ect to it just with the servername) and SQL2005 is installed as a named inst
ance so you need to use that instance name to connect.
--
Regards
Steen Schlüter Persson
Databaseadministrator / Systemadministrator|||Hi Alex
And SQLCMD allows you to connect?
John
"Alex AU" wrote:

> Dear John,
> I've already setup the remote connections to accept namepine and tcpip
> connection in the surface area configuration tool.
> I can use ODBC to establish connection from my workstation to the
> SERVER\SQL2005 but just cannot register the server in the Management
> Studio on my workstation.
> Thanks.
>
> Regards,
> Alex AU
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:3238D38E-5324-49BB-A188-43078C16F3A1@.microsoft.com...
> Hi Alex
> Can you conncet to this server using SQLCMD? If not check that Remote
> Connections have been set in the surface area configuration tool.
> John
> "Alex AU" wrote:
>
> SERVER which has install both SQL2000 and SQL2005. I can use my local
> Management Studio to register the SERVER\SQL2000 instance but I cannot
> register SERVER\SQL2005 instance.
> shared memory, namepipe and tcpip already.
> server.
>|||Dear John,
I've tried sqlcmd, it also failed. The command I used and error as follow:
sqlcmd -S SERVER\SQL2005
HResult 0xFFFFFFFF, Level 16, State 1
SQL Network Interfaces: Error Locating Server/Instance Specified [xFFFFF
FFF].
Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while est
abli
shing a connection to the server. When connecting to SQL Server 2005, this f
ailu
re may be caused by the fact that under the default settings SQL Server does
not
allow remote connections..
Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
Thanks a lot.
Regards,
Alex AU
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:342A5195-A4E1
-4477-AFDF-F592B3809BDC@.microsoft.com...
Hi Alex
And SQLCMD allows you to connect?
John
"Alex AU" wrote:

> Dear John,
>
> I've already setup the remote connections to accept namepine and tcpip
> connection in the surface area configuration tool.
>
> I can use ODBC to establish connection from my workstation to the
> SERVER\SQL2005 but just cannot register the server in the Management
> Studio on my workstation.
>
> Thanks.
>
>
>
> Regards,
>
> Alex AU
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:3238D38E-5324-49BB-A188-43078C16F3A1@.microsoft.com...
> Hi Alex
>
> Can you conncet to this server using SQLCMD? If not check that Remote
> Connections have been set in the surface area configuration tool.
>
> John
>
> "Alex AU" wrote:
>
> SERVER which has install both SQL2000 and SQL2005. I can use my local
> Management Studio to register the SERVER\SQL2000 instance but I cannot
> register SERVER\SQL2005 instance.
> shared memory, namepipe and tcpip already.
> server.
>|||Hi Alex
This is indicating that the remote connections setting are not set on the
protocols. What does the SQLServer 2005 Configuration Manager tool say (i.e.
not SAC!). Also make sure that you can resolve the server name correctly.
You may also want to look at SQLPing to to see to search for servers
http://www.sqlsecurity.com/Tools/Fr...65/Default.aspx
John
"Alex AU" wrote:

> Dear John,
> I've tried sqlcmd, it also failed. The command I used and error as follow:
> sqlcmd -S SERVER\SQL2005
> HResult 0xFFFFFFFF, Level 16, State 1
> SQL Network Interfaces: Error Locating Server/Instance Specified
> [xFFFFFFFF].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establi
> shing a connection to the server. When connecting to SQL Server 2005, this
> failu
> re may be caused by the fact that under the default settings SQL Server
> does not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
> Thanks a lot.
>
> Regards,
> Alex AU
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:342A5195-A4E1-4477-AFDF-F592B3809BDC@.microsoft.com...
> Hi Alex
> And SQLCMD allows you to connect?
> John
> "Alex AU" wrote:
>
> Remote
>|||Thanks John,
I've used the tools on that SERVER and I've found that the port number for S
QL2005 using is 1025. (SQL2000 use 1433).
I finally figure out what causing the connection issue, it's the firewall se
ttings. I use a Windows XP with SP2 as a server and the firewall has turned
on. It only allow SQL connection from port 1433 and that's the reason why I
cannot connect with SQL Management Studio with port 1025 (SQL2005). When I s
hut down the firewall, it works.
Sorry for the chaos that I've made. But I really appreciate for your kindly
help.
I've got one more question related to this. I've tried to add exception rule
in the XP firewall settings for port 1025, but I still cannot connect. I ca
n only connect when the firewall is off. Can anyone help with this? (or shou
ld I post in other newsgroup for this issue?)
Thanks.
Regards,
Alex AU
"John Bell" <jbellnewsposts@.hotmail.com> wrote in message news:E4A5B93E-6A03
-4406-87B6-399E4A150D02@.microsoft.com...
Hi Alex
This is indicating that the remote connections setting are not set on the
protocols. What does the SQLServer 2005 Configuration Manager tool say (i.e.
not SAC!). Also make sure that you can resolve the server name correctly.
You may also want to look at SQLPing to to see to search for servers
http://www.sqlsecurity.com/Tools/Fr...65/Default.aspx
John
"Alex AU" wrote:

> Dear John,
>
> I've tried sqlcmd, it also failed. The command I used and error as follow:
>
> sqlcmd -S SERVER\SQL2005
>
> HResult 0xFFFFFFFF, Level 16, State 1
> SQL Network Interfaces: Error Locating Server/Instance Specified
> [xFFFFFFFF].
> Sqlcmd: Error: Microsoft SQL Native Client : An error has occurred while
> establi
> shing a connection to the server. When connecting to SQL Server 2005, this
> failu
> re may be caused by the fact that under the default settings SQL Server
> does not
> allow remote connections..
> Sqlcmd: Error: Microsoft SQL Native Client : Login timeout expired.
>
> Thanks a lot.
>
>
>
> Regards,
>
> Alex AU
>
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:342A5195-A4E1-4477-AFDF-F592B3809BDC@.microsoft.com...
> Hi Alex
>
> And SQLCMD allows you to connect?
>
> John
>
> "Alex AU" wrote:
>
> Remote
>|||Hi
I don't know the intricacies of the XP firewall as I have always used a
third party one. The following describes what you should need to set up in
terms of rules, change this for the port you are using and it should be ok.
http://support.microsoft.com/kb/287932
John
"Alex AU" wrote:

> Thanks John,
> I've used the tools on that SERVER and I've found that the port number for
> SQL2005 using is 1025. (SQL2000 use 1433).
> I finally figure out what causing the connection issue, it's the firewall
> settings. I use a Windows XP with SP2 as a server and the firewall has
> turned on. It only allow SQL connection from port 1433 and that's the
> reason why I cannot connect with SQL Management Studio with port 1025
> (SQL2005). When I shut down the firewall, it works.
> Sorry for the chaos that I've made. But I really appreciate for your
> kindly help.
> I've got one more question related to this. I've tried to add exception
> rule in the XP firewall settings for port 1025, but I still cannot
> connect. I can only connect when the firewall is off. Can anyone help with
> this? (or should I post in other newsgroup for this issue?)
> Thanks.
>
> Regards,
> Alex AU
> "John Bell" <jbellnewsposts@.hotmail.com> wrote in message
> news:E4A5B93E-6A03-4406-87B6-399E4A150D02@.microsoft.com...
> Hi Alex
> This is indicating that the remote connections setting are not set on
> the
> protocols. What does the SQLServer 2005 Configuration Manager tool say
> (i.e.
> not SAC!). Also make sure that you can resolve the server name
> correctly.
> You may also want to look at SQLPing to to see to search for servers
> http://www.sqlsecurity.com/Tools/Fr...65/Default.aspx
> John
> "Alex AU" wrote:
>
> follow:
> while
> this
> Server
> tcpip
> Management
> tool.
> another
> local
> cannot
> of
> SQL2005
>

Cannot register a local instance

I have SQL Server 2000 installed, client tools only. I can
access the SQL Server on my network and various remote SQL
boxes but I cannot register a local instance.
I keep getting the "SQL Server does not exist or access
denied error message".
Any advice?If you have only the client tools installed locally, you won't be able to
connect to a local instance because there's no local instance. You need to
install the actual engine to be able to connect locally. However, if you
have sql installed locally and you can't connect, make sure the service is
running. You can check this out in the services applet in administrative
tools.
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 programming by Example
"Rich" <anonymous@.discussions.microsoft.com> wrote in message
news:67db01c3e422$2409f840$7d02280a@.phx.gbl...
quote:

> I have SQL Server 2000 installed, client tools only. I can
> access the SQL Server on my network and various remote SQL
> boxes but I cannot register a local instance.
> I keep getting the "SQL Server does not exist or access
> denied error message".
> Any advice?
|||Thanks for that.
I have run a local instance of SQL server on a stand alone
machine in the past, SQL 7 was also installed though.
I need to be able to use SQL server offline at home on my
laptop. Any suggestions?
No SQL services apparently running locally.
quote:

>--Original Message--
>If you have only the client tools installed locally, you

won't be able to
quote:

>connect to a local instance because there's no local

instance. You need to
quote:

>install the actual engine to be able to connect locally.

However, if you
quote:

>have sql installed locally and you can't connect, make

sure the service is
quote:

>running. You can check this out in the services applet in

administrative
quote:

>tools.
>--
>Carlos E. Rojas
>SQL Server MVP
>Co-Author SQL Server 2000 programming by Example
>
>"Rich" <anonymous@.discussions.microsoft.com> wrote in

message
quote:

>news:67db01c3e422$2409f840$7d02280a@.phx.gbl...
can[QUOTE]
SQL[QUOTE]
>
>.
>
|||What version of windows are you running? You could try sql 2000 desktop
edition or developer edition. You can find more info on
www.microsoft.com/sql
Carlos E. Rojas
SQL Server MVP
Co-Author SQL Server 2000 programming by Example
<anonymous@.discussions.microsoft.com> wrote in message
news:490501c3e42a$7e056cf0$a501280a@.phx.gbl...[QUOTE]
> Thanks for that.
> I have run a local instance of SQL server on a stand alone
> machine in the past, SQL 7 was also installed though.
> I need to be able to use SQL server offline at home on my
> laptop. Any suggestions?
> No SQL services apparently running locally.
> won't be able to
> instance. You need to
> However, if you
> sure the service is
> administrative
> message
> can
> SQL|||Windows 2000 Professional SP3, that is why I could only
install client tools. Desktop edition still cannot find a
local instance to install from.
SQL server 7 would allow a local instance even when not
installed on a server. There must be a way to run an
offline/stand alone version of SQL Server 2000?
quote:

>--Original Message--
>What version of windows are you running? You could try

sql 2000 desktop
quote:

>edition or developer edition. You can find more info on
>www.microsoft.com/sql
>--
>Carlos E. Rojas
>SQL Server MVP
>Co-Author SQL Server 2000 programming by Example
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:490501c3e42a$7e056cf0$a501280a@.phx.gbl...
alone[QUOTE]
my[QUOTE]
you[QUOTE]
locally.[QUOTE]
in[QUOTE]
I[QUOTE]
remote[QUOTE]
access[QUOTE]
>
>.
>
|||MSDE (desktop edition), personal edition, or developer edition should
install on a non-server edition of Windows. If you're getting an error
installing SQL Server you can post the exact error and sqlstp.log to the
setup newsgroup. If you're installing MSDE there is a slipstreamed version
that includes SP3, otherwise install the RTM version then immediately apply
SP3. Then apply the latest security rollup for SQL Server.
122352 INF: Supported Windows Versions for SQL Server
http://support.microsoft.com/?id=122352
SQL Server 2000 Evaluation Edition and Developer Edition can run on the
following operating systems:
Operating systems listed above for Enterprise and Standard Editions
Windows XP Professional
Windows XP Home Edition
Windows 2000 Professional
Windows NT Workstation 4.0 with SP5 or later
SQL Server 2000 Personal Edition and SQL Server 2000 Desktop Engine (MSDE)
can run on the following operating systems:
Operating systems listed above for Enterprise, Standard, Evaluation, and
Developer Editions
Windows Server 2003, Web Edition1 (MSDE only)
Windows 98
Windows Millennium Edition (Windows Me)
Cindy Gross, MCDBA, MCSE
http://cindygross.tripod.com
This posting is provided "AS IS" with no warranties, and confers no rights.

Sunday, March 25, 2012

Cannot Reference Database.Tables Collection By TableName --?

I have been using SMO for a while with no issues... But I just installed the AdventureWorks sample (AdventureWorksDBCI), and when I try to reference a table by name I get a null value:

Code Snippet


db.Tables[7] //this works fine; I can access table props/methods


db.Tables["EmployeePayHistory"] //returns a null

a null value is returned. (not just tables ,but just about any SMO collection).This same syntax works great with many other databases.

This returns true, however:

Code Snippet

db.Tables[7].Name == "EmployeePayHistory" // returns true

So is there some kind of character encoding or something that I need to use when referencing one of these collection items by name?

Try with a schema also :

like this db.Tables["<schema>.EmployeePayHistory"]

that is : db.Tables["dbo.EmployeePayHistory"]

Check the schema name of EmployeePayHistory.

Thanks

Naras.

|||

Yes indeed, the schema was the issue.

I could not access the item in the collection using schema.tablename, but rather using this syntax:

Code Snippet

db.Tables["EmployeePayHistory","HumanResources"]

Thank you for your help!

Cannot preview/deploy error

When I try to preview a report developed an on XP Pro box with Reporting
Services evaluation installed (Visual Studio 2003), I get a blank screen with
no preview. My SQL statement appears to be fine, because I get no errors
when I execute it on the Data tab, and see the data that should be reported
on.
When I try to deploy the report from within Visual Studio, I get an error
message telling me that "The type initializer for
'Microsoft.ReportingServices.Diagnostics.CatalogItemUrlBuilder' threw an
exception", and nothing gets deployed. Is there any way to get details on
this exception thrown, or a known way to prevent this?
If I upload the .rdl file into the http://localhost/Reports report manager
site manually, the report generates and displays without any kind of errors.Several people have reported this error, but we have never identified the
source. Can you try debugging the Report Designer process? (Attach another
instance of Visual Studio as a debugger, enable catching exceptions and view
the call stack.) Send me a dump of the call stack.
Thanks,
--
Albert Yen
SQL Server Reporting Services
This posting is provided "AS IS" with no warranties, and confers no rights.
"B Shaffer" <B Shaffer@.discussions.microsoft.com> wrote in message
news:E6ED9D3F-10A7-49B5-AFD9-D2411E702815@.microsoft.com...
> When I try to preview a report developed an on XP Pro box with Reporting
> Services evaluation installed (Visual Studio 2003), I get a blank screen
> with
> no preview. My SQL statement appears to be fine, because I get no errors
> when I execute it on the Data tab, and see the data that should be
> reported
> on.
> When I try to deploy the report from within Visual Studio, I get an error
> message telling me that "The type initializer for
> 'Microsoft.ReportingServices.Diagnostics.CatalogItemUrlBuilder' threw an
> exception", and nothing gets deployed. Is there any way to get details on
> this exception thrown, or a known way to prevent this?
> If I upload the .rdl file into the http://localhost/Reports report manager
> site manually, the report generates and displays without any kind of
> errors.|||This problem was bizarre - after restarting my PC the following day, the
problems with deploying the reports and previewing reports went away. I've
been able to deploy and preview without any difficulty since.
"Albert Yen [MSFT]" wrote:
> Several people have reported this error, but we have never identified the
> source. Can you try debugging the Report Designer process? (Attach another
> instance of Visual Studio as a debugger, enable catching exceptions and view
> the call stack.) Send me a dump of the call stack.
> Thanks,
> --
> Albert Yen
> SQL Server Reporting Services
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "B Shaffer" <B Shaffer@.discussions.microsoft.com> wrote in message
> news:E6ED9D3F-10A7-49B5-AFD9-D2411E702815@.microsoft.com...
> > When I try to preview a report developed an on XP Pro box with Reporting
> > Services evaluation installed (Visual Studio 2003), I get a blank screen
> > with
> > no preview. My SQL statement appears to be fine, because I get no errors
> > when I execute it on the Data tab, and see the data that should be
> > reported
> > on.
> >
> > When I try to deploy the report from within Visual Studio, I get an error
> > message telling me that "The type initializer for
> > 'Microsoft.ReportingServices.Diagnostics.CatalogItemUrlBuilder' threw an
> > exception", and nothing gets deployed. Is there any way to get details on
> > this exception thrown, or a known way to prevent this?
> >
> > If I upload the .rdl file into the http://localhost/Reports report manager
> > site manually, the report generates and displays without any kind of
> > errors.
>
>

Thursday, March 22, 2012

Cannot open user default database. Login failed. Login failed for user 'UserName'. (Microsoft

Hi,

SQL Server 2005 installed on my computer. i was trying to make a login page with VS.2005 pro. But i got some errors on Website Administration Tool. Whatsoever, i registered a database (aspnetdb) . Then, i think i made my default database to aspnetdb. Something went wrong and i decided to delete aspnetdb and start whole procces from the begining and i did it. AAANDD WHOOOLA. I got this error:

Cannot Open User Default Database, Login Failed
Microsoft SQL Server, Error 4064

Is there anyway to change my default database to "master" again? Or simply will i uninstall all the sql server 2005?
(?f you say uninstall, answer this:: Will be any problem on VS 2005? I can't uninstall both :) )

You should determine what is the login you are connecting at, then login as administrator and issue an ALTER LOGIN statement to set the default database for that login to master. See Books Online for additional information on using the ALTER LOGIN statement.

Thanks
Laurentiu|||I don't think that Laurentiu understands the problem. I have run into the same situation, I am an administrator on the server, because the default database no longer exists (I had changed it from master) I can no longer connect. I would like to think that in the absence of my default database, it would revert to the master, but this is not the case. I'm unable to connect using the Administrator login to execute the ALTER LOGIN command.|||

You can resolve this by specifying another database you want to connect to; master, for example. Then you can reset the login's default database. With sqlcmd, you can do the following:

sqlcmd -d master -U sa -P mypassword

and then:

alter login sa with default_database = master

Thanks
Laurentiu

|||I've googled this error message and I get a hundred hits. Shouldn't there be a KB? I have exactly the same problem. I changed the default DB, then dropped it. I have no idea what the sa password is. Do I need to uninstall/reinstall SS05?|||

I already posted an answer above. You just need to specify a different database to use at connection time, then change your default database to an existing one.

I'll check to see if we have a KB article on this and pass your feedback to write one if we don't already have it.

Thanks
Laurentiu

|||

I see now that you mentioned that you don't know sa's password.

sa was just provided as an example, for this operation you don't necessarily need to use sa to connect. You just need to connect with the login for which you've received this error. If you use Windows authentication, then you should connect like this:

sqlcmd -E -d master

then issue the ALTER LOGIN statement.

It's the "-d master" that's the key here - it specifies that the connection should be made to the master database, so the login won't try to connect to the database that no longer exists.

Hope this makes the solution clearer. If you still have problems with resetting the default database, let us know.

Thanks
Laurentiu

|||To me this seems like a bug with Sql Server Management Studio, as you can connect to the database by specifing the database under options. You cannot however change the user's default database as right click -> properties tries to make a new connection using the default database. As far as I can see, it should create the new connection with the same database specified in the options section?|||

You should post to SQL Server Tools General, for Management Studio issues. You can also search for existing bugs on this issue or open a new one at: http://lab.msdn.microsoft.com/productfeedback/.

Thanks
Laurentiu

|||

I got the same error with SQL Server Management Studio and could not resolve it with sa authentication because my config wouldn't let me log in as sa.

Selecting master as the connect database in the login dialog got me in. I then tried to edit my login object to change my default database, but this fails with the same error!

I then tried deleting my login. Failed again with error 4064.

Finally, I tried to right-click on the login object, and selected Script Login As > DROP to > New Query Editor Window, and then hit Execute in the view that appeared. It worked!

Hope this helps someone out there...

|||

I just ran into the same issue after I dropped a database that was mistakenly set to be the default database. I found the information posted here pointed me in the right direction, but it didn't really help much because I couldn't figure out which user should be modified when SQL Server 2005 is configured to use Windows authentication (e.g. trusted connections) exclusively. After a lot of digging through SQL Server Books Online, executing various stored procedures to dump login information, and experimentation, I finally stumbled on the right combination.

C:\> sqlcmd -E -d master

1> ALTER LOGIN [BUILTIN\Administrators] WITH DEFAULT_DATABASE=master

2> GO

I show the prompts above so you can see where to type the commands and the expected results (e.g. SQLCMD does not output any information or error messages).

|||

I detached a database on a network server with the idea of reattaching an updated version from my local db.

Evidently, the database I detached was the default database. I couldn't log in now because of the posts in this thread. I was able to log in using the Master db at the login dialog. However, I've tried everything in this post, and nothing seems to work!

When I try to execute a query against the master db (such as the sql in these posts), it executes fine. In the drop down list of available databases, the only thing it has is master... the rest says "server is not available". I'm able to ping it just fine.

I can't even restore the db I detached, because I get the same error msgs as not being able to log on. I desperately need to attach this database again with master as the default db.

How can I accomplish this? Can someone please help?

|||

The only thing I can do with logging in as master, is simply just to look at objects. I cannot perform any action at all against anything because of the same error message (Cannot open user default database. Login failed for user sa...).

How can I resolve this!!!!

Microsoft, please help..........

|||For what it's worth, the db icazon next to the server is simply a white circle (no activity, etc)....|||

I tried what you're mentioning Chris and it didn't work.

In the query window I have the following:

IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'sa')

DROP LOGIN [sa]

The results state the following:

Msg 15405, Level 16, State 1, Line 3

Cannot use the special principal 'sa'.

Cannot open user default database. Login failed. Login failed for user 'UserName'. (Microsoft

Hi,

SQL Server 2005 installed on my computer. i was trying to make a login page with VS.2005 pro. But i got some errors on Website Administration Tool. Whatsoever, i registered a database (aspnetdb) . Then, i think i made my default database to aspnetdb. Something went wrong and i decided to delete aspnetdb and start whole procces from the begining and i did it. AAANDD WHOOOLA. I got this error:

Cannot Open User Default Database, Login Failed
Microsoft SQL Server, Error 4064

Is there anyway to change my default database to "master" again? Or simply will i uninstall all the sql server 2005?
(?f you say uninstall, answer this:: Will be any problem on VS 2005? I can't uninstall both :) )

You should determine what is the login you are connecting at, then login as administrator and issue an ALTER LOGIN statement to set the default database for that login to master. See Books Online for additional information on using the ALTER LOGIN statement.

Thanks
Laurentiu|||I don't think that Laurentiu understands the problem. I have run into the same situation, I am an administrator on the server, because the default database no longer exists (I had changed it from master) I can no longer connect. I would like to think that in the absence of my default database, it would revert to the master, but this is not the case. I'm unable to connect using the Administrator login to execute the ALTER LOGIN command.|||

You can resolve this by specifying another database you want to connect to; master, for example. Then you can reset the login's default database. With sqlcmd, you can do the following:

sqlcmd -d master -U sa -P mypassword

and then:

alter login sa with default_database = master

Thanks
Laurentiu

|||I've googled this error message and I get a hundred hits. Shouldn't there be a KB? I have exactly the same problem. I changed the default DB, then dropped it. I have no idea what the sa password is. Do I need to uninstall/reinstall SS05?|||

I already posted an answer above. You just need to specify a different database to use at connection time, then change your default database to an existing one.

I'll check to see if we have a KB article on this and pass your feedback to write one if we don't already have it.

Thanks
Laurentiu

|||

I see now that you mentioned that you don't know sa's password.

sa was just provided as an example, for this operation you don't necessarily need to use sa to connect. You just need to connect with the login for which you've received this error. If you use Windows authentication, then you should connect like this:

sqlcmd -E -d master

then issue the ALTER LOGIN statement.

It's the "-d master" that's the key here - it specifies that the connection should be made to the master database, so the login won't try to connect to the database that no longer exists.

Hope this makes the solution clearer. If you still have problems with resetting the default database, let us know.

Thanks
Laurentiu

|||To me this seems like a bug with Sql Server Management Studio, as you can connect to the database by specifing the database under options. You cannot however change the user's default database as right click -> properties tries to make a new connection using the default database. As far as I can see, it should create the new connection with the same database specified in the options section?|||

You should post to SQL Server Tools General, for Management Studio issues. You can also search for existing bugs on this issue or open a new one at: http://lab.msdn.microsoft.com/productfeedback/.

Thanks
Laurentiu

|||

I got the same error with SQL Server Management Studio and could not resolve it with sa authentication because my config wouldn't let me log in as sa.

Selecting master as the connect database in the login dialog got me in. I then tried to edit my login object to change my default database, but this fails with the same error!

I then tried deleting my login. Failed again with error 4064.

Finally, I tried to right-click on the login object, and selected Script Login As > DROP to > New Query Editor Window, and then hit Execute in the view that appeared. It worked!

Hope this helps someone out there...

|||

I just ran into the same issue after I dropped a database that was mistakenly set to be the default database. I found the information posted here pointed me in the right direction, but it didn't really help much because I couldn't figure out which user should be modified when SQL Server 2005 is configured to use Windows authentication (e.g. trusted connections) exclusively. After a lot of digging through SQL Server Books Online, executing various stored procedures to dump login information, and experimentation, I finally stumbled on the right combination.

C:\> sqlcmd -E -d master

1> ALTER LOGIN [BUILTIN\Administrators] WITH DEFAULT_DATABASE=master

2> GO

I show the prompts above so you can see where to type the commands and the expected results (e.g. SQLCMD does not output any information or error messages).

|||

I detached a database on a network server with the idea of reattaching an updated version from my local db.

Evidently, the database I detached was the default database. I couldn't log in now because of the posts in this thread. I was able to log in using the Master db at the login dialog. However, I've tried everything in this post, and nothing seems to work!

When I try to execute a query against the master db (such as the sql in these posts), it executes fine. In the drop down list of available databases, the only thing it has is master... the rest says "server is not available". I'm able to ping it just fine.

I can't even restore the db I detached, because I get the same error msgs as not being able to log on. I desperately need to attach this database again with master as the default db.

How can I accomplish this? Can someone please help?

|||

The only thing I can do with logging in as master, is simply just to look at objects. I cannot perform any action at all against anything because of the same error message (Cannot open user default database. Login failed for user sa...).

How can I resolve this!!!!

Microsoft, please help..........

|||For what it's worth, the db icazon next to the server is simply a white circle (no activity, etc)....|||

I tried what you're mentioning Chris and it didn't work.

In the query window I have the following:

IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'sa')

DROP LOGIN [sa]

The results state the following:

Msg 15405, Level 16, State 1, Line 3

Cannot use the special principal 'sa'.

sql

Cannot open user default database. Login failed

Hi,

I have installed SQL Server 2005 Express edition and when i try to run the web site as http://127.0.0.1/SiteName/Login.aspx. I am using default SQL Provider.

Can anyoone please help me? i was struck here from last two days.

System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.

Login failed for user 'XXXXXX\ASPNET'.

Regards,

Pradeep.

hi Pradeep,

please verify the default database for \ASPNET login is available on the target server...

regards

|||See the Security matrix form here:

http://msdn2.microsoft.com/en-us/library/aa302377.aspx

You either can create the ASPNET user on the server, create another one and specify it within the web.config file, or specify in the web.config file, that you want to use impersonation. (Depending on your needs)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de
|||

Hi

Thank U verymuch for the reply. I have created the ASPNET User using Microsoft SQL Server Management Studio Express but the result is same.

How can i see the default database for ASPNET user....

Regards,

Pradeep.

|||

Hi

Thank U for the reply. I have created ASPNET user in the database using Microsoft SQL server Management Studio Express and in web config file i have added

<identity impersonate="true"/>

<authentication mode="Forms" />

but still the reult is same as

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 user default database. Login failed.
Login failed for user 'MIS-2\ASPNET'.

Hope this might be bug in SQL Server in SQL Server 2005 Express edition.

Regards,

Pradeep

|||

Hi,

ok we are getting closer. The error is related to the fact that you want to redirect to a database where is not granted any access to. Automatic redirection of Users is done in either of the two ways. You have a connection string where no "Inital Catalog"
keyword is specified, then the user will be redirected to his default database which every user has. If you want to change that, you can use the GUI and set the default database to another one where he is granted access to. (You can also use the sp_defaultdb procedure if you prefer the non-Gui version). if you mentioned the "Initial Catalog" in the catalog you will have to make sure that the connecting user (in your case the
ASPNET user) has access to the database mentioned in as the keyword value.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de|||

Hi,

I am using the default sql provider model.

one more thing is i am having sql server 2000 in (mixed mode authentcation) and sql server 2005 express edition(in windows authentication), is there any problem related to this.

in sql server 2000 i have given the ASPNET user defult database as master and in sql server 2005 i did the same.

so, does these settings has any impact on the default provider model in ASP.NET 2.0?

Regards,

Pradeep

|||

Hi Pradeep,

The error generally comes when the user tried to connect Database for which he don't have access permission so you may use sp_grantdbaccess to grant db access permission and refer below KBs for more

http://support.microsoft.com/kb/321698/en-us

http://support.microsoft.com/kb/316989/en-us

http://support.microsoft.com/kb/824308/en-us

http://support.microsoft.com/kb/821498/en-us

http://support.microsoft.com/kb/308157/en-us

http://support.microsoft.com/kb/301240/en-us

Hemantgiri S. Goswami

|||

An answer provided by monishjain from ASP.net forum

Steps (Windows XP):

Go to Control Panel -> Administrative Tools -> Computer Management -> Local Users and Groups -> Users -> ASPNET

Right Click on ASPNET and select Properties

Go to Member Of tab.

Click on Add -> Advanced -> Find Now

Select SQLServer2005MSSQLUser$<machinename>$SQLExpress

Click on Ok -> Ok - >Apply

Close all the windows and reboot your machine. It should work now.

Cannot open user default database. Login failed

Hi,

I have installed SQL Server 2005 Express edition and when i try to run the web site as http://127.0.0.1/SiteName/Login.aspx. I am using default SQL Provider.

Can anyoone please help me? i was struck here from last two days.

System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.

Login failed for user 'XXXXXX\ASPNET'.

Regards,

Pradeep.

hi Pradeep,

please verify the default database for \ASPNET login is available on the target server...

regards

|||See the Security matrix form here:

http://msdn2.microsoft.com/en-us/library/aa302377.aspx

You either can create the ASPNET user on the server, create another one and specify it within the web.config file, or specify in the web.config file, that you want to use impersonation. (Depending on your needs)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi

Thank U verymuch for the reply. I have created the ASPNET User using Microsoft SQL Server Management Studio Express but the result is same.

How can i see the default database for ASPNET user....

Regards,

Pradeep.

|||

Hi

Thank U for the reply. I have created ASPNET user in the database using Microsoft SQL server Management Studio Express and in web config file i have added

<identity impersonate="true"/>

<authentication mode="Forms" />

but still the reult is same as

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 user default database. Login failed.
Login failed for user 'MIS-2\ASPNET'.

Hope this might be bug in SQL Server in SQL Server 2005 Express edition.

Regards,

Pradeep

|||

Hi,

ok we are getting closer. The error is related to the fact that you want to redirect to a database where is not granted any access to. Automatic redirection of Users is done in either of the two ways. You have a connection string where no "Inital Catalog"
keyword is specified, then the user will be redirected to his default database which every user has. If you want to change that, you can use the GUI and set the default database to another one where he is granted access to. (You can also use the sp_defaultdb procedure if you prefer the non-Gui version). if you mentioned the "Initial Catalog" in the catalog you will have to make sure that the connecting user (in your case the
ASPNET user) has access to the database mentioned in as the keyword value.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi,

I am using the default sql provider model.

one more thing is i am having sql server 2000 in (mixed mode authentcation) and sql server 2005 express edition(in windows authentication), is there any problem related to this.

in sql server 2000 i have given the ASPNET user defult database as master and in sql server 2005 i did the same.

so, does these settings has any impact on the default provider model in ASP.NET 2.0?

Regards,

Pradeep

|||

Hi Pradeep,

The error generally comes when the user tried to connect Database for which he don't have access permission so you may use sp_grantdbaccess to grant db access permission and refer below KBs for more

http://support.microsoft.com/kb/321698/en-us

http://support.microsoft.com/kb/316989/en-us

http://support.microsoft.com/kb/824308/en-us

http://support.microsoft.com/kb/821498/en-us

http://support.microsoft.com/kb/308157/en-us

http://support.microsoft.com/kb/301240/en-us

Hemantgiri S. Goswami

|||

An answer provided by monishjain from ASP.net forum

Steps (Windows XP):

Go to Control Panel -> Administrative Tools -> Computer Management -> Local Users and Groups -> Users -> ASPNET

Right Click on ASPNET and select Properties

Go to Member Of tab.

Click on Add -> Advanced -> Find Now

Select SQLServer2005MSSQLUser$<machinename>$SQLExpress

Click on Ok -> Ok - >Apply

Close all the windows and reboot your machine. It should work now.

Cannot open user default database. Login failed

Hi,

I have installed SQL Server 2005 Express edition and when i try to run the web site as http://127.0.0.1/SiteName/Login.aspx. I am using default SQL Provider.

Can anyoone please help me? i was struck here from last two days.

System.Data.SqlClient.SqlException: Cannot open user default database. Login failed.

Login failed for user 'XXXXXX\ASPNET'.

Regards,

Pradeep.

hi Pradeep,

please verify the default database for \ASPNET login is available on the target server...

regards

|||See the Security matrix form here:

http://msdn2.microsoft.com/en-us/library/aa302377.aspx

You either can create the ASPNET user on the server, create another one and specify it within the web.config file, or specify in the web.config file, that you want to use impersonation. (Depending on your needs)

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de|||

Hi

Thank U verymuch for the reply. I have created the ASPNET User using Microsoft SQL Server Management Studio Express but the result is same.

How can i see the default database for ASPNET user....

Regards,

Pradeep.

|||

Hi

Thank U for the reply. I have created ASPNET user in the database using Microsoft SQL server Management Studio Express and in web config file i have added

<identity impersonate="true"/>

<authentication mode="Forms" />

but still the reult is same as

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 user default database. Login failed.
Login failed for user 'MIS-2\ASPNET'.

Hope this might be bug in SQL Server in SQL Server 2005 Express edition.

Regards,

Pradeep

|||

Hi,

ok we are getting closer. The error is related to the fact that you want to redirect to a database where is not granted any access to. Automatic redirection of Users is done in either of the two ways. You have a connection string where no "Inital Catalog"
keyword is specified, then the user will be redirected to his default database which every user has. If you want to change that, you can use the GUI and set the default database to another one where he is granted access to. (You can also use the sp_defaultdb procedure if you prefer the non-Gui version). if you mentioned the "Initial Catalog" in the catalog you will have to make sure that the connecting user (in your case the
ASPNET user) has access to the database mentioned in as the keyword value.

HTH, Jens K. Suessmeyer.


http://www.sqlserver2005.de

|||

Hi,

I am using the default sql provider model.

one more thing is i am having sql server 2000 in (mixed mode authentcation) and sql server 2005 express edition(in windows authentication), is there any problem related to this.

in sql server 2000 i have given the ASPNET user defult database as master and in sql server 2005 i did the same.

so, does these settings has any impact on the default provider model in ASP.NET 2.0?

Regards,

Pradeep

|||

Hi Pradeep,

The error generally comes when the user tried to connect Database for which he don't have access permission so you may use sp_grantdbaccess to grant db access permission and refer below KBs for more

http://support.microsoft.com/kb/321698/en-us

http://support.microsoft.com/kb/316989/en-us

http://support.microsoft.com/kb/824308/en-us

http://support.microsoft.com/kb/821498/en-us

http://support.microsoft.com/kb/308157/en-us

http://support.microsoft.com/kb/301240/en-us

Hemantgiri S. Goswami

|||

An answer provided by monishjain from ASP.net forum

Steps (Windows XP):

Go to Control Panel -> Administrative Tools -> Computer Management -> Local Users and Groups -> Users -> ASPNET

Right Click on ASPNET and select Properties

Go to Member Of tab.

Click on Add -> Advanced -> Find Now

Select SQLServer2005MSSQLUser$<machinename>$SQLExpress

Click on Ok -> Ok - >Apply

Close all the windows and reboot your machine. It should work now.

Cannot Open User Default Database (error 4064)

Hi,

SQL Server 2005 installed on my computer. i was trying to make a login page with VS.2005 pro. But i got some errors on Website Administration Tool. Whatsoever, i registered a database (aspnetdb) . Then, i think i made my default database to aspnetdb. Something went wrong and i decided to delete aspnetdb and start whole procces from the begining and i did it. AAANDD WHOOOLA. I got this error:

Cannot Open User Default Database, Login Failed
Microsoft SQL Server, Error 4064

Is there anyway to change my default database to "master" again? Or simply will i uninstall all the sql server 2005?
(?f you say uninstall, answer this:: Will be any problem on VS 2005? I can't uninstall both :) )

You should determine what is the login you are connecting at, then login as administrator and issue an ALTER LOGIN statement to set the default database for that login to master. See Books Online for additional information on using the ALTER LOGIN statement.

Thanks
Laurentiu|||I don't think that Laurentiu understands the problem. I have run into the same situation, I am an administrator on the server, because the default database no longer exists (I had changed it from master) I can no longer connect. I would like to think that in the absence of my default database, it would revert to the master, but this is not the case. I'm unable to connect using the Administrator login to execute the ALTER LOGIN command.|||

You can resolve this by specifying another database you want to connect to; master, for example. Then you can reset the login's default database. With sqlcmd, you can do the following:

sqlcmd -d master -U sa -P mypassword

and then:

alter login sa with default_database = master

Thanks
Laurentiu

|||I've googled this error message and I get a hundred hits. Shouldn't there be a KB? I have exactly the same problem. I changed the default DB, then dropped it. I have no idea what the sa password is. Do I need to uninstall/reinstall SS05?|||

I already posted an answer above. You just need to specify a different database to use at connection time, then change your default database to an existing one.

I'll check to see if we have a KB article on this and pass your feedback to write one if we don't already have it.

Thanks
Laurentiu

|||

I see now that you mentioned that you don't know sa's password.

sa was just provided as an example, for this operation you don't necessarily need to use sa to connect. You just need to connect with the login for which you've received this error. If you use Windows authentication, then you should connect like this:

sqlcmd -E -d master

then issue the ALTER LOGIN statement.

It's the "-d master" that's the key here - it specifies that the connection should be made to the master database, so the login won't try to connect to the database that no longer exists.

Hope this makes the solution clearer. If you still have problems with resetting the default database, let us know.

Thanks
Laurentiu

|||To me this seems like a bug with Sql Server Management Studio, as you can connect to the database by specifing the database under options. You cannot however change the user's default database as right click -> properties tries to make a new connection using the default database. As far as I can see, it should create the new connection with the same database specified in the options section?|||

You should post to SQL Server Tools General, for Management Studio issues. You can also search for existing bugs on this issue or open a new one at: http://lab.msdn.microsoft.com/productfeedback/.

Thanks
Laurentiu

|||

I got the same error with SQL Server Management Studio and could not resolve it with sa authentication because my config wouldn't let me log in as sa.

Selecting master as the connect database in the login dialog got me in. I then tried to edit my login object to change my default database, but this fails with the same error!

I then tried deleting my login. Failed again with error 4064.

Finally, I tried to right-click on the login object, and selected Script Login As > DROP to > New Query Editor Window, and then hit Execute in the view that appeared. It worked!

Hope this helps someone out there...

|||

I just ran into the same issue after I dropped a database that was mistakenly set to be the default database. I found the information posted here pointed me in the right direction, but it didn't really help much because I couldn't figure out which user should be modified when SQL Server 2005 is configured to use Windows authentication (e.g. trusted connections) exclusively. After a lot of digging through SQL Server Books Online, executing various stored procedures to dump login information, and experimentation, I finally stumbled on the right combination.

C:\> sqlcmd -E -d master

1> ALTER LOGIN [BUILTIN\Administrators] WITH DEFAULT_DATABASE=master

2> GO

I show the prompts above so you can see where to type the commands and the expected results (e.g. SQLCMD does not output any information or error messages).

|||

I detached a database on a network server with the idea of reattaching an updated version from my local db.

Evidently, the database I detached was the default database. I couldn't log in now because of the posts in this thread. I was able to log in using the Master db at the login dialog. However, I've tried everything in this post, and nothing seems to work!

When I try to execute a query against the master db (such as the sql in these posts), it executes fine. In the drop down list of available databases, the only thing it has is master... the rest says "server is not available". I'm able to ping it just fine.

I can't even restore the db I detached, because I get the same error msgs as not being able to log on. I desperately need to attach this database again with master as the default db.

How can I accomplish this? Can someone please help?

|||

The only thing I can do with logging in as master, is simply just to look at objects. I cannot perform any action at all against anything because of the same error message (Cannot open user default database. Login failed for user sa...).

How can I resolve this!!!!

Microsoft, please help..........

|||For what it's worth, the db icazon next to the server is simply a white circle (no activity, etc)....|||

I tried what you're mentioning Chris and it didn't work.

In the query window I have the following:

IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'sa')

DROP LOGIN [sa]

The results state the following:

Msg 15405, Level 16, State 1, Line 3

Cannot use the special principal 'sa'.

Cannot Open User Default Database (error 4064)

Hi,

SQL Server 2005 installed on my computer. i was trying to make a login page with VS.2005 pro. But i got some errors on Website Administration Tool. Whatsoever, i registered a database (aspnetdb) . Then, i think i made my default database to aspnetdb. Something went wrong and i decided to delete aspnetdb and start whole procces from the begining and i did it. AAANDD WHOOOLA. I got this error:

Cannot Open User Default Database, Login Failed
Microsoft SQL Server, Error 4064

Is there anyway to change my default database to "master" again? Or simply will i uninstall all the sql server 2005?
(?f you say uninstall, answer this:: Will be any problem on VS 2005? I can't uninstall both :) )

You should determine what is the login you are connecting at, then login as administrator and issue an ALTER LOGIN statement to set the default database for that login to master. See Books Online for additional information on using the ALTER LOGIN statement.

Thanks
Laurentiu|||I don't think that Laurentiu understands the problem. I have run into the same situation, I am an administrator on the server, because the default database no longer exists (I had changed it from master) I can no longer connect. I would like to think that in the absence of my default database, it would revert to the master, but this is not the case. I'm unable to connect using the Administrator login to execute the ALTER LOGIN command.|||

You can resolve this by specifying another database you want to connect to; master, for example. Then you can reset the login's default database. With sqlcmd, you can do the following:

sqlcmd -d master -U sa -P mypassword

and then:

alter login sa with default_database = master

Thanks
Laurentiu

|||I've googled this error message and I get a hundred hits. Shouldn't there be a KB? I have exactly the same problem. I changed the default DB, then dropped it. I have no idea what the sa password is. Do I need to uninstall/reinstall SS05?|||

I already posted an answer above. You just need to specify a different database to use at connection time, then change your default database to an existing one.

I'll check to see if we have a KB article on this and pass your feedback to write one if we don't already have it.

Thanks
Laurentiu

|||

I see now that you mentioned that you don't know sa's password.

sa was just provided as an example, for this operation you don't necessarily need to use sa to connect. You just need to connect with the login for which you've received this error. If you use Windows authentication, then you should connect like this:

sqlcmd -E -d master

then issue the ALTER LOGIN statement.

It's the "-d master" that's the key here - it specifies that the connection should be made to the master database, so the login won't try to connect to the database that no longer exists.

Hope this makes the solution clearer. If you still have problems with resetting the default database, let us know.

Thanks
Laurentiu

|||To me this seems like a bug with Sql Server Management Studio, as you can connect to the database by specifing the database under options. You cannot however change the user's default database as right click -> properties tries to make a new connection using the default database. As far as I can see, it should create the new connection with the same database specified in the options section?|||

You should post to SQL Server Tools General, for Management Studio issues. You can also search for existing bugs on this issue or open a new one at: http://lab.msdn.microsoft.com/productfeedback/.

Thanks
Laurentiu

|||

I got the same error with SQL Server Management Studio and could not resolve it with sa authentication because my config wouldn't let me log in as sa.

Selecting master as the connect database in the login dialog got me in. I then tried to edit my login object to change my default database, but this fails with the same error!

I then tried deleting my login. Failed again with error 4064.

Finally, I tried to right-click on the login object, and selected Script Login As > DROP to > New Query Editor Window, and then hit Execute in the view that appeared. It worked!

Hope this helps someone out there...

|||

I just ran into the same issue after I dropped a database that was mistakenly set to be the default database. I found the information posted here pointed me in the right direction, but it didn't really help much because I couldn't figure out which user should be modified when SQL Server 2005 is configured to use Windows authentication (e.g. trusted connections) exclusively. After a lot of digging through SQL Server Books Online, executing various stored procedures to dump login information, and experimentation, I finally stumbled on the right combination.

C:\> sqlcmd -E -d master

1> ALTER LOGIN [BUILTIN\Administrators] WITH DEFAULT_DATABASE=master

2> GO

I show the prompts above so you can see where to type the commands and the expected results (e.g. SQLCMD does not output any information or error messages).

|||

I detached a database on a network server with the idea of reattaching an updated version from my local db.

Evidently, the database I detached was the default database. I couldn't log in now because of the posts in this thread. I was able to log in using the Master db at the login dialog. However, I've tried everything in this post, and nothing seems to work!

When I try to execute a query against the master db (such as the sql in these posts), it executes fine. In the drop down list of available databases, the only thing it has is master... the rest says "server is not available". I'm able to ping it just fine.

I can't even restore the db I detached, because I get the same error msgs as not being able to log on. I desperately need to attach this database again with master as the default db.

How can I accomplish this? Can someone please help?

|||

The only thing I can do with logging in as master, is simply just to look at objects. I cannot perform any action at all against anything because of the same error message (Cannot open user default database. Login failed for user sa...).

How can I resolve this!!!!

Microsoft, please help..........

|||For what it's worth, the db icazon next to the server is simply a white circle (no activity, etc)....|||

I tried what you're mentioning Chris and it didn't work.

In the query window I have the following:

IF EXISTS (SELECT * FROM sys.server_principals WHERE name = N'sa')

DROP LOGIN [sa]

The results state the following:

Msg 15405, Level 16, State 1, Line 3

Cannot use the special principal 'sa'.