Showing posts with label computer. Show all posts
Showing posts with label computer. Show all posts

Monday, March 19, 2012

connection issue with enterprise manager but works with management studio

Hi,

I have an interesting scenario.

I have a SQL Server 2000 Standard Edition instance running on Computer A. I'm trying to access it through computers B and C.

Computer B has Sql Server 2005 Express Edition installed and I was able to use its Management Studio and
connect to instance on Computer A.

Computer C has SQL Server 2000 Standard Edition installed. When I try to connect to the instance on Computer A,
I get connection failed message.

I checked some settings. Both TCP/IP and Named pipes are enabled on the instance in A. The TCP/IP port is set to 1433 for
both client and server.

Please give me some ideas as to how I can solve this problem.

-Thanks

What is the error message that is displayed?|||I am assuming all three are on the same network then it is a simple right click at the top of Management Studio and register the 2000 then it becomes local to you. I have registered 68 7/2000 in one box so it works . Hope this helps.|||

The error said something like

Invalid Connection.ConnetionOpen(Invalid Instance)

|||

I figured it out.

Both A and C had Sql Server 2000 instances. When you try to connect to one Sql Server 2000 instance from another, Enterprise Manager automatically sets "Dynamically determine port" option and hence the connection fails. What you can do is use the Client Network Utility in C and create a new TCP/IP alias and uncheck the "dynamically determine port" option and manually set it to 1433. Then u can use Enterprise Manager in C and select the new alias that you created and finish registering the 2000 instance from A.

Thanks for your replies.

|||

shiversticks:

I figured it out.

Both A and C had Sql Server 2000 instances. When you try to connect to one Sql Server 2000 instance from another, Enterprise Manager automatically sets "Dynamically determine port" option and hence the connection fails. What you can do is use the Client Network Utility in C and create a new TCP/IP alias and uncheck the "dynamically determine port" option and manually set it to 1433. Then u can use Enterprise Manager in C and select the new alias that you created and finish registering the 2000 instance from A.

Thanks for your replies.

(on the same network then it is a simple right click at the top of Management Studio and register the 2000 then it becomes local to you. I have registered 68 7/2000 in one box so it works )

For the reference of future readers of this thread you just right click and register the other SQL Server as I originally posted and leave your port setings alone in eigth years I have not had reason to touch port settings it is not needed. Port settings could lead to SQL injection attacks.

Connection Issue

The computer I work on has Sql Server on it. We also have a main server in
the office with sql server on it. The sql server on my computer has test
data that I do my development with but part of the data needs to be kept up
to date by copying it from the main server. This is done by the main server
connecting to my laptop and giving me the lastest data. Every so often this
stops working for an unknown reason because it can no longer connect to the
sql server on my computer. I connect from my computer to the main sql
server but not the other way around. Its like my sql server has become
invisible. The main server will connect to other remote sql servers though
and it will even connect to my computer through the network just not sql
server. What could be causing this? Why does it randomly happen and then
randomly goes away? This is very very annoying...any help that anybody
can provide would be greatly appreciated. This server is running Sql Server
2000 SP3 on Windows 2000 Server with the lastest service pack which I put on
just a week and a half ago.
Thanks,
BrandonHi
Do you get a specific error message when this occurs?
If the servers are close you may want to add network cards to each server
and create a dedicated link, or possibly a VLAN or dedicated sub-net to joi
n
the two machines. If you have any firewalls or intrusion detection in betwee
n
make sure that they are running when this occurs. Check that there is no
other process that would make the network unresponsive (such as a networked
backup)
John
"Brandon Owensby" wrote:

> The computer I work on has Sql Server on it. We also have a main server i
n
> the office with sql server on it. The sql server on my computer has test
> data that I do my development with but part of the data needs to be kept u
p
> to date by copying it from the main server. This is done by the main serv
er
> connecting to my laptop and giving me the lastest data. Every so often th
is
> stops working for an unknown reason because it can no longer connect to th
e
> sql server on my computer. I connect from my computer to the main sql
> server but not the other way around. Its like my sql server has become
> invisible. The main server will connect to other remote sql servers thoug
h
> and it will even connect to my computer through the network just not sql
> server. What could be causing this? Why does it randomly happen and then
> randomly goes away? This is very very annoying...any help that anybody
> can provide would be greatly appreciated. This server is running Sql Serv
er
> 2000 SP3 on Windows 2000 Server with the lastest service pack which I put
on
> just a week and a half ago.
>
> Thanks,
> Brandon
>
>

Connection Issue

The computer I work on has Sql Server on it. We also have a main server in
the office with sql server on it. The sql server on my computer has test
data that I do my development with but part of the data needs to be kept up
to date by copying it from the main server. This is done by the main server
connecting to my laptop and giving me the lastest data. Every so often this
stops working for an unknown reason because it can no longer connect to the
sql server on my computer. I connect from my computer to the main sql
server but not the other way around. Its like my sql server has become
invisible. The main server will connect to other remote sql servers though
and it will even connect to my computer through the network just not sql
server. What could be causing this? Why does it randomly happen and then
randomly goes away? This is very very annoying...any help that anybody
can provide would be greatly appreciated. This server is running Sql Server
2000 SP3 on Windows 2000 Server with the lastest service pack which I put on
just a week and a half ago.
Thanks,
BrandonHi
Do you get a specific error message when this occurs?
If the servers are close you may want to add network cards to each server
and create a dedicated link, or possibly a VLAN or dedicated sub-net to join
the two machines. If you have any firewalls or intrusion detection in between
make sure that they are running when this occurs. Check that there is no
other process that would make the network unresponsive (such as a networked
backup)
John
"Brandon Owensby" wrote:
> The computer I work on has Sql Server on it. We also have a main server in
> the office with sql server on it. The sql server on my computer has test
> data that I do my development with but part of the data needs to be kept up
> to date by copying it from the main server. This is done by the main server
> connecting to my laptop and giving me the lastest data. Every so often this
> stops working for an unknown reason because it can no longer connect to the
> sql server on my computer. I connect from my computer to the main sql
> server but not the other way around. Its like my sql server has become
> invisible. The main server will connect to other remote sql servers though
> and it will even connect to my computer through the network just not sql
> server. What could be causing this? Why does it randomly happen and then
> randomly goes away? This is very very annoying...any help that anybody
> can provide would be greatly appreciated. This server is running Sql Server
> 2000 SP3 on Windows 2000 Server with the lastest service pack which I put on
> just a week and a half ago.
>
> Thanks,
> Brandon
>
>

Thursday, March 8, 2012

connection failure

Hi all,
Everything is fine until today.
I have two instances(both msde databases, but I have enterprise manager and
analyser installed) on my computer one instance is mssql and the other is
mssql$netsdk (asp.net starter kit database)
somehow the connection to mssql$netsdk is failed which display in enterprise
manager.
So I removed the origianl server registration and start a new one, I type
"BETTYPC\NETSDK" as server and using windows authentication when doing the
registration, but the message display at the last step:
sql server registration failed because of connection failure displayed
below:sqldumpexceptionhandler :process 53 generated a fatal exception
c0000005 EXCEPTION_ACCESS_VIOLATION, sql server is terminating this process.
what's the problem?
Can you help and I am desperated
Betty
Hi Bettys,
Welcome to use MSDN Managed Newsgroup!
From your descriptions, I understood you are not able to connect the SQL
Server named instance NETSDK with error message EXCEPTION_ACCESS_VIOLATION.
If I have misunderstood your concern, please feel free to point it out.
AV errors could be caused by various reasons, please perform the steps
below and let me know the result
1. Check the log file of NETSDK instance, make sure whether the instance
was started correctly.
Defautly, the log will be located at C:\Program Files\Microsoft SQL
Server\MSSQL$NETSDK\log, you may paste them here or send to me directly
v-mingqc@.ONLINEmicrosoft.com if you have concerns on security. (Note that
REMOVE ONLINE in my email address before you click SEND)
2. Is it possible to connect the instance via OSQL and Query Analyzer?
3. Is it possible for you to connect via SQL Authentication?
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.
|||Hi Michael,
Thank you, this is the first post on this forum. I didn't know what went
wrong. The only thing I can do is googling. Then it came to my mind that I
can stop the mssql@.netsdk sql server then and I restarted. It just started
and stopped again somehow. And then I have to restart the computer. After
that I saw both instances have sqlservr.exe process. This time I register the
server again and it looks fine. Connection is OK.
(I didn't try to use osql and did try to use sql authentication, but when I
supplied one userID and password to this server, this password is set up to a
database on this server, it should be OK right? it didn't work either.)
If you can tell what was going on, that will be great.
Here is the paste from errorLog:
2006-02-02 13:12:54.28 server Microsoft SQL Server 2000 - 8.00.760
(Intel X86)
Dec 17 2002 14:22:05
Copyright (c) 1988-2003 Microsoft Corporation
Desktop Engine on Windows NT 5.1 (Build 2600: Service Pack 1)
2006-02-02 13:12:54.28 server Copyright (C) 1988-2002 Microsoft
Corporation.
2006-02-02 13:12:54.28 server All rights reserved.
2006-02-02 13:12:54.28 server Server Process ID is 2988.
2006-02-02 13:12:54.28 server Logging SQL Server messages in file
'C:\Program Files\Microsoft SQL Server\MSSQL$NETSDK\LOG\ERRORLOG'.
2006-02-02 13:12:54.32 server SQL Server is starting at priority class
'normal'(2 CPUs detected).
2006-02-02 13:12:54.50 server SQL Server configured for thread mode
processing.
2006-02-02 13:12:54.50 server Using dynamic lock allocation. [500] Lock
Blocks, [1000] Lock Owner Blocks.
2006-02-02 13:12:54.52 spid4 Starting up database 'master'.
2006-02-02 13:12:54.57 server Using 'SSNETLIB.DLL' version '8.0.766'.
2006-02-02 13:12:54.57 spid5 Starting up database 'model'.
2006-02-02 13:12:54.57 spid4 Server name is 'BETTYPC\NETSDK'.
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 4
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 5
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 6
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 7
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 8
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 9
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 10
2006-02-02 13:12:54.57 spid4 Skipping startup of clean database id 11
2006-02-02 13:12:54.57 spid4 Starting up database 'subway'.
2006-02-02 13:12:54.66 spid5 Clearing tempdb database.
2006-02-02 13:12:55.72 server SQL server listening on .
2006-02-02 13:12:55.72 server Error: 17826, Severity: 18, State: 1
2006-02-02 13:12:55.72 server Could not set up Net-Library 'SSNETLIB'..
2006-02-02 13:12:55.72 server Unable to load any netlibs.
2006-02-02 13:12:55.72 server SQL Server could not spawn FRunCM thread.
Here is the sqldump file
================================================== ===================
BugCheck Dump
================================================== ===================
This file is generated by Microsoft SQL Server 8.00.760
upon detection of fatal unexpected error. Please return this file,
the query or program that produced the bugcheck, the database and
the error log, and any other pertinent information with a Service Request.
Betty
"Michael Cheng [MSFT]" wrote:

> Hi Bettys,
> Welcome to use MSDN Managed Newsgroup!
> From your descriptions, I understood you are not able to connect the SQL
> Server named instance NETSDK with error message EXCEPTION_ACCESS_VIOLATION.
> If I have misunderstood your concern, please feel free to point it out.
> AV errors could be caused by various reasons, please perform the steps
> below and let me know the result
> 1. Check the log file of NETSDK instance, make sure whether the instance
> was started correctly.
> Defautly, the log will be located at C:\Program Files\Microsoft SQL
> Server\MSSQL$NETSDK\log, you may paste them here or send to me directly
>if you have concerns on security. (Note that
> REMOVE ONLINE in my email address before you click SEND)
> 2. Is it possible to connect the instance via OSQL and Query Analyzer?
> 3. Is it possible for you to connect via SQL Authentication?
>
> Sincerely yours,
> Michael Cheng
> Microsoft Online Partner Support
> ================================================== ====
> When responding to posts, please "Reply to Group" via your newsreader so
> that others may learn and benefit from your issue.
> ================================================== ===
> This posting is provided "AS IS" with no warranties, and confers no rights.
>
>
|||Hi Betty,
It seems your SQL Server is not stable. From the startup log, I believe
something internal is wrong. We may noticed "netlibs" is not loaded and
Dump file were also generated.
Although you could register SQL Server now, I would recommend you backup
all the data in this instnace and perform a reinstallation of NETSDK
instance. You may follow the link below to perform a complete uninstall
How to manually remove SQL Server 2000 default, named, or virtual instance
http://support.microsoft.com/kb/290991
If you have any questions or concerns, don't hesitate to let me know. We
are always here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Partner Support
================================================== ====
When responding to posts, please "Reply to Group" via your newsreader so
that others may learn and benefit from your issue.
================================================== ===
This posting is provided "AS IS" with no warranties, and confers no rights.

Connection fails for SQL Server 2005

I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
in getting any of the instances to start. Within Computer Management, the SQL
Server Configuration Manager reports "Cannot connect to WMI provider. You do
not have permission or the server is unreachable. etc, etc. Access is
denied.[0x80070005]".
I have been tearing my hair out all day trying to work out why I cannot get
this to start. Can anyone here give me some pointers as to what to do?
--
--
Chris JonesTry:
http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
--
-oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> in getting any of the instances to start. Within Computer Management, the
> SQL
> Server Configuration Manager reports "Cannot connect to WMI provider. You
> do
> not have permission or the server is unreachable. etc, etc. Access is
> denied.[0x80070005]".
> I have been tearing my hair out all day trying to work out why I cannot
> get
> this to start. Can anyone here give me some pointers as to what to do?
> --
> --
> Chris Jones
>|||oj
I already tried that. The response from the command was:-
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sqlmgmprovider.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines
4 - 7:
Error Number: 0x80070005, Facility: Win32
Description: Access is denied.
Compiler returned error 0x80070005
Lines 4-7 read:
Instance of __Namespace
{
Name = "Microsoft";
};
Any ideas, anyone?
--
--
Chris Jones
"oj" wrote:
> Try:
> http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
> >I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> > in getting any of the instances to start. Within Computer Management, the
> > SQL
> > Server Configuration Manager reports "Cannot connect to WMI provider. You
> > do
> > not have permission or the server is unreachable. etc, etc. Access is
> > denied.[0x80070005]".
> >
> > I have been tearing my hair out all day trying to work out why I cannot
> > get
> > this to start. Can anyone here give me some pointers as to what to do?
> > --
> > --
> > Chris Jones
> >
>
>|||This is a multi-part message in MIME format.
--=_NextPart_000_001E_01C6A381.F5475800
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
Chris,
WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> =right click on my computer to access the properties page) and make sure =that distributed com is on, plus, the access and launch permission is =set correctly for your system.
"
a.. Under Default Access Permissions click Edit Default. Make sure =SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication =credentials will be used to access the COM application all have Local =and Remote Access permissions.
a.. Under Default Access Permissions click Edit Limits. Service Pack 2 =comes with the following default values: ANONYMOUS LOGON (Local Access) =and Everyone (Local and Remote Access). Make sure these values are =listed, and then add the user whose authentication credentials will be =used to access the COM application. Allow this user to have Local and =Remote Access permissions.
a.. Under Default Launch Permissions click Edit Default. Make sure =SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication =credentials will be used to access the COM application all have Local =and Remote Launch permissions, as well as Local and Remote Activation =permissions.
a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 =comes with the following default values: MACHINE\Administrators (Local =and Remote Launch, Local and Remote Activation) and Everyone (Local =Launch and Local Activation). Make sure these values are listed, and =then add the user whose authentication credentials will be used to =access the COM application. Allow this user to have Local and Remote =Launch permissions, as well as Local and Remote Activation permissions.
"
Additional info on dcom vs winxp firewall setting can be found here:
http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.m=
spx
-- -oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message =news:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...
> oj
> > I already tried that. The response from the command was:-
> Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
> Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
> Parsing MOF file: sqlmgmprovider.mof
> MOF file has been successfully parsed
> Storing data in the repository...
> An error occurred while opening the namespace for object 1 defined on =lines > 4 - 7:
> Error Number: 0x80070005, Facility: Win32
> Description: Access is denied.
> > Compiler returned error 0x80070005
> > Lines 4-7 read:
> > Instance of __Namespace
> {
> Name =3D "Microsoft";
> };
> > Any ideas, anyone?
> -- > -- > Chris Jones
> > > > "oj" wrote:
> >> Try:
>> http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
>> >> -- >> -oj
>> >> >> >> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message =
>> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>> >I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary =difficulty
>> > in getting any of the instances to start. Within Computer =Management, the >> > SQL
>> > Server Configuration Manager reports "Cannot connect to WMI =provider. You >> > do
>> > not have permission or the server is unreachable. etc, etc. Access =is
>> > denied.[0x80070005]".
>> >
>> > I have been tearing my hair out all day trying to work out why I =cannot >> > get
>> > this to start. Can anyone here give me some pointers as to what to =do?
>> > -- >> > -- >> > Chris Jones
>> > >> >> --=_NextPart_000_001E_01C6A381.F5475800
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Chris,WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers =-> right click on my computer to access the properties page) and make sure =that distributed com is on, plus, the access and launch permission is set =correctly for your system."
Under Default Access Permissions click Edit Default. =Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application =all have Local and Remote Access permissions. Under Default Access Permissions click Edit Limits. =Service Pack 2 comes with the following default values: ANONYMOUS LOGON =(Local Access) and Everyone (Local and Remote Access). Make sure these =values are listed, and then add the user whose authentication credentials will =be used to access the COM application. Allow this user to have Local and =Remote Access permissions. Under Default Launch Permissions click Edit Default. =Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application =all have Local and Remote Launch permissions, as well as Local and =Remote Activation permissions. Under Default Launch Permissions click Edit Limits. =Service Pack 2 comes with the following default values: =MACHINE\Administrators (Local and Remote Launch, Local and Remote Activation) and =Everyone (Local Launch and Local Activation). Make sure these values are listed, =and then add the user whose authentication credentials will be used to access the =COM application. Allow this user to have Local and Remote Launch =permissions, as well as Local and Remote Activation permissions.
"
Additional info on dcom vs winxp firewall setting can be found here:
http://www.microsoft.com/technet/prodtechnol/winxppro/mainta=in/sp2netwk.mspx
-- -oj"Chris Jones" wrote in message news:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...> =oj> > I already tried that. The response from the command =was:-> Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180> =Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.> Parsing MOF =file: sqlmgmprovider.mof> MOF file has been successfully parsed> =Storing data in the repository...> An error occurred while opening the =namespace for object 1 defined on lines > 4 - 7:> Error Number: =0x80070005, Facility: Win32> Description: Access is denied.> > =Compiler returned error 0x80070005> > Lines 4-7 read:> => Instance of __Namespace> {> Name =3D ="Microsoft";> };> > Any ideas, anyone?> -- > -- > =Chris Jones> > > > "oj" wrote:> => Try:> =">http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx>= > -- > -oj> > > > "Chris Jones" =wrote in message > news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...> =>I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty> > in getting any of the instances to start. =Within Computer Management, the > > SQL> > Server Configuration Manager reports "Cannot connect to WMI provider. You => > do> > not have permission or the server is =unreachable. etc, etc. Access is> > denied.[0x80070005]".> >> > I have been tearing my hair out all day trying to =work out why I cannot > > get> > this to start. Can =anyone here give me some pointers as to what to do?> > -- => > -- > > Chris Jones> > > => >

--=_NextPart_000_001E_01C6A381.F5475800--|||Oj
Thanks for the response. Unfortunately, this was too late to prevent me
re-installing XP. The original install of XP was an upgrade from Win2k Pro
and clearly had significant issues with all sorts of things that effectively
STOPPED SQL Server (and one or two other applications) from working.
I will bear your response in mind if I get any issues with SQL Server 2k5
when I install it later.
Thanks
--
--
Chris Jones
"oj" wrote:
> Chris,
> WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> right click on my computer to access the properties page) and make sure that distributed com is on, plus, the access and launch permission is set correctly for your system.
> "
> a.. Under Default Access Permissions click Edit Default. Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application all have Local and Remote Access permissions.
> a.. Under Default Access Permissions click Edit Limits. Service Pack 2 comes with the following default values: ANONYMOUS LOGON (Local Access) and Everyone (Local and Remote Access). Make sure these values are listed, and then add the user whose authentication credentials will be used to access the COM application. Allow this user to have Local and Remote Access permissions.
> a.. Under Default Launch Permissions click Edit Default. Make sure SYSTEM, INTERACTIVE, NETWORK, and the user whose authentication credentials will be used to access the COM application all have Local and Remote Launch permissions, as well as Local and Remote Activation permissions.
> a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 comes with the following default values: MACHINE\Administrators (Local and Remote Launch, Local and Remote Activation) and Everyone (Local Launch and Local Activation). Make sure these values are listed, and then add the user whose authentication credentials will be used to access the COM application. Allow this user to have Local and Remote Launch permissions, as well as Local and Remote Activation permissions.
> "
> Additional info on dcom vs winxp firewall setting can be found here:
> http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx
>
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message news:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...
> > oj
> >
> > I already tried that. The response from the command was:-
> > Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
> > Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
> > Parsing MOF file: sqlmgmprovider.mof
> > MOF file has been successfully parsed
> > Storing data in the repository...
> > An error occurred while opening the namespace for object 1 defined on lines
> > 4 - 7:
> > Error Number: 0x80070005, Facility: Win32
> > Description: Access is denied.
> >
> > Compiler returned error 0x80070005
> >
> > Lines 4-7 read:
> >
> > Instance of __Namespace
> > {
> > Name = "Microsoft";
> > };
> >
> > Any ideas, anyone?
> > --
> > --
> > Chris Jones
> >
> >
> >
> > "oj" wrote:
> >
> >> Try:
> >> http://blogs.msdn.com/echarran/archive/2006/01/03/509061.aspx
> >>
> >> --
> >> -oj
> >>
> >>
> >>
> >> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
> >> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
> >> >I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> >> > in getting any of the instances to start. Within Computer Management, the
> >> > SQL
> >> > Server Configuration Manager reports "Cannot connect to WMI provider. You
> >> > do
> >> > not have permission or the server is unreachable. etc, etc. Access is
> >> > denied.[0x80070005]".
> >> >
> >> > I have been tearing my hair out all day trying to work out why I cannot
> >> > get
> >> > this to start. Can anyone here give me some pointers as to what to do?
> >> > --
> >> > --
> >> > Chris Jones
> >> >
> >>
> >>
> >>

Connection fails for SQL Server 2005

I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
in getting any of the instances to start. Within Computer Management, the SQ
L
Server Configuration Manager reports "Cannot connect to WMI provider. You do
not have permission or the server is unreachable. etc, etc. Access is
denied.[0x80070005]".
I have been tearing my hair out all day trying to work out why I cannot get
this to start. Can anyone here give me some pointers as to what to do?
--
--
Chris JonesTry:
http://blogs.msdn.com/echarran/arch.../03/509061.aspx
-oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>I have SQLServer2k5 on a WinXP Pro PC. I am having extraordinary difficulty
> in getting any of the instances to start. Within Computer Management, the
> SQL
> Server Configuration Manager reports "Cannot connect to WMI provider. You
> do
> not have permission or the server is unreachable. etc, etc. Access is
> denied.[0x80070005]".
> I have been tearing my hair out all day trying to work out why I cannot
> get
> this to start. Can anyone here give me some pointers as to what to do?
> --
> --
> Chris Jones
>|||oj
I already tried that. The response from the command was:-
Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
Parsing MOF file: sqlmgmprovider.mof
MOF file has been successfully parsed
Storing data in the repository...
An error occurred while opening the namespace for object 1 defined on lines
4 - 7:
Error Number: 0x80070005, Facility: Win32
Description: Access is denied.
Compiler returned error 0x80070005
Lines 4-7 read:
Instance of __Namespace
{
Name = "Microsoft";
};
Any ideas, anyone?
--
--
Chris Jones
"oj" wrote:

> Try:
> http://blogs.msdn.com/echarran/arch.../03/509061.aspx
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message
> news:01E31AE4-A7E3-4DE9-8EF9-154E2B214AC4@.microsoft.com...
>
>|||Chris,
WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> righ
t click on my computer to access the properties page) and make sure that dis
tributed com is on, plus, the access and launch permission is set correctly
for your system.
"
a.. Under Default Access Permissions click Edit Default. Make sure SYSTEM, I
NTERACTIVE, NETWORK, and the user whose authentication credentials will be u
sed to access the COM application all have Local and Remote Access permissio
ns.
a.. Under Default Access Permissions click Edit Limits. Service Pack 2 comes
with the following default values: ANONYMOUS LOGON (Local Access) and Every
one (Local and Remote Access). Make sure these values are listed, and then a
dd the user whose authentication credentials will be used to access the COM
application. Allow this user to have Local and Remote Access permissions.
a.. Under Default Launch Permissions click Edit Default. Make sure SYSTEM, I
NTERACTIVE, NETWORK, and the user whose authentication credentials will be u
sed to access the COM application all have Local and Remote Launch permissio
ns, as well as Local and Remote Activation permissions.
a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 comes
with the following default values: MACHINE\Administrators (Local and Remote
Launch, Local and Remote Activation) and Everyone (Local Launch and Local A
ctivation). Make sure these values are listed, and then add the user whose a
uthentication credentials will be used to access the COM application. Allow
this user to have Local and Remote Launch permissions, as well as Local and
Remote Activation permissions.
"
Additional info on dcom vs winxp firewall setting can be found here:
http://www.microsoft.com/technet/pr...n/sp2netwk.mspx
--
-oj
"Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message news:D8F5C485-6131-4B4
6-A637-86643F23D32F@.microsoft.com...[vbcol=seagreen]
> oj
>
> I already tried that. The response from the command was:-
> Microsoft (R) 32-bit MOF Compiler Version 5.1.2600.2180
> Copyright (c) Microsoft Corp. 1997-2001. All rights reserved.
> Parsing MOF file: sqlmgmprovider.mof
> MOF file has been successfully parsed
> Storing data in the repository...
> An error occurred while opening the namespace for object 1 defined on line
s
> 4 - 7:
> Error Number: 0x80070005, Facility: Win32
> Description: Access is denied.
>
> Compiler returned error 0x80070005
>
> Lines 4-7 read:
>
> Instance of __Namespace
> {
> Name = "Microsoft";
> };
>
> Any ideas, anyone?
> --
> --
> Chris Jones
>
>
>
> "oj" wrote:
>|||Oj
Thanks for the response. Unfortunately, this was too late to prevent me
re-installing XP. The original install of XP was an upgrade from Win2k Pro
and clearly had significant issues with all sorts of things that effectively
STOPPED SQL Server (and one or two other applications) from working.
I will bear your response in mind if I get any issues with SQL Server 2k5
when I install it later.
Thanks
--
--
Chris Jones
"oj" wrote:

> Chris,
> WMI works over dcom. Run "Dcomcnfg" (component sercies -> computers -> ri
ght click on my computer to access the properties page) and make sure that d
istributed com is on, plus, the access and launch permission is set correctl
y for your system.
> "
> a.. Under Default Access Permissions click Edit Default. Make sure SYSTEM,
INTERACTIVE, NETWORK, and the user whose authentication credentials will be
used to access the COM application all have Local and Remote Access permiss
ions.
> a.. Under Default Access Permissions click Edit Limits. Service Pack 2 comes with
the following default values: ANONYMOUS LOGON (Local Access) and Everyone (Local and
Remote Access). Make sure these values are listed, and then add the user whose auth
ent
ication credentials will be used to access the COM application. Allow this user to have Loca
l and Remote Access permissions.
> a.. Under Default Launch Permissions click Edit Default. Make sure SYSTEM, INTERAC
TIVE, NETWORK, and the user whose authentication credentials will be used to access
the COM application all have Local and Remote Launch permissions, as well as Local a
nd
Remote Activation permissions.
> a.. Under Default Launch Permissions click Edit Limits. Service Pack 2 comes with
the following default values: MACHINE\Administrators (Local and Remote Launch, Local
and Remote Activation) and Everyone (Local Launch and Local Activation). Make sure
the
se values are listed, and then add the user whose authentication credentials will be used to
access the COM application. Allow this user to have Local and Remote Launch permissions, as
well as Local and Remote Activation permissions.[vbcol=seagreen]
> "
> Additional info on dcom vs winxp firewall setting can be found here:
> [url]http://www.microsoft.com/technet/prodtechnol/winxppro/maintain/sp2netwk.mspx[/ur
l]
>
> --
> -oj
>
> "Chris Jones" <ChrisJones@.discussions.microsoft.com> wrote in message news
:D8F5C485-6131-4B46-A637-86643F23D32F@.microsoft.com...

Connection failed to local SQL server

Hello,
One day when i try to open my database om my local computer (Win 2000
server, SQL 2000 EE, sp3) i get message:
A connection could not be established to (LOCAL)
Reason: cannot open user default database. Login faied..
Please verify SQL Server is running and check your SQL Server
registration properties (by right-clicking on the (LOCAL) node) and try again.
SQL Server is running and right-clicking produces just the same message.
Can anybody say what happend and what to do.
Thanks a lot.1. check which database is default database for your login
2. default database exist on server?
3. check permissons on your default database
"olsh" wrote:
> Hello,
> One day when i try to open my database om my local computer (Win 2000
> server, SQL 2000 EE, sp3) i get message:
> A connection could not be established to (LOCAL)
> Reason: cannot open user default database. Login faied..
> Please verify SQL Server is running and check your SQL Server
> registration properties (by right-clicking on the (LOCAL) node) and try again.
> SQL Server is running and right-clicking produces just the same message.
> Can anybody say what happend and what to do.
> Thanks a lot.|||Sorry, how can i check these if i have no access to SQL Server?
"Aleksandar Grbic" wrote:
> 1. check which database is default database for your login
> 2. default database exist on server?
> 3. check permissons on your default database
>
> "olsh" wrote:
> > Hello,
> > One day when i try to open my database om my local computer (Win 2000
> > server, SQL 2000 EE, sp3) i get message:
> > A connection could not be established to (LOCAL)
> > Reason: cannot open user default database. Login faied..
> > Please verify SQL Server is running and check your SQL Server
> > registration properties (by right-clicking on the (LOCAL) node) and try again.
> >
> > SQL Server is running and right-clicking produces just the same message.
> >
> > Can anybody say what happend and what to do.
> >
> > Thanks a lot.|||use ISQL
sample
ISQL -S<server> -U<user> -P<password>
if your default database not exist on server, isql will use master database
then, check your default database
select name,dbname from syslogins where name='<yourlogin>'
go
...
and if shall
exec sp_defaultdb 'login','database'
go
"olsh" wrote:
> Sorry, how can i check these if i have no access to SQL Server?
>
> "Aleksandar Grbic" wrote:
> > 1. check which database is default database for your login
> >
> > 2. default database exist on server?
> >
> > 3. check permissons on your default database
> >
> >
> > "olsh" wrote:
> >
> > > Hello,
> > > One day when i try to open my database om my local computer (Win 2000
> > > server, SQL 2000 EE, sp3) i get message:
> > > A connection could not be established to (LOCAL)
> > > Reason: cannot open user default database. Login faied..
> > > Please verify SQL Server is running and check your SQL Server
> > > registration properties (by right-clicking on the (LOCAL) node) and try again.
> > >
> > > SQL Server is running and right-clicking produces just the same message.
> > >
> > > Can anybody say what happend and what to do.
> > >
> > > Thanks a lot.|||Thanks, everything is OK now!!
"Aleksandar Grbic" wrote:
> use ISQL
> sample
> ISQL -S<server> -U<user> -P<password>
> if your default database not exist on server, isql will use master database
> then, check your default database
> select name,dbname from syslogins where name='<yourlogin>'
> go
> ...
> and if shall
> exec sp_defaultdb 'login','database'
> go
>
> "olsh" wrote:
> > Sorry, how can i check these if i have no access to SQL Server?
> >
> >
> > "Aleksandar Grbic" wrote:
> >
> > > 1. check which database is default database for your login
> > >
> > > 2. default database exist on server?
> > >
> > > 3. check permissons on your default database
> > >
> > >
> > > "olsh" wrote:
> > >
> > > > Hello,
> > > > One day when i try to open my database om my local computer (Win 2000
> > > > server, SQL 2000 EE, sp3) i get message:
> > > > A connection could not be established to (LOCAL)
> > > > Reason: cannot open user default database. Login faied..
> > > > Please verify SQL Server is running and check your SQL Server
> > > > registration properties (by right-clicking on the (LOCAL) node) and try again.
> > > >
> > > > SQL Server is running and right-clicking produces just the same message.
> > > >
> > > > Can anybody say what happend and what to do.
> > > >
> > > > Thanks a lot.

Connection failed to local SQL server

Hello,
One day when i try to open my database om my local computer (Win 2000
server, SQL 2000 EE, sp3) i get message:
A connection could not be established to (LOCAL)
Reason: cannot open user default database. Login faied..
Please verify SQL Server is running and check your SQL Server
registration properties (by right-clicking on the (LOCAL) node) and try again.
SQL Server is running and right-clicking produces just the same message.
Can anybody say what happend and what to do.
Thanks a lot.
1. check which database is default database for your login
2. default database exist on server?
3. check permissons on your default database
"olsh" wrote:

> Hello,
> One day when i try to open my database om my local computer (Win 2000
> server, SQL 2000 EE, sp3) i get message:
> A connection could not be established to (LOCAL)
> Reason: cannot open user default database. Login faied..
> Please verify SQL Server is running and check your SQL Server
> registration properties (by right-clicking on the (LOCAL) node) and try again.
> SQL Server is running and right-clicking produces just the same message.
> Can anybody say what happend and what to do.
> Thanks a lot.
|||Sorry, how can i check these if i have no access to SQL Server?
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> 1. check which database is default database for your login
> 2. default database exist on server?
> 3. check permissons on your default database
>
> "olsh" wrote:
|||use ISQL
sample
ISQL -S<server> -U<user> -P<password>
if your default database not exist on server, isql will use master database
then, check your default database
select name,dbname from syslogins where name='<yourlogin>'
go
...
and if shall
exec sp_defaultdb 'login','database'
go
"olsh" wrote:
[vbcol=seagreen]
> Sorry, how can i check these if i have no access to SQL Server?
>
> "Aleksandar Grbic" wrote:
|||Thanks, everything is OK now!!
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> use ISQL
> sample
> ISQL -S<server> -U<user> -P<password>
> if your default database not exist on server, isql will use master database
> then, check your default database
> select name,dbname from syslogins where name='<yourlogin>'
> go
> ...
> and if shall
> exec sp_defaultdb 'login','database'
> go
>
> "olsh" wrote:

Connection failed to local SQL server

Hello,
One day when i try to open my database om my local computer (Win 2000
server, SQL 2000 EE, sp3) i get message:
A connection could not be established to (LOCAL)
Reason: cannot open user default database. Login faied..
Please verify SQL Server is running and check your SQL Server
registration properties (by right-clicking on the (LOCAL) node) and try agai
n.
SQL Server is running and right-clicking produces just the same message.
Can anybody say what happend and what to do.
Thanks a lot.1. check which database is default database for your login
2. default database exist on server?
3. check permissons on your default database
"olsh" wrote:

> Hello,
> One day when i try to open my database om my local computer (Win 2000
> server, SQL 2000 EE, sp3) i get message:
> A connection could not be established to (LOCAL)
> Reason: cannot open user default database. Login faied..
> Please verify SQL Server is running and check your SQL Server
> registration properties (by right-clicking on the (LOCAL) node) and try ag
ain.
> SQL Server is running and right-clicking produces just the same message.
> Can anybody say what happend and what to do.
> Thanks a lot.|||Sorry, how can i check these if i have no access to SQL Server?
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> 1. check which database is default database for your login
> 2. default database exist on server?
> 3. check permissons on your default database
>
> "olsh" wrote:
>|||use ISQL
sample
ISQL -S<server> -U<user> -P<password>
if your default database not exist on server, isql will use master database
then, check your default database
select name,dbname from syslogins where name='<yourlogin>'
go
...
and if shall
exec sp_defaultdb 'login','database'
go
"olsh" wrote:
[vbcol=seagreen]
> Sorry, how can i check these if i have no access to SQL Server?
>
> "Aleksandar Grbic" wrote:
>|||Thanks, everything is OK now!!
"Aleksandar Grbic" wrote:
[vbcol=seagreen]
> use ISQL
> sample
> ISQL -S<server> -U<user> -P<password>
> if your default database not exist on server, isql will use master databas
e
> then, check your default database
> select name,dbname from syslogins where name='<yourlogin>'
> go
> ...
> and if shall
> exec sp_defaultdb 'login','database'
> go
>
> "olsh" wrote:
>

connection failed

When i try to connect from remote computer to sequel
server i get the followin message
connection failed.
i'm connecting using odbc, i'm new to this so all help
thanks in advance.
HI,
Create you create a Alias name for your sql server remote machine using the
"Client Network Utility" by providing
Protocol as TCP/IP, IP address of sql server machine and port number.
After this use this Alias name to connect to sql server machine.
Thanks
Hari
MCDBA
"mike" <anonymous@.discussions.microsoft.com> wrote in message
news:a0c501c43475$557426f0$a101280a@.phx.gbl...
> When i try to connect from remote computer to sequel
> server i get the followin message
> connection failed.
> i'm connecting using odbc, i'm new to this so all help
> thanks in advance.

Wednesday, March 7, 2012

connection failed

When i try to connect from remote computer to sequel
server i get the followin message
connection failed.
i'm connecting using odbc, i'm new to this so all help
thanks in advance.HI,
Create you create a Alias name for your sql server remote machine using the
"Client Network Utility" by providing
Protocol as TCP/IP, IP address of sql server machine and port number.
After this use this Alias name to connect to sql server machine.
Thanks
Hari
MCDBA
"mike" <anonymous@.discussions.microsoft.com> wrote in message
news:a0c501c43475$557426f0$a101280a@.phx.gbl...
> When i try to connect from remote computer to sequel
> server i get the followin message
> connection failed.
> i'm connecting using odbc, i'm new to this so all help
> thanks in advance.

connection failed

When i try to connect from remote computer to sequel
server i get the followin message
connection failed.
i'm connecting using odbc, i'm new to this so all help
thanks in advance.HI,
Create you create a Alias name for your sql server remote machine using the
"Client Network Utility" by providing
Protocol as TCP/IP, IP address of sql server machine and port number.
After this use this Alias name to connect to sql server machine.
Thanks
Hari
MCDBA
"mike" <anonymous@.discussions.microsoft.com> wrote in message
news:a0c501c43475$557426f0$a101280a@.phx.gbl...
> When i try to connect from remote computer to sequel
> server i get the followin message
> connection failed.
> i'm connecting using odbc, i'm new to this so all help
> thanks in advance.

Friday, February 17, 2012

Connecting With Visual Studio .net

Hello,
I have MSDE Installed on a different computer (WIndows 2003) within my
network. I also have MSDE Installed on my production computer for
development.
I have successfully created databases on both computers using OSQL. What I
would really like to accomplish is a connection from the Server Explorer in
Visual Studio .NET.
I have a successful connection to the local instance of MSDE and I added my
server to the server list with no problems.
But, this is where the problem comes in.
Lets Say my Server is called Moon, The Servers Tree in Server Explorer
shows Moon, I can access the Event Logs, Message Queues, Performance
Counters and Services with on problem. But, when I click on SQL Servers
Moon is shown with a Red X, I click the Plus (+) sign, type in the Login and
Password, I receive the following Error:
{DBNETLIB}{ConnectionOpen (Connect().]SQL Server does not exist or access
denied.
Any Suggestions will be greatly appreciated,
Chuck
hi Chuck,
Charles A. Lackman wrote:
> Hello,
> I have MSDE Installed on a different computer (WIndows 2003) within my
> network. I also have MSDE Installed on my production computer for
> development.
> I have successfully created databases on both computers using OSQL.
> What I would really like to accomplish is a connection from the
> Server Explorer in Visual Studio .NET.
> I have a successful connection to the local instance of MSDE and I
> added my server to the server list with no problems.
> But, this is where the problem comes in.
> Lets Say my Server is called Moon, The Servers Tree in Server
> Explorer shows Moon, I can access the Event Logs, Message Queues,
> Performance Counters and Services with on problem. But, when I click
> on SQL Servers Moon is shown with a Red X, I click the Plus (+) sign,
> type in the Login and Password, I receive the following Error:
> {DBNETLIB}{ConnectionOpen (Connect().]SQL Server does not exist or
> access denied.
>
the most probable causes of this problem are listed in
http://support.microsoft.com/default...06&Product=sql
... please check with the Server Network Utility that the Moon MSDE instance
has enabled network protocols, as MSDE installs by default allowing local
connections only...
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.16.0 - DbaMgr ver 0.61.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||Read my How to (Msde related) at:
http://spaces.msn.com/members/sholliday/
12/16/2005 entry date.
The key is the
[Options]
DISABLENETWORKPROTOCOLS=0
SECURITYMODE=SQL
stuff.
Use the KB mentioned earlier, to manually make the fix.
My stuff will teach you how to avoid the issue in the future, if you
ever install MSDE again.
(Or if you get really really stuck and need to start over)
Charles A. Lackman wrote:
> Hello,
> I have MSDE Installed on a different computer (WIndows 2003) within my
> network. I also have MSDE Installed on my production computer for
> development.
> I have successfully created databases on both computers using OSQL. What I
> would really like to accomplish is a connection from the Server Explorer in
> Visual Studio .NET.
> I have a successful connection to the local instance of MSDE and I added my
> server to the server list with no problems.
> But, this is where the problem comes in.
> Lets Say my Server is called Moon, The Servers Tree in Server Explorer
> shows Moon, I can access the Event Logs, Message Queues, Performance
> Counters and Services with on problem. But, when I click on SQL Servers
> Moon is shown with a Red X, I click the Plus (+) sign, type in the Login and
> Password, I receive the following Error:
> {DBNETLIB}{ConnectionOpen (Connect().]SQL Server does not exist or access
> denied.
>
> Any Suggestions will be greatly appreciated,
> Chuck
|||Hello,
I found a way to fix the problem,
Below is what I needed to do.
Run the svrnetcn.exe on which you installed MSDE It will show you SQL Server
Network Utility Dialogbox, Make sure that TCP/IP is enabled and the port is
1433.
Chuck
"Charles A. Lackman" <Charles@.CreateItSoftware.net> wrote in message
news:O%23rnzwCGGHA.344@.TK2MSFTNGP11.phx.gbl...
Hello,
I have MSDE Installed on a different computer (WIndows 2003) within my
network. I also have MSDE Installed on my production computer for
development.
I have successfully created databases on both computers using OSQL. What I
would really like to accomplish is a connection from the Server Explorer in
Visual Studio .NET.
I have a successful connection to the local instance of MSDE and I added my
server to the server list with no problems.
But, this is where the problem comes in.
Lets Say my Server is called Moon, The Servers Tree in Server Explorer
shows Moon, I can access the Event Logs, Message Queues, Performance
Counters and Services with on problem. But, when I click on SQL Servers
Moon is shown with a Red X, I click the Plus (+) sign, type in the Login and
Password, I receive the following Error:
{DBNETLIB}{ConnectionOpen (Connect().]SQL Server does not exist or access
denied.
Any Suggestions will be greatly appreciated,
Chuck

Tuesday, February 14, 2012

Connecting to the SQLEXPRESS on your computer

How do I connect to the SQLEXPRESS installed on my computer without network connection (as a standalone computer)?

Thanks.

hi,

local connections are usually performed via shared memory, so you do not require network protocols to be enabled to connect to a local instance..

what kind of problems are you experiencing? you usually generate a connection string like those provided in http://www.connectionstrings.com/, thus something similar to

Data Source=(Local)\NamedInstanceName;Initial Catalog=the_database;Integrated Security=SSPI;

regards

|||

I was having problems connecting to my local PC even after creating a security user and using the correct connection string. Turns out that I needed to go into SQL Server Configuration Manager and enable TCP/IP Protocol. Everything was disabled by default. Start, All Programs, Microsoft SQL Server 2005, Configuaration Tools, SQL Server Configuration Manager (local), SQL Native Client Configuration, Client Protocols, Right Click TCP/IP and select properties to enable.

|||

Hi Cecook,

You were probably connecting through MDAC. This is fine and fully supported, but you do have to enable TCP/IP in order to connect with legacy providers. If you use the new SQL Native Client (SNAC) you can connect directly to SQL using Shared Memory and you don't need to enable TCP/IP for local connections. SNAC also supports ODBC and OLEDB as well.

Note: You always have to enable TCP/IP or Named Pipes to connect to SQL from a remote client.

Mike

Sunday, February 12, 2012

Connecting to SQL Server using VS 2005

Is there any way to connect to Hosting SQL Server using VS 2005.

I have only VS 2005 on my computer and Dont have SQL Server.

I have a SQL Server credentials on the Hosting server but the problem is the hosting website control panel didnt provide any enterprise manager to work on the database.

Thanks in advance.

Dear,

Load the VS 2005. Choose View -> Server Explorer and it will appear on the left side of the VS. click onServer Explorer and right click on theData Connections and chooseAdd Connection. a window will appear. in theserver name text box enter the server name then chooseUse SQL Server Authentication radio button and supplyuser name andpasswordthen enterdatabase name and click ok. your database with features will be added to server explorer. now you can enjoy designing and playing with your database.

|||

Hi,

I did exactly like how u said. I am getting this error message.

" An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL Server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server )"

|||

I wouldn't be surprised if your hosting service doesn't allow remote connections to the server for security reasons. You could download SQL express and work with that, perhaps. If you detach the db, and put it in your app_data directory, then it can be set up to automatically attach to whatever SQL server you specify in the connection string.

|||

I have done it by detaching the database and kept it in app_data folder ( db1.mdf ).

here is my connection string in web.config file. I am still getting that remote connections error ( though i dont use sql server and using app_data folder instead )

<connectionStrings>

<addname="ConnectionString"connectionString="Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\db1.mdf;Integrated Security=True;User Instance=True"

providerName="System.Data.SqlClient" />

</connectionStrings>

Could you please correct if there are any mistakes in the code.

|||

does .\SQLEXPRESS actually work? never tried it. Anyhow, I am assuming this is working when you run locally, but not when you deploy it to your hosted site? I would check with their technical support.

|||

Your connection string looks fine for a local SQL Express database. The next thing to check - is your SQL Express server actually running? You should see it as a service called SQL Server (SQLEXpress) - if it's not running, then start it.

|||

Let me make it much more clear

I DONT HAVE sql server on my computer.

I have a MDF file in App_Data folder in my project. I use the connection string which i mentioned before and it works perfectly.

I Dont want to convert that MDF file as a seperate database on SQL Server. Insted, I want it to be there in App_Data folder only.

Now, I uploaded all the files to the hosting server. When trying to access a page that is related to mdf file in App_Data folder, It throws an error which i mentioned on the TOP.

Please help me out.

|||

I'm tracking that part, but I don't understand how that can work if you don't have SQLExpress on your local machine... It is sort of a prerequisite to being able to attach a .mdf file. Anyhow, it is normally installed by default along with Visual Studio or Visual Web Developer Express.

So let me walk through this for a sec...

When you have an MDF file in App_Data, the way the connectionstring works, is it tries to attach the MDF to the SQL Server instance specified in the connectionstring. If that is successful, you are good to go.

You have .\SqlExpress as your server instance. I assume this means the named instance "SqlExpress" (default) running on localhost. This would make sense if it is working on your local machine, and you do in fact have SqlExpress installed... i.e. it should work.

If the above is accurate, and you are experiencing failures on the hosted site, it probably doesn't mean what it sounds like it means. First, it has nothing to do with "remote connections", since you are trying to connect to "localhost". It basically means there is no server instance called SqlExpress running on the hosted server. Either the server is running on a different machine and you need to find out what it is (doubtful), or the Instance name is something different, and you need to find out what it is (likely).

I wouldn't be surprised if the hosting service provides each customer with a unique named instance of the Sql database, otherwise, everyone would be connecting to the same thing.

|||

yennares:

I DONT HAVE sql server on my computer.

Actually, you do have SQL Server on your computer - specifically the Express edition. Microsoft does a great job of hiding the fact that you have a SQL Server engine running on your PC - believe me, it's there (you can see it in the services window as SQL Server (SQLEXPRESS) ).

There are very few hosting providers that allow you to run SQL Server Express on the site. It's not designed for production use. Does your hosting provider support SQL Express? Ask them. If they say no, than you have to get your remote site working with SQL Server.

|||

Give this a try...

1. Drag an SqlDataSource control on your page, Click configure data source.
2. Select New connection, Change data source to microsoft SQL Server, Data Provider as .NET Framework Data provider for SQL Server, Press OK.
3. Enter Server name (this should be your web host's MS SQL Server), you may have to ask your web host for this.
4. Check 'Use SQL Server Authentication. Enter username, password.
5. Click Test connection (if the server address and credentials are correct, it should say [Test connection succeeded].
6. Once succeeded, you can connect to your database. Press OK.
7. VS 2005 should offer to save your connection info in a connection string in your web.config file.
8. In Server Explorer (VS 2005) you can edit your database.

Hope this helps,

|||

Thanks for the suggestions.

Now, i am in the process of finding whether my hosting provider has SQL Express running.

|||

Hi valenumr,

If you detach the db, and put it in your app_data directory, then it can be set up to automatically attach towhatever SQL server you specify in the connection string.

How to set up the App_Data database to automatically attach to whatever sql server? Say, if i have only sql server 2005 installed on my machine, and i want to use the App_Data folder, so, how can i set up the database to make it automatically attached to sql 2005? (i used to explicitly attach it to sql2005). thanks.

|||

Just detach the Database in the Sql Server Manager and move the .mdf file to the App_Data folder (or right click on App_Data and select Add New Item -> SQL Database). Then, update the connection string in web.config. It should look like this (for maximum portability):

<connectionStrings> <add name="YourConnectionString" connectionString="Data Source=.\SQLEXPRESS; AttachDbFilename=|DataDirectory|YourDataBase.mdf; IntegratedSecurity=True" /></connectionStrings>

Apparently .\SQLEXPRESS means the SQL server instance named SQLEXPRESS on localhost (new to me, but it works... cool), and |DataDirectory| means the resolved App_Data path no matter what path the server is running the site from.

Anyhow, the key is the AttachDbFileName tag in the connection string. This will causes the mdf file to automatically get attached to the SQL server instance you specify with the Data Source tag.

Connecting to sql server from local computer using client tools

Hi,

I just installed SQL Server for the first time on a windows 2003 OS which is on its on server. Then, I installed the client tools on my local computer. Now how do I connect to the sql server with my client tools? What I wanted to do is from my local computer use the enterprise manager and pull up the databases that are located on the server that contains the sql server.

Thanks a bunch,
Laura ;)Right click on SQL Server Group in Enterprise Manager and select New Server Registration. If it doesn't automatically list your server you will have to type its name in.|||Oh Perfect.

Thank You So Much,
Laura

Friday, February 10, 2012

Connecting to SQL Server from ASP

Hello,

I have MS SQL Server running on a server computer. I am trying
to connect to it via ASP from a .asp file created in a virtual
directory. I am using IIS as the web server. I am connecting
from a Windows 2000 computer.

When I go to Start -> Settings -> Control Panel
-> Administrative Tools -> ODBC Data Sources

I see a data source which uses SQL Server. I click on it,
click Configure..., then Next, and notice that if I place
the password I can connect fine from the "ODBC Data Source
Administrator".

However, when i try the following from ASP I get an error:

<%

cncString = "DSN=X;" _
+ "Database=Y;" _
+ "UID=foo;" _
+ "PWD=bar"

Response.Write(cncString)

cnc.Open cncString

%
The server error I get is the following:

Error Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
/neil/Default.asp, line 30

This seems strange to me given that I can connect from the
ODBC Data Source Administrator without much trouble.

The only reason for this error which I can think of is that
the ODBC data sources may not be running on the web server
itself, but on yet a third machine, and I do not have access
to the web server itself right now, so that may be the problem.

Please let me know about any other probems which may arise
once I can get my hands on the web server itself,

Thank you so much for your suggestions and help,

Best Regards,

Neil ZanellaError Type:
Microsoft OLE DB Provider for ODBC Drivers (0x80004005)
[Microsoft][ODBC Driver Manager] Data source name not found and no
default driver specified
/neil/Default.asp, line 30

Make sure you created DSN with the name X

Madhivanan|||> <%
> cncString = "DSN=X;" _
> + "Database=Y;" _
> + "UID=foo;" _
> + "PWD=bar"

Use & to concatenate strings in ASP, not +.|||Okay, the two ways I have used to connect from plain old ASP are:

1) Save a System (not User) DSN, and then set the connection string
just as:

cncString = "DSN=SqlConnect"

(if SqlConnect is the name of the DSN)

or,

2) Construct the whole connection within the ASP (dont touch ODBC at
all) such as:

cncString = "Provider=sqloledb;Data Source=" & myServer & ";Initial
Catalog=" & myDatabase & ";"

then add on either:

cncString = cncString & "Integrated Security=SSPI;"

or

cncString = cncString & "uid=" & myUser & ";pwd=" & myPassword & ";"

depending upon whether I'm using windows authentication or sql
authentication.

----------

May as well piggy back my own query on here, since it may turn out to
be relevant to OP:

We've recently been setting up an intranet site where we wanted to ID
the users from the browser using Windows Auth and then connect to the
DB as them using Windows Auth. Is there *still* no way of achieving
this when IIS/SQL are on different boxes? Any patches we may be
missing? We've switched to doing the browser authentication using basic
digest, but that isn't ideal. Windows/SQL are both 2000 with latest
stable SPs.