Showing posts with label connection. Show all posts
Showing posts with label connection. Show all posts

Monday, March 12, 2012

Localhost Vs Servername in Connection string of SQL Server 2000

Hi,
Do you know how ADO will behave based upon the servername that is
specified in the connection string of SQL Server 2000? When does it
work with localhost and when does it not? Is it documented that this is
the expected behavior?
Thanks,
Regards,
Pramod
With SQL Server2000 or older, the server name is "Compuername" or "(local)",
(plus "\instanceName" if necessary). It is not "localhost", which is used to
refer to web server, not SQL Server (I may be wrong on this: you can use
"localhost' for SQL Server 2005, though).
<ipramod@.gmail.com> wrote in message
news:1164191517.623131.63680@.e3g2000cwe.googlegrou ps.com...
> Hi,
> Do you know how ADO will behave based upon the servername that is
> specified in the connection string of SQL Server 2000? When does it
> work with localhost and when does it not? Is it documented that this is
> the expected behavior?
> Thanks,
> Regards,
> Pramod
>
|||Hi,
Is there any difference when we use (local) or localhost in connection
strings of SQL Server 2000 ?
Thanks,
Pramod
Norman Yuan wrote:[vbcol=seagreen]
> With SQL Server2000 or older, the server name is "Compuername" or "(local)",
> (plus "\instanceName" if necessary). It is not "localhost", which is used to
> refer to web server, not SQL Server (I may be wrong on this: you can use
> "localhost' for SQL Server 2005, though).
> <ipramod@.gmail.com> wrote in message
> news:1164191517.623131.63680@.e3g2000cwe.googlegrou ps.com...

Localhost Vs Servername in Connection string of SQL Server 2000

Hi,
Do you know how ADO will behave based upon the servername that is
specified in the connection string of SQL Server 2000? When does it
work with localhost and when does it not? Is it documented that this is
the expected behavior?
Thanks,
Regards,
PramodWith SQL Server2000 or older, the server name is "Compuername" or "(local)",
(plus "\instanceName" if necessary). It is not "localhost", which is used to
refer to web server, not SQL Server (I may be wrong on this: you can use
"localhost' for SQL Server 2005, though).
<ipramod@.gmail.com> wrote in message
news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...
> Hi,
> Do you know how ADO will behave based upon the servername that is
> specified in the connection string of SQL Server 2000? When does it
> work with localhost and when does it not? Is it documented that this is
> the expected behavior?
> Thanks,
> Regards,
> Pramod
>|||Hi,
Is there any difference when we use (local) or localhost in connection
strings of SQL Server 2000 ?
Thanks,
Pramod
Norman Yuan wrote:[vbcol=seagreen]
> With SQL Server2000 or older, the server name is "Compuername" or "(local)
",
> (plus "\instanceName" if necessary). It is not "localhost", which is used
to
> refer to web server, not SQL Server (I may be wrong on this: you can use
> "localhost' for SQL Server 2005, though).
> <ipramod@.gmail.com> wrote in message
> news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...

Localhost Vs Servername in Connection string of SQL Server 2000

Hi,
Do you know how ADO will behave based upon the servername that is
specified in the connection string of SQL Server 2000? When does it
work with localhost and when does it not? Is it documented that this is
the expected behavior?
Thanks,
Regards,
PramodWith SQL Server2000 or older, the server name is "Compuername" or "(local)",
(plus "\instanceName" if necessary). It is not "localhost", which is used to
refer to web server, not SQL Server (I may be wrong on this: you can use
"localhost' for SQL Server 2005, though).
<ipramod@.gmail.com> wrote in message
news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...
> Hi,
> Do you know how ADO will behave based upon the servername that is
> specified in the connection string of SQL Server 2000? When does it
> work with localhost and when does it not? Is it documented that this is
> the expected behavior?
> Thanks,
> Regards,
> Pramod
>|||Hi,
Is there any difference when we use (local) or localhost in connection
strings of SQL Server 2000 ?
Thanks,
Pramod
Norman Yuan wrote:
> With SQL Server2000 or older, the server name is "Compuername" or "(local)",
> (plus "\instanceName" if necessary). It is not "localhost", which is used to
> refer to web server, not SQL Server (I may be wrong on this: you can use
> "localhost' for SQL Server 2005, though).
> <ipramod@.gmail.com> wrote in message
> news:1164191517.623131.63680@.e3g2000cwe.googlegroups.com...
> > Hi,
> >
> > Do you know how ADO will behave based upon the servername that is
> > specified in the connection string of SQL Server 2000? When does it
> > work with localhost and when does it not? Is it documented that this is
> > the expected behavior?
> >
> > Thanks,
> > Regards,
> > Pramod
> >

localhost question

I have always connected to my MS SQL DB's through a remote connection, like this:

<%
Dim oConn, oRS, sSQL
Set oConn = Server.CreateObject("ADODB.Connection")
oConn.Open "Driver={SQL Server};" & _
"Database=mydb;" & _
"Server=myservername;" & _
"UID=mylogin;" & _
"PWD=mypwd"
%>

Is there a way to connect to an MS SQL DB locally with VBScript... I have seen code blocks use the keywork localhost... does that have something to do with it?localhost will point to the local machine...

if you look in your hosts file you will find localhost is mapped to 127.0.0.1 which is the loopback address for the ethernet adapater...

So yeah,.. you can use the machine name specificly, the ip number for the local machine, localhost, or 127.0.0.1 as your myservername value|||Originally posted by rokslide
localhost will point to the local machine...

if you look in your hosts file you will find localhost is mapped to 127.0.0.1 which is the loopback address for the ethernet adapater...

So yeah,.. you can use the machine name specificly, the ip number for the local machine, localhost, or 127.0.0.1 as your myservername value

Ahhhh I see... but that gives me a problem... localhost only works if you are running SQL Server on your own machine. I wanted to connect to a server that I don't run, then, even if the website is located on the same network as the SQL server, I would have to connect to it remotely?|||if the website is on the same box as the database then when the vbscript to connect to the database is executed it will execute in the context of the server it resides on... so localhost would work...

if you then took the code and tried to run it on your machine it would look on your machine for the database which would fail.

does that make sense??

localhost is not mapped to server name

Hi,
It is a long time that I have been using my box and have some .NET apps
running on it which use a connection string with Server=localhost and I have
not had any problem yet. Today I have updated my box Windows with recent
HotFixes (well I am not 100% sure it is the reason of this problem) and
after that my applications can not login database, and get this exception
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied".
When I changed server name from localhost to real server name they are
working properly.
Any advice is welcomed.
Thanks
Mike(local) instead of localhost
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"masoud bayan" <masoud_bayan@.hotmail.com> wrote in message
news:ujOrVWe7EHA.3644@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> It is a long time that I have been using my box and have some .NET apps
> running on it which use a connection string with Server=localhost and I
> have
> not had any problem yet. Today I have updated my box Windows with recent
> HotFixes (well I am not 100% sure it is the reason of this problem) and
> after that my applications can not login database, and get this exception
> "System.Data.SqlClient.SqlException: SQL Server does not exist or access
> denied".
> When I changed server name from localhost to real server name they are
> working properly.
>
> Any advice is welcomed.
>
> Thanks
> Mike
>
>

Friday, March 9, 2012

localhost is not mapped to server name

Hi,
It is a long time that I have been using my box and have some .NET apps
running on it which use a connection string with Server=localhost and I have
not had any problem yet. Today I have updated my box Windows with recent
HotFixes (well I am not 100% sure it is the reason of this problem) and
after that my applications can not login database, and get this exception
"System.Data.SqlClient.SqlException: SQL Server does not exist or access
denied".
When I changed server name from localhost to real server name they are
working properly.
Any advice is welcomed.
Thanks
Mike
(local) instead of localhost
2005 Microsoft MVP C#
Robbe Morris
http://www.masterado.net
http://www.mastervb.net
"masoud bayan" <masoud_bayan@.hotmail.com> wrote in message
news:ujOrVWe7EHA.3644@.TK2MSFTNGP09.phx.gbl...
> Hi,
>
> It is a long time that I have been using my box and have some .NET apps
> running on it which use a connection string with Server=localhost and I
> have
> not had any problem yet. Today I have updated my box Windows with recent
> HotFixes (well I am not 100% sure it is the reason of this problem) and
> after that my applications can not login database, and get this exception
> "System.Data.SqlClient.SqlException: SQL Server does not exist or access
> denied".
> When I changed server name from localhost to real server name they are
> working properly.
>
> Any advice is welcomed.
>
> Thanks
> Mike
>
>

Local VB.NET app connection to remote SQL server

I know this is strickly not a website question, but dunno where else to post...

To remotely admin and monitor some functions of the website, I wish to use a local application to connect to the MSSQL DB which is held on the remote webhosting server

I have the following code:

Dim StrSQLUNAs String ="[UN]"Dim StrSQLPWAs String ="[PW]"Dim StrServerAs String ="[IP]\[INSTANCE]"Dim StrDBAs String ="[DB]"Dim strTimeOutAs String ="Connection Timeout=0;"Dim pStrSQLConnAs String ="Server=" & StrServer &";Database=" & StrDB &";User Id=" & StrSQLUN &";Password=" & StrSQLPW &";" & strTimeOutDim sqlConnAs New SqlClient.SqlConnection(pStrSQLConn)If sqlConn.State = ConnectionState.ClosedThen sqlConn.Open()

This has basically been take from the existing code on the website, but changing to the server details. I had just started dev'ing this app when the admins decided to move the SQL server over to a different server. It was working on the old one, but the new one doesn't. It just times out after whatever time you put in the timeout variable. 0=unlimited, and so just sits there.

I am also using the MSSQL Server Management Studio locally to connect to the same database, and although slow, does connect after about a minute or so. I thought they would be using the same type of underlying connection to access the server and database? Is this correct?

Can they put restrictions in place for this specific sort of data access?

Does anyone have any suggestions on how to resolve this issue??

Thanks for any help

Adam.

does the new server allow external connections? A lot of hosts I've used in the past only allow you to connect to the SQL database from an Asp.Net app on their webservers.

|||

Yeah it does allow external access as I am using MSSQL Mgmt Studio.

Anyway I think I have found the cause of the problem - my Cisco router. I needed to put in IP Inspect rules in for the MSSQL. Thing that confuses me still is that I could use the Mgnt Studio and I thought it would be accessing it in the same way. Anyway - it still seems to work - albeit with random connection times (eg last night it was connecting in a second or to and now taking about 5mins!)

Anyway have experience in this area??

Thanks

Adam.

Local temporary table schema

It seems odd that you would need to do this, since your code for the current
connection had to know how to create the #Temp Table.
However, if you must, you could use this as a starting point:
SELECT *
FROM Tempdb..sysobjects
WHERE name LIKE '%#Temp%'
SELECT *
FROM Tempdb..syscolumns
WHERE id = object_ID('tempdb..#Temp')
--
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Rich Wood" <RichWood@.newsgroup.nospam> wrote in message news:ECDEB660-0754-45EB-8978-6391D4
939CD1@.microsoft.com...
> Is there a way to get the schema (columns) of a local temporary table in S
QL
> Server 2005? TEMPDBO.INFORMATION_SCHEMA.COLUMNS lists the columns, but if
> multiple connections use the same temp table name, there doesn't seem to b
e a
> way to differentiate between them. Each table name is appended with a bunc
h
> of underscores and a random number (i.e.
> " #MyTable________________________________
_________________________________
________________________________________
_0000000002B0"),
> but that doesn't seem to help much.
>
> Thanks,
>
> Rich WoodIs there a way to get the schema (columns) of a local temporary table in SQL
Server 2005? TEMPDBO.INFORMATION_SCHEMA.COLUMNS lists the columns, but if
multiple connections use the same temp table name, there doesn't seem to be
a
way to differentiate between them. Each table name is appended with a bunch
of underscores and a random number (i.e.
" #MyTable________________________________
___________________________________
_______________________________________0
000000002B0"),
but that doesn't seem to help much.
Thanks,
Rich Wood|||It seems odd that you would need to do this, since your code for the current
connection had to know how to create the #Temp Table.
However, if you must, you could use this as a starting point:
SELECT *
FROM Tempdb..sysobjects
WHERE name LIKE '%#Temp%'
SELECT *
FROM Tempdb..syscolumns
WHERE id = object_ID('tempdb..#Temp')
--
Arnie Rowland, YACE*
"To be successful, your heart must accompany your knowledge."
*Yet Another certification Exam
"Rich Wood" <RichWood@.newsgroup.nospam> wrote in message news:ECDEB660-0754-45EB-8978-6391D4
939CD1@.microsoft.com...
> Is there a way to get the schema (columns) of a local temporary table in S
QL
> Server 2005? TEMPDBO.INFORMATION_SCHEMA.COLUMNS lists the columns, but if
> multiple connections use the same temp table name, there doesn't seem to b
e a
> way to differentiate between them. Each table name is appended with a bunc
h
> of underscores and a random number (i.e.
> " #MyTable________________________________
_________________________________
________________________________________
_0000000002B0"),
> but that doesn't seem to help much.
>
> Thanks,
>
> Rich Wood|||Arnie Rowland wrote:

> It seems odd that you would need to do this, since your code for the curr=
ent connection had to know how to create the #Temp Table.
> However, if you must, you could use this as a starting point:
> SELECT *
> FROM Tempdb..sysobjects
> WHERE name LIKE '%#Temp%'
> SELECT *
> FROM Tempdb..syscolumns
> WHERE id =3D object_ID('tempdb..#Temp')
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Rich Wood" <RichWood@.newsgroup.nospam> wrote in message news:ECDEB660-07=
54-45EB-8978-6391D4939CD1@.microsoft.com...
n SQL[vbcol=seagreen]
if[vbcol=seagreen]
o be a[vbcol=seagreen]
unch[vbcol=seagreen]
________________________________________
____0000000002B0"),[vbcol=seagreen]
> --=3D_NextPart_000_01D9_01C69935.4E112260
> Content-Type: text/html; charset=3DUtf-8
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 2562
> =EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
> <META content=3D"MSHTML 6.00.5296.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY>
> <DIV><FONT face=3DArial size=3D2>It seems odd that you would need to do t=
his, since
> your code for the current connection had to know how to create the #Temp
> Table.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>However, if you must, you could use this=
as a
> starting point:</FONT></DIV>
> <DIV><BR><FONT face=3D"Courier New" size=3D2>SELECT * </FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>FROM Tempdb..sysobje=

cts
> </FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>WHERE name LIKE '%#Temp%'</FONT>=
</DIV><FONT
> face=3D"Courier New" size=3D2>
> <DIV><BR>SELECT * </DIV>
> <DIV>FROM Tempdb..syscolumns </DIV>
> <DIV>WHERE id =3D object_ID('tempdb..#Temp')</FONT></DIV>
> <DIV><BR><FONT face=3DArial size=3D2>-- <BR>Arnie Rowland, YACE* <BR>"To =
be
> successful, your heart must accompany your knowledge."</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>*Yet Another certification Exam</FONT></=
DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>"Rich Wood" <</FONT><A
> href=3D"mailto:RichWood@.newsgroup.nospam"><FONT face=3DArial
> size=3D2>RichWood@.newsgroup.nospam</FONT></A><FONT face=3DArial size=3D2>=
> wrote in
> message </FONT><A
> href=3D"news:ECDEB660-0754-45EB-8978-6391D4939CD1@.microsoft.com"><FONT fa=
ce=3DArial
> size=3D2>news:ECDEB660-0754-45EB-8978-6391D4939CD1@.microsoft.com</FONT></=
A><FONT
> face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Is=
there a way to
> get the schema (columns) of a local temporary table in SQL <BR>> Serve=
r 2005?
> TEMPDBO.INFORMATION_SCHEMA.COLUMNS lists the columns, but if <BR>> mul=
tiple
> connections use the same temp table name, there doesn't seem to be a <BR>=
>
> way to differentiate between them. Each table name is appended with a bun=
ch
> <BR>> of underscores and a random number (i.e. <BR>>
> " #MyTable________________________________
________________________________=
________________________________________
__0000000002B0"),
> <BR>> but that doesn't seem to help much.<BR>> <BR>> Thanks,<BR>=
>
> <BR>> Rich Wood</FONT></BODY></HTML>
> --=3D_NextPart_000_01D9_01C69935.4E112260--
use=20
sp_help 'tempdb..#temp'
Regards
Amish Shah|||Hi Rich,
Thank you for your posting!
You could use the object_ID function to get the object id of the temporary
table you current user created.
As Arnie mentioned, you could use the following statement to query the
information.
SELECT *
FROM Tempdb..sysobjects
WHERE id = object_ID('tempdb..#TEMP')
SELECT *
FROM Tempdb..syscolumns
WHERE id = object_ID('tempdb..#TEMP')
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community 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.|||To make a long story short, the local temporary table is created dynamically
with the result of a query -- so even though I create it locally I don't kno
w
the column names at design time.
Thanks for your response -- using the object_id function to query the
tempdb..syscolumns table worked.
Rich Wood
"Arnie Rowland" wrote:
[vbcol=seagreen]
> It seems odd that you would need to do this, since your code for the curre
nt connection had to know how to create the #Temp Table.
> However, if you must, you could use this as a starting point:
> SELECT *
> FROM Tempdb..sysobjects
> WHERE name LIKE '%#Temp%'
> SELECT *
> FROM Tempdb..syscolumns
> WHERE id = object_ID('tempdb..#Temp')
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Rich Wood" <RichWood@.newsgroup.nospam> wrote in message news:ECDEB660-075
4-45EB-8978-6391D4939CD1@.microsoft.com...|||Arnie Rowland wrote:

> It seems odd that you would need to do this, since your code for the curr=
ent connection had to know how to create the #Temp Table.
> However, if you must, you could use this as a starting point:
> SELECT *
> FROM Tempdb..sysobjects
> WHERE name LIKE '%#Temp%'
> SELECT *
> FROM Tempdb..syscolumns
> WHERE id =3D object_ID('tempdb..#Temp')
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Rich Wood" <RichWood@.newsgroup.nospam> wrote in message news:ECDEB660-07=
54-45EB-8978-6391D4939CD1@.microsoft.com...
n SQL[vbcol=seagreen]
if[vbcol=seagreen]
o be a[vbcol=seagreen]
unch[vbcol=seagreen]
________________________________________
____0000000002B0"),[vbcol=seagreen]
> --=3D_NextPart_000_01D9_01C69935.4E112260
> Content-Type: text/html; charset=3DUtf-8
> Content-Transfer-Encoding: quoted-printable
> X-Google-AttachSize: 2562
> =EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
> <HTML><HEAD>
> <META http-equiv=3DContent-Type content=3D"text/html; charset=3Dutf-8">
> <META content=3D"MSHTML 6.00.5296.0" name=3DGENERATOR>
> <STYLE></STYLE>
> </HEAD>
> <BODY>
> <DIV><FONT face=3DArial size=3D2>It seems odd that you would need to do t=
his, since
> your code for the current connection had to know how to create the #Temp
> Table.</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>However, if you must, you could use this=
as a
> starting point:</FONT></DIV>
> <DIV><BR><FONT face=3D"Courier New" size=3D2>SELECT * </FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>FROM Tempdb..sysobje=

cts
> </FONT></DIV>
> <DIV><FONT face=3D"Courier New" size=3D2>WHERE name LIKE '%#Temp%'</FONT>=
</DIV><FONT
> face=3D"Courier New" size=3D2>
> <DIV><BR>SELECT * </DIV>
> <DIV>FROM Tempdb..syscolumns </DIV>
> <DIV>WHERE id =3D object_ID('tempdb..#Temp')</FONT></DIV>
> <DIV><BR><FONT face=3DArial size=3D2>-- <BR>Arnie Rowland, YACE* <BR>"To =
be
> successful, your heart must accompany your knowledge."</FONT></DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>*Yet Another certification Exam</FONT></=
DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2></FONT> </DIV>
> <DIV><FONT face=3DArial size=3D2>"Rich Wood" <</FONT><A
> href=3D"mailto:RichWood@.newsgroup.nospam"><FONT face=3DArial
> size=3D2>RichWood@.newsgroup.nospam</FONT></A><FONT face=3DArial size=3D2>=
> wrote in
> message </FONT><A
> href=3D"news:ECDEB660-0754-45EB-8978-6391D4939CD1@.microsoft.com"><FONT fa=
ce=3DArial
> size=3D2>news:ECDEB660-0754-45EB-8978-6391D4939CD1@.microsoft.com</FONT></=
A><FONT
> face=3DArial size=3D2>...</FONT></DIV><FONT face=3DArial size=3D2>> Is=
there a way to
> get the schema (columns) of a local temporary table in SQL <BR>> Serve=
r 2005?
> TEMPDBO.INFORMATION_SCHEMA.COLUMNS lists the columns, but if <BR>> mul=
tiple
> connections use the same temp table name, there doesn't seem to be a <BR>=
>
> way to differentiate between them. Each table name is appended with a bun=
ch
> <BR>> of underscores and a random number (i.e. <BR>>
> " #MyTable________________________________
________________________________=
________________________________________
__0000000002B0"),
> <BR>> but that doesn't seem to help much.<BR>> <BR>> Thanks,<BR>=
>
> <BR>> Rich Wood</FONT></BODY></HTML>
> --=3D_NextPart_000_01D9_01C69935.4E112260--
use=20
sp_help 'tempdb..#temp'
Regards
Amish Shah|||Hi Rich,
Thank you for your posting!
You could use the object_ID function to get the object id of the temporary
table you current user created.
As Arnie mentioned, you could use the following statement to query the
information.
SELECT *
FROM Tempdb..sysobjects
WHERE id = object_ID('tempdb..#TEMP')
SELECT *
FROM Tempdb..syscolumns
WHERE id = object_ID('tempdb..#TEMP')
Hope this will be helpful!
Sincerely,
Wei Lu
Microsoft Online Community 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.|||To make a long story short, the local temporary table is created dynamically
with the result of a query -- so even though I create it locally I don't kno
w
the column names at design time.
Thanks for your response -- using the object_id function to query the
tempdb..syscolumns table worked.
Rich Wood
"Arnie Rowland" wrote:
[vbcol=seagreen]
> It seems odd that you would need to do this, since your code for the curre
nt connection had to know how to create the #Temp Table.
> However, if you must, you could use this as a starting point:
> SELECT *
> FROM Tempdb..sysobjects
> WHERE name LIKE '%#Temp%'
> SELECT *
> FROM Tempdb..syscolumns
> WHERE id = object_ID('tempdb..#Temp')
> --
> Arnie Rowland, YACE*
> "To be successful, your heart must accompany your knowledge."
> *Yet Another certification Exam
>
> "Rich Wood" <RichWood@.newsgroup.nospam> wrote in message news:ECDEB660-075
4-45EB-8978-6391D4939CD1@.microsoft.com...

Wednesday, March 7, 2012

Local SQL Server Connection times out during network outage

Hi,
we just upgraded to active directory from nt 4 domain.
In our HQ office we have 2 SQL servers for various
applications. We have a DNS/DC/GC server located at this
location and a DNS/DC/GC server located at a remote site.
During the last couple months after the upgrade we have
had a couple network outages. During these times sql
access to these local servers within the local office has
been so slow that it times out our applications and the
local users cannot use their local sql servers. Any
ideas on what is happening?
Sounds like the clients were trying to resolve the local server name in DNS
or WINS, that were unreachable perhaps. With SQL 2000 you can connect with
Shared Memory, which never needs to go out on the network. So, essentially
local connections are just that , local.
I would check to see if Shared Memory is enabled on the machine, and if
there were an local aliases used. If there is an alias specifying TCP for
example, then the client would attempt to use TCP, which could be a problem
under those conditions.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Local SQL Server Connection times out during network outage

Hi,
we just upgraded to active directory from nt 4 domain.
In our HQ office we have 2 SQL servers for various
applications. We have a DNS/DC/GC server located at this
location and a DNS/DC/GC server located at a remote site.
During the last couple months after the upgrade we have
had a couple network outages. During these times sql
access to these local servers within the local office has
been so slow that it times out our applications and the
local users cannot use their local sql servers. Any
ideas on what is happening?Sounds like the clients were trying to resolve the local server name in DNS
or WINS, that were unreachable perhaps. With SQL 2000 you can connect with
Shared Memory, which never needs to go out on the network. So, essentially
local connections are just that , local.
I would check to see if Shared Memory is enabled on the machine, and if
there were an local aliases used. If there is an alias specifying TCP for
example, then the client would attempt to use TCP, which could be a problem
under those conditions.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Local SQL connection String

How do I write a connection string in VB to use the local database. I have
something like this, but it does not work. I do not want to use the local
computer name. I want to make it generic so that the application can run on
any computer.
ThanksTry this:
Provider=SQLOLEDB.1;Integrated Security=SSPI;Persist Security
Info=False
Note there is no reference to a server so it uses the local server with
integrated security.
Bryce|||found the solution. I just have to use localhost.
Thanks
"Emma" wrote:

> How do I write a connection string in VB to use the local database. I have
> something like this, but it does not work. I do not want to use the local
> computer name. I want to make it generic so that the application can run o
n
> any computer.
> Thanks|||Try,
-- WA
...
oConn.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=Northwind;Integrated Security=SSPI"
...
-- MA
...
oConn.ConnectionString = "Provider=SQLOLEDB;Data Source=(local);Initial
Catalog=Northwind; User ID=MyUsername; Password=MyPassword;"
...
AMB
"Emma" wrote:

> How do I write a connection string in VB to use the local database. I have
> something like this, but it does not work. I do not want to use the local
> computer name. I want to make it generic so that the application can run o
n
> any computer.
> Thanks

Local Server Connection

Hi

I am trying connect to a database in SQL EXPRESS 2005 that is located in the same machine that is running (Windows XP Pro) IIS using classic asp code, but i cannot seem to connect to the database. Please anybody help.

Here is the code below.

ConnectionString = "Provider = SQLNCLI;" & _
"Data Source = UNIDWEB\SQLEXPRESS;" & _
"Initial Catalog = <dbname>;" & _
"Integrated Security=SSPI;"
objCmd.open ConnectionStringHi,

make sure that you enabled remote connections for the instance. The walkthrough how to do that can be found on my site int he screencast section. If that did not help you, do not hesitate to come back :-)

HTH, Jens Suessmeyer.


http://www.sqlserver2005.de

|||Thanks, Jens

Friday, February 24, 2012

Local cubes connection

Hello,
I have created 3 local cubes which resided in the same .cub file. The cubes created from AS 2005 cubes.
How can I make ADOMD connection to all 3 cubes at the same time in my client application (C#)?
The problem is that Initial Catalog (database name) in connection string in case of local cubes is the same as the cube name.

Thanks,
GB

In ADOMD you don't connect directly to any specific cube. Once you have connect to the database (catalog) you just specify which cube you want in the query. So you only need the one connection and you can use that to query any of the cubes in the catalog.

eg

SELECT measures.AllMembers ON COLUMNS FROM <CUBE_NAME>

|||

I think GB meant that the problem was that since for him database name and the cube name are the same - he ended up with 3 different databases, and ADOMD only works with one database at the time.

However, the limitation of database name being the same as the cube name only existed in AS2000, and also AS2000 officially only supports one cube per database. These limitations don't exist in AS2005.

|||That makes sense, If I had to create a local cube I would use the ASSL syntax, but if I am not mistaken the CREATE LOCAL CUBE (which is depreciated) and CREATE GLOBAL CUBE methods setup the database with the same name as the cube. There is a reasonable white paper on local cubes which contrasts the different methods of creating them here http://www.localcubetask.com/UsingLocalCubesinMicrosoftSQLServer2005AnalysisServices.doc|||

I have cteated my local cubes using ASSL CGC method in SSMS 2005.

I created 3 cubes: Cube1,Cube2,Cube3 in one My_cubes.cub file.

In my C# code application I have the following connection string:

string myConnectionString = "Provider=MSOLAP;Data Source='C:\\LOCALCUBES\\My_cubes.cub';Initial Catalog=Cube1";

When I try to get dimensions from Cube2 I 'v got an error related to the connection string - no connection to Cube2.

I tryed to create 2 saparate connection strings for the same My_cubes.cub file but different cubes, but application can not open same file twice.

So, I still have a problem to open connection to 2 local cubes at the same time.

Thanks,

GB

|||The solution that was suggested above, is to build real XMLA scripts to create your cubes instead of using CREATE GLOBAL CUBE statement - this way you will be able to put multiple cubes in the same database in the local cube.|||

Yes, XMLA script is working for me.

I found the instructions hear:

http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!883.entry

Thanks,

GB

|||

Still have the problem.

My local .cub file created by XMLA script contains 3 databases with 7 cubes each.

When I open this .cub file in MDX Sample application I can make

a connection and MDX query to any of 3 databases and accordingly their cubes.

But in my C# application when I try open connection to all local databases in a loop from the same .cub file

I got the error just after attampting to open second database in a loop.This is ADOMDClient.AdomdConnection error:

"A connection cannot be made. Ensure that the server is running".

Any hints how to fix the problem?

Thanks,

GB

|||

You can only have one connection to the local cube file - therefore the second connection fails. Your options:

1. Split it to the 3 different local cube files

2. Put all the cubes in the same database

3. Close the previous connection before opening a new one

4. Keep one connection, but change the current database when you need to go to another one.

Local cubes connection

Hello,
I have created 3 local cubes which resided in the same .cub file. The cubes created from AS 2005 cubes.
How can I make ADOMD connection to all 3 cubes at the same time in my client application (C#)?
The problem is that Initial Catalog (database name) in connection string in case of local cubes is the same as the cube name.

Thanks,
GB

In ADOMD you don't connect directly to any specific cube. Once you have connect to the database (catalog) you just specify which cube you want in the query. So you only need the one connection and you can use that to query any of the cubes in the catalog.

eg

SELECT measures.AllMembers ON COLUMNS FROM <CUBE_NAME>

|||

I think GB meant that the problem was that since for him database name and the cube name are the same - he ended up with 3 different databases, and ADOMD only works with one database at the time.

However, the limitation of database name being the same as the cube name only existed in AS2000, and also AS2000 officially only supports one cube per database. These limitations don't exist in AS2005.

|||That makes sense, If I had to create a local cube I would use the ASSL syntax, but if I am not mistaken the CREATE LOCAL CUBE (which is depreciated) and CREATE GLOBAL CUBE methods setup the database with the same name as the cube. There is a reasonable white paper on local cubes which contrasts the different methods of creating them here http://www.localcubetask.com/UsingLocalCubesinMicrosoftSQLServer2005AnalysisServices.doc|||

I have cteated my local cubes using ASSL CGC method in SSMS 2005.

I created 3 cubes: Cube1,Cube2,Cube3 in one My_cubes.cub file.

In my C# code application I have the following connection string:

string myConnectionString = "Provider=MSOLAP;Data Source='C:\\LOCALCUBES\\My_cubes.cub';Initial Catalog=Cube1";

When I try to get dimensions from Cube2 I 'v got an error related to the connection string - no connection to Cube2.

I tryed to create 2 saparate connection strings for the same My_cubes.cub file but different cubes, but application can not open same file twice.

So, I still have a problem to open connection to 2 local cubes at the same time.

Thanks,

GB

|||The solution that was suggested above, is to build real XMLA scripts to create your cubes instead of using CREATE GLOBAL CUBE statement - this way you will be able to put multiple cubes in the same database in the local cube.|||

Yes, XMLA script is working for me.

I found the instructions hear:

http://cwebbbi.spaces.live.com/blog/cns!7B84B0F2C239489A!883.entry

Thanks,

GB

|||

Still have the problem.

My local .cub file created by XMLA script contains 3 databases with 7 cubes each.

When I open this .cub file in MDX Sample application I can make

a connection and MDX query to any of 3 databases and accordingly their cubes.

But in my C# application when I try open connection to all local databases in a loop from the same .cub file

I got the error just after attampting to open second database in a loop.This is ADOMDClient.AdomdConnection error:

"A connection cannot be made. Ensure that the server is running".

Any hints how to fix the problem?

Thanks,

GB

|||

You can only have one connection to the local cube file - therefore the second connection fails. Your options:

1. Split it to the 3 different local cube files

2. Put all the cubes in the same database

3. Close the previous connection before opening a new one

4. Keep one connection, but change the current database when you need to go to another one.

Local connection to SQL Server 2005 Express fails

I just installed SQL Server 2005 Express edition, and created an app in
Visual Studio using C#. I get the following error when trying to connect:
"An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)"
I enabled Named Pipes but left TCP/IP disabled because this is a localhost
connection on the same computer.
Here is the portion of the code I am using to connect:
string dbCString = "Persist Security Info=False;Integrated
Security=true;Trusted_Connection=true;Initial
Catalog=MxData;server=(local)";
SqlConnection ThisConnection = new SqlConnection(dbCString);
ThisConnection.Open();
Thanks in advance for any help.
Perhaps these will help:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.giganews.com ...
>I just installed SQL Server 2005 Express edition, and created an app in
>Visual Studio using C#. I get the following error when trying to connect:
> "An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the fact
> that under the default settings SQL Server does not allow remote
> connections. (provider: Named Pipes Provider, error: 40 - Could not open a
> connection to SQL Server)"
> I enabled Named Pipes but left TCP/IP disabled because this is a localhost
> connection on the same computer.
> Here is the portion of the code I am using to connect:
> string dbCString = "Persist Security Info=False;Integrated
> Security=true;Trusted_Connection=true;Initial
> Catalog=MxData;server=(local)";
> SqlConnection ThisConnection = new SqlConnection(dbCString);
> ThisConnection.Open();
>
> Thanks in advance for any help.
>
>
>
>
>
|||Thanks for the info, but I did everything suggested in those two articles
and I still get the same connection error. I also tried various alterations
of my connection string with no success. Further research indicates that
this is a common problem, so I wonder why Microsoft ships the Express
edition along with Visual Studio 2005, but makes it so difficult to connect.
If you or anyone else has any other ideas, I would be most grateful.
Thanks.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
> Perhaps these will help:
> Configuration -Configure SQL Server 2005 to allow remote connections
> http://support.microsoft.com/default.aspx?scid=kb;EN-US;914277
> Configuration -Connect to SQL Express from "downlevel clients"
> http://blogs.msdn.com/sqlexpress/archive/2004/07/23/192044.aspx
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "TAC" <tac@.noemail.com> wrote in message
> news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.giganews.com ...
>
|||This is a WAG:
You only need one of these two settings, perhaps having both is causing the
connection string to cause failure.
Integrated Security=true;Trusted_Connection=true;
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@.giganews.com ...
> Thanks for the info, but I did everything suggested in those two articles
> and I still get the same connection error. I also tried various
> alterations of my connection string with no success. Further research
> indicates that this is a common problem, so I wonder why Microsoft ships
> the Express edition along with Visual Studio 2005, but makes it so
> difficult to connect.
> If you or anyone else has any other ideas, I would be most grateful.
> Thanks.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
>
|||Thanks for the suggestion, but using only one or the other didn't work,
either.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OD744%23LFHHA.1912@.TK2MSFTNGP03.phx.gbl...
> This is a WAG:
> You only need one of these two settings, perhaps having both is causing
> the connection string to cause failure.
> Integrated Security=true;Trusted_Connection=true;
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "TAC" <tac@.noemail.com> wrote in message
> news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@.giganews.com ...
>
|||After a lot of research, here's the answer. The connection string should
read as follows:
"Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
Note that you need a dot followed by TWO left slashes in your server name.
BTW, Initial Catalog is whatever database you want to use.
"TAC" <tac@.noemail.com> wrote in message
news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.giganews.com ...
> Thanks for the suggestion, but using only one or the other didn't work,
> either.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OD744%23LFHHA.1912@.TK2MSFTNGP03.phx.gbl...
>
|||Thanks for following up your own post. It prevents others from wasting their
time trying to help you after you have solved the problem, and it helps
others when you share your solution.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:BKidnUwKtpML-PLYnZ2dnUVZ_qmdnZ2d@.giganews.com...
> After a lot of research, here's the answer. The connection string should
> read as follows:
> "Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
> Note that you need a dot followed by TWO left slashes in your server name.
> BTW, Initial Catalog is whatever database you want to use.
>
> "TAC" <tac@.noemail.com> wrote in message
> news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.giganews.com ...
>

Local connection to SQL Server 2005 Express fails

I just installed SQL Server 2005 Express edition, and created an app in
Visual Studio using C#. I get the following error when trying to connect:
"An error has occurred while establishing a connection to the server. When
connecting to SQL Server 2005, this failure may be caused by the fact that
under the default settings SQL Server does not allow remote connections.
(provider: Named Pipes Provider, error: 40 - Could not open a connection to
SQL Server)"
I enabled Named Pipes but left TCP/IP disabled because this is a localhost
connection on the same computer.
Here is the portion of the code I am using to connect:
string dbCString = "Persist Security Info=False;Integrated
Security=true;Trusted_Connection=true;In
itial
Catalog=MxData;server=(local)";
SqlConnection ThisConnection = new SqlConnection(dbCString);
ThisConnection.Open();
Thanks in advance for any help.Perhaps these will help:
Configuration -Configure SQL Server 2005 to allow remote connections
http://support.microsoft.com/defaul...kb;EN-US;914277
Configuration -Connect to SQL Express from "downlevel clients"
http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.gi
ganews.com...
>I just installed SQL Server 2005 Express edition, and created an app in
>Visual Studio using C#. I get the following error when trying to connect:
> "An error has occurred while establishing a connection to the server.
> When connecting to SQL Server 2005, this failure may be caused by the fact
> that under the default settings SQL Server does not allow remote
> connections. (provider: Named Pipes Provider, error: 40 - Could not open a
> connection to SQL Server)"
> I enabled Named Pipes but left TCP/IP disabled because this is a localhost
> connection on the same computer.
> Here is the portion of the code I am using to connect:
> string dbCString = "Persist Security Info=False;Integrated
> Security=true;Trusted_Connection=true;In
itial
> Catalog=MxData;server=(local)";
> SqlConnection ThisConnection = new SqlConnection(dbCString);
> ThisConnection.Open();
>
> Thanks in advance for any help.
>
>
>
>
>|||Thanks for the info, but I did everything suggested in those two articles
and I still get the same connection error. I also tried various alterations
of my connection string with no success. Further research indicates that
this is a common problem, so I wonder why Microsoft ships the Express
edition along with Visual Studio 2005, but makes it so difficult to connect.
If you or anyone else has any other ideas, I would be most grateful.
Thanks.
"Arnie Rowland" <arnie@.1568.com> wrote in message
news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
> Perhaps these will help:
> Configuration -Configure SQL Server 2005 to allow remote connections
> http://support.microsoft.com/defaul...kb;EN-US;914277
> Configuration -Connect to SQL Express from "downlevel clients"
> http://blogs.msdn.com/sqlexpress/ar.../23/192044.aspx
>
> --
> Arnie Rowland, Ph.D.
> Westwood Consulting, Inc
> Most good judgment comes from experience.
> Most experience comes from bad judgment.
> - Anonymous
> You can't help someone get up a hill without getting a little closer to
> the top yourself.
> - H. Norman Schwarzkopf
>
> "TAC" <tac@.noemail.com> wrote in message
> news:GsCdnUMH0OMdb_DYnZ2dnUVZ_qOdnZ2d@.gi
ganews.com...
>|||This is a WAG:
You only need one of these two settings, perhaps having both is causing the
connection string to cause failure.
Integrated Security=true;Trusted_Connection=true;
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:ONCdne2ocahst_LYnZ2dnUVZ_u6dnZ2d@.gi
ganews.com...
> Thanks for the info, but I did everything suggested in those two articles
> and I still get the same connection error. I also tried various
> alterations of my connection string with no success. Further research
> indicates that this is a common problem, so I wonder why Microsoft ships
> the Express edition along with Visual Studio 2005, but makes it so
> difficult to connect.
> If you or anyone else has any other ideas, I would be most grateful.
> Thanks.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OOy2vm$EHHA.1784@.TK2MSFTNGP06.phx.gbl...
>|||After a lot of research, here's the answer. The connection string should
read as follows:
"Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
Note that you need a dot followed by TWO left slashes in your server name.
BTW, Initial Catalog is whatever database you want to use.
"TAC" <tac@.noemail.com> wrote in message
news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.gi
ganews.com...
> Thanks for the suggestion, but using only one or the other didn't work,
> either.
>
> "Arnie Rowland" <arnie@.1568.com> wrote in message
> news:OD744%23LFHHA.1912@.TK2MSFTNGP03.phx.gbl...
>|||Thanks for following up your own post. It prevents others from wasting their
time trying to help you after you have solved the problem, and it helps
others when you share your solution.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
You can't help someone get up a hill without getting a little closer to the
top yourself.
- H. Norman Schwarzkopf
"TAC" <tac@.noemail.com> wrote in message
news:BKidnUwKtpML-PLYnZ2dnUVZ_qmdnZ2d@.giganews.com...
> After a lot of research, here's the answer. The connection string should
> read as follows:
> "Server=.\\SQLEXPRESS;Initial Catalog=MxData;Integrated Security=SSPI";
> Note that you need a dot followed by TWO left slashes in your server name.
> BTW, Initial Catalog is whatever database you want to use.
>
> "TAC" <tac@.noemail.com> wrote in message
> news:bpadnbRK_s7Mz_LYnZ2dnUVZ_oadnZ2d@.gi
ganews.com...
>

Local connection failure: please help

I Have SQL Server 2000 local installed on a Windows XP SP2 machine,
Dutch version.
SQL Server first connected fine via the default settings 'Use Windows
Authentication'. I use it to test VB.Net practices, which went fine
for a while. I am busy preparing for the 70-310 exam.
Then I had problems with a VB.Net (a webservice) application
connecting to SQL server local. Via a newsgroup someone advised me to
change the login to 'Use SQL Server Authentication'. I used the
default password 'sa' and no password. I couldn't get any connection.
I tried with 'Administrator', but no connection.
When I tried to set it back to 'Use Windows Authentication' I get the
message Connection Failed, check SQL Server registration properties.
When I tried to open the properties of the local SQL Server (LOCAL)
(Windows NT) via the Enterprise Manager I get error 1069. I tried
several usernames, nothing helps. I didn't change the default, so it
should be 'sa' without a password?
Please help, I am stuck for days now.
RoyWell, the only solution was to re-install SQL Server and restore the
databases...
On Thu, 20 Jul 2006 14:16:09 +0200, RC <roycoumans@.hotmail.com> wrote:

>I Have SQL Server 2000 local installed on a Windows XP SP2 machine,
>Dutch version.
>SQL Server first connected fine via the default settings 'Use Windows
>Authentication'. I use it to test VB.Net practices, which went fine
>for a while. I am busy preparing for the 70-310 exam.
>Then I had problems with a VB.Net (a webservice) application
>connecting to SQL server local. Via a newsgroup someone advised me to
>change the login to 'Use SQL Server Authentication'. I used the
>default password 'sa' and no password. I couldn't get any connection.
>I tried with 'Administrator', but no connection.
>When I tried to set it back to 'Use Windows Authentication' I get the
>message Connection Failed, check SQL Server registration properties.
>When I tried to open the properties of the local SQL Server (LOCAL)
>(Windows NT) via the Enterprise Manager I get error 1069. I tried
>several usernames, nothing helps. I didn't change the default, so it
>should be 'sa' without a password?
>Please help, I am stuck for days now.
>Roy