Sunday, March 25, 2012
Can't get AND to work.
results. I put in ' "Log" or "In" ' and I get results. I put in ' "Log" and
"In" ' and get "Informational: The full-text search condition contained
noise word(s)."
Any thoughts?
What I want to do is be able to have multiple terms with ands in the
expression.
TIA - Jeff.
Remove the words in from your noise word list. As you appear to be in the
States, empty the noise.enu or noiseenu.txt files and replace them with a
single space. Then rebuild your catalogs. You should be able to search on
them now.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Mufasa" <jb@.nowhere.com> wrote in message
news:%23BdhgvGdHHA.4872@.TK2MSFTNGP03.phx.gbl...
>I have a contains string that says ' "Log In" ' which works fine and
>returns results. I put in ' "Log" or "In" ' and I get results. I put in '
>"Log" and "In" ' and get "Informational: The full-text search condition
>contained noise word(s)."
> Any thoughts?
> What I want to do is be able to have multiple terms with ands in the
> expression.
> TIA - Jeff.
>
|||Thanks for the help.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:O$DM0OIdHHA.208@.TK2MSFTNGP05.phx.gbl...
> Remove the words in from your noise word list. As you appear to be in the
> States, empty the noise.enu or noiseenu.txt files and replace them with a
> single space. Then rebuild your catalogs. You should be able to search on
> them now.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Mufasa" <jb@.nowhere.com> wrote in message
> news:%23BdhgvGdHHA.4872@.TK2MSFTNGP03.phx.gbl...
>
|||You're welcome.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Mufasa" <jb@.nowhere.com> wrote in message
news:%23RiY9UWdHHA.4784@.TK2MSFTNGP06.phx.gbl...
> Thanks for the help.
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:O$DM0OIdHHA.208@.TK2MSFTNGP05.phx.gbl...
>
|||Hilary,
That didn't seem to work. I changed both the noise.enu and for grins the
noise.eng file to be a single space. I also regenerated the full text index.
Now if I try where contains ( webpagetext, '"IN"' ) I still get
the Informational: The full-text search condition contained noise word(s).
message.
Any thoughts?
TIA - Jeff.
"Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
news:%23w5O$1fdHHA.2268@.TK2MSFTNGP02.phx.gbl...
> You're welcome.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Mufasa" <jb@.nowhere.com> wrote in message
> news:%23RiY9UWdHHA.4784@.TK2MSFTNGP06.phx.gbl...
>
|||Did you restart the msftesql service after updating the noise list?
Best regards,
-Denis.
"Mufasa" wrote:
> Hilary,
> That didn't seem to work. I changed both the noise.enu and for grins the
> noise.eng file to be a single space. I also regenerated the full text index.
> Now if I try where contains ( webpagetext, '"IN"' ) I still get
> the Informational: The full-text search condition contained noise word(s).
> message.
> Any thoughts?
> TIA - Jeff.
> "Hilary Cotter" <hilary.cotter@.gmail.com> wrote in message
> news:%23w5O$1fdHHA.2268@.TK2MSFTNGP02.phx.gbl...
>
>
|||The machine has been completely rebooted, and the text index was rebuilt.
It sounds like the file was not saved correctly. But I've checked it. I've
also done a search for noise.enu and there is only one copy on the machine -
in the Windows\System32 directory.
"denistc" <denistc@.discussions.microsoft.com> wrote in message
news:38149F6E-B714-446F-B6E0-31057D7D7B71@.microsoft.com...[vbcol=seagreen]
> Did you restart the msftesql service after updating the noise list?
> Best regards,
> -Denis.
> "Mufasa" wrote:
Thursday, March 22, 2012
Can't figure out how to pass a comma delimeted value?
allow for multple entries within a string" and have the results returned from
the report. The stored procedure that I created will allow me to get what I
want but when I try to make the report make use of the sproc from within a
parameter I get nothing returned if I enter multiple values seperated by a
comma into the input box. If I put in just a single entry, it works.
Again, when I run the stored procedure within the database it works with
multiple values, when I run and test within the data view in the report it
runs and accepts multiple entries when prompted. Only when I run the report
does it fail?
Here is the sproc...
USE [mydatabase]
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER OFF
GO
CREATE PROCEDURE [dbo].[usp_TestRprtArray]
@.subscriberarray varchar(500)
as
declare @.sql varchar(8000)
set @.subscriberarray = "'" + replace(@.subscriberarray,',',"','") + "'"
set @.sql = "select SUBSCRIBER, OID, CODE, OFFERCODE, EFFECTIVE_DATE,
EXPIRATION_DATE from subscription where (subscriber in (" + @.subscriberarray
+ "))"
exec (@.sql)
--
Anthony E. Castro - MCDBAIf the comma seperated value is passed from thr UI screen of a web
page.. try url encoding the page...
acmcdba68 wrote:
> I am trying to pass a comma delimited value from an input box "attempting to
> allow for multple entries within a string" and have the results returned from
> the report. The stored procedure that I created will allow me to get what I
> want but when I try to make the report make use of the sproc from within a
> parameter I get nothing returned if I enter multiple values seperated by a
> comma into the input box. If I put in just a single entry, it works.
> Again, when I run the stored procedure within the database it works with
> multiple values, when I run and test within the data view in the report it
> runs and accepts multiple entries when prompted. Only when I run the report
> does it fail?
> Here is the sproc...
> USE [mydatabase]
> GO
> SET ANSI_NULLS ON
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> CREATE PROCEDURE [dbo].[usp_TestRprtArray]
> @.subscriberarray varchar(500)
> as
> declare @.sql varchar(8000)
> set @.subscriberarray = "'" + replace(@.subscriberarray,',',"','") + "'"
> set @.sql = "select SUBSCRIBER, OID, CODE, OFFERCODE, EFFECTIVE_DATE,
> EXPIRATION_DATE from subscription where (subscriber in (" + @.subscriberarray
> + "))"
> exec (@.sql)
> --
> Anthony E. Castro - MCDBA|||try putting in a textbox in your report that shows what parameter RS is
sending your sproc. that can be helpfule in seeing just what is passing in
the back end. Are you using a Multi-value parameter box? that format is
usually '<value>,<value>,...'
What works for me is to loop through the string, parsing out each value and
inserting the results into a temp table that can then be sorted, filtered,
etc as you like.
"acmcdba68" wrote:
> I am trying to pass a comma delimited value from an input box "attempting to
> allow for multple entries within a string" and have the results returned from
> the report. The stored procedure that I created will allow me to get what I
> want but when I try to make the report make use of the sproc from within a
> parameter I get nothing returned if I enter multiple values seperated by a
> comma into the input box. If I put in just a single entry, it works.
> Again, when I run the stored procedure within the database it works with
> multiple values, when I run and test within the data view in the report it
> runs and accepts multiple entries when prompted. Only when I run the report
> does it fail?
> Here is the sproc...
> USE [mydatabase]
> GO
> SET ANSI_NULLS ON
> GO
> SET QUOTED_IDENTIFIER OFF
> GO
> CREATE PROCEDURE [dbo].[usp_TestRprtArray]
> @.subscriberarray varchar(500)
> as
> declare @.sql varchar(8000)
> set @.subscriberarray = "'" + replace(@.subscriberarray,',',"','") + "'"
> set @.sql = "select SUBSCRIBER, OID, CODE, OFFERCODE, EFFECTIVE_DATE,
> EXPIRATION_DATE from subscription where (subscriber in (" + @.subscriberarray
> + "))"
> exec (@.sql)
> --
> Anthony E. Castro - MCDBA
Friday, February 24, 2012
Can't connect using 'localhost' but '127.0.0.1' works
always get a timeout error using either Query Analyzer or ADO. But if I
change the string to 127.0.0.1, it works.
A 'nslookup localhost' returns 127.0.0.1. If I run 'telnet localhost
1433', it connects. Any idea why I might not be able to use the string
'localhost'?
Thanks,
PatrickI'm sorry, I posted this to the wrong group, but if anyone has the
answer, please let me know.
Thanks,
Patrick
Can't connect using 'localhost' but '127.0.0.1' works
always get a timeout error using either Query Analyzer or ADO. But if I
change the string to 127.0.0.1, it works.
A 'nslookup localhost' returns 127.0.0.1. If I run 'telnet localhost
1433', it connects. Any idea why I might not be able to use the string
'localhost'?
Thanks,
Patrick
I'm sorry, I posted this to the wrong group, but if anyone has the
answer, please let me know.
Thanks,
Patrick
Can't connect to through OLE DB to remote host - Database 'XXX' does not exist.
When I try to open OleDbConnection using connection string:
"Provider=MSOLAP;Data Source=servername;Initial Catalog=dbname;"
I get message:
Database 'XXX' does not exist.
I can easily connect in the same way to localhost.
My user is olap administrator on the remote and localhost.
Using Analysis Manager or MDX Sample App from my PC I can connect to
both - local and remote DB.
The problem is I think that I still log in as anonymous user - I found
it in remote server's event log.
How can I log on authenticated? Analysis Manager can!
Any suggestions welcome!It seems that only I have that kind of problem.
Is there something I'm doing wrong?
Is it possible that my pc has to be in a domain? What if there is no
domain?
Guys please suggest me some checks or tests. Ask me something :)
This is my first approach to OLAP.
I don't know what to do.
On 27 Sie, 18:02, panko <PKoper...@.gmail.com> wrote:
> My application is to get some data from SQL/OLAP server.
> When I try to open OleDbConnection using connection string:
> "Provider=MSOLAP;Data Source=servername;Initial Catalog=dbname;"
> I get message:
> Database 'XXX' does not exist.
> I can easily connect in the same way to localhost.
> My user is olap administrator on the remote and localhost.
> Using Analysis Manager or MDX Sample App from my PC I can connect to
> both - local and remote DB.
> The problem is I think that I still log in as anonymous user - I found
> it in remote server's event log.
> How can I log on authenticated? Analysis Manager can!
> Any suggestions welcome!|||You all miserable geeks! ;)
I finally solved the problem.
The application was running as service. This service by default was
using System Local Account to log on. Therefore was refused by the
remote machine system which was not allowing this user to be
authenticated.
Solution was:
Services: MyService>Properties>Log On
Radio button on 'This Account': user and password that has right on
remote host.
Cant connect to sqlserver
server=10.10.10.1;uid=xuser;pwd=xpasword;database= xdatabase;Connection
Timeout=60;Pooling=True;Min Pool Size=1;Max Pool Size=50
And I can't connect to the server.
when I connect to \\10.10.10.1\c$ with administrator rights then connection
to sqlserver (10.10.10.1) works.
What is wrong?
Remis
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Remis" <remiskaune@.kalnieciai.lt> schrieb im Newsbeitrag
news:OZpGYODaFHA.2900@.TK2MSFTNGP15.phx.gbl...
>I use connection string like that:
> server=10.10.10.1;uid=xuser;pwd=xpasword;database= xdatabase;Connection
> Timeout=60;Pooling=True;Min Pool Size=1;Max Pool Size=50
> And I can't connect to the server.
> when I connect to \\10.10.10.1\c$ with administrator rights then
> connection to sqlserver (10.10.10.1) works.
> What is wrong?
> Remis
>
|||Try to check out on what port your sqlserver is listening on and use this in
your connection string to connect to the server.Even the share c$ uses
another port than the sql server standard (or that you have defined) it
could be blocked by a firewall whereas the share access port isnt blocked.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Remis" <remiskaune@.kalnieciai.lt> schrieb im Newsbeitrag
news:OZpGYODaFHA.2900@.TK2MSFTNGP15.phx.gbl...
>I use connection string like that:
> server=10.10.10.1;uid=xuser;pwd=xpasword;database= xdatabase;Connection
> Timeout=60;Pooling=True;Min Pool Size=1;Max Pool Size=50
> And I can't connect to the server.
> when I connect to \\10.10.10.1\c$ with administrator rights then
> connection to sqlserver (10.10.10.1) works.
> What is wrong?
> Remis
>
Cant connect to sqlserver
server=10.10.10. 1;uid=xuser;pwd=xpasword;database=xdatab
ase;Connection
Timeout=60;Pooling=True;Min Pool Size=1;Max Pool Size=50
And I can't connect to the server.
when I connect to \\10.10.10.1\c$ with administrator rights then connection
to sqlserver (10.10.10.1) works.
What is wrong?
RemisHTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Remis" <remiskaune@.kalnieciai.lt> schrieb im Newsbeitrag
news:OZpGYODaFHA.2900@.TK2MSFTNGP15.phx.gbl...
>I use connection string like that:
> server=10.10.10. 1;uid=xuser;pwd=xpasword;database=xdatab
ase;Connection
> Timeout=60;Pooling=True;Min Pool Size=1;Max Pool Size=50
> And I can't connect to the server.
> when I connect to \\10.10.10.1\c$ with administrator rights then
> connection to sqlserver (10.10.10.1) works.
> What is wrong?
> Remis
>|||Try to check out on what port your sqlserver is listening on and use this in
your connection string to connect to the server.Even the share c$ uses
another port than the sql server standard (or that you have defined) it
could be blocked by a firewall whereas the share access port isnt blocked.
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Remis" <remiskaune@.kalnieciai.lt> schrieb im Newsbeitrag
news:OZpGYODaFHA.2900@.TK2MSFTNGP15.phx.gbl...
>I use connection string like that:
> server=10.10.10. 1;uid=xuser;pwd=xpasword;database=xdatab
ase;Connection
> Timeout=60;Pooling=True;Min Pool Size=1;Max Pool Size=50
> And I can't connect to the server.
> when I connect to \\10.10.10.1\c$ with administrator rights then
> connection to sqlserver (10.10.10.1) works.
> What is wrong?
> Remis
>
cant connect to SQL2K running on W2K3SVR but can connect to SQL2K running W2KSVR with same
I can't connect using an OLE DB connection string to SQL2K Server (SP3)
running on a Windows2003 Server, but using the same connection string (with
the address changed of course), I can connect to SQL2K Server (SP3) running
on Windows2000 Server.
I figure it must be a security issue on the W2K3 box. The logins and users
were created correctly with the correct passwords as I can connect to the
W2K3 box via Enterprise Manager just fine. The connection is set to TCP/IP
on port 1433 (default).
an example of my connection string (it is in a web application running on a
different server):
Application("dbconnstring") ="Provider=sqloledb;Data
Source=10.10.10.1;Network Library=DBMSSOCN;Initial Catalog=mydatabase;User
ID=mylogin;Password=mypassword;"
The only thing that changed is the IP address of the Win2003 server. I can
ping the server from either direction. I can scan port 1433 just fine with
a port scanner.
I am new to 2003 server, so I figure there must be a security setting
somewhere, but I haven't a clue where to look!
Any help would be appreciated!
TIA
Dave
.Hi Dave
> I can't connect using an OLE DB connection string to SQL2K Server (SP3)
> running on a Windows2003 Server, but using the same connection string
(with
> the address changed of course), I can connect to SQL2K Server (SP3)
running
> on Windows2000 Server.
> I figure it must be a security issue on the W2K3 box. The logins and
users
> were created correctly with the correct passwords as I can connect to the
> W2K3 box via Enterprise Manager just fine. The connection is set to
TCP/IP
> on port 1433 (default).
> an example of my connection string (it is in a web application running on
a
> different server):
> Application("dbconnstring") ="Provider=sqloledb;Data
> Source=10.10.10.1;Network Library=DBMSSOCN;Initial Catalog=mydatabase;User
> ID=mylogin;Password=mypassword;"
> The only thing that changed is the IP address of the Win2003 server. I
can
> ping the server from either direction. I can scan port 1433 just fine
with
> a port scanner.
> I am new to 2003 server, so I figure there must be a security setting
> somewhere, but I haven't a clue where to look!
>
Are you sure EM is connecting using TCP?
Can you connect locally using isql or isqlw to 127.0.0.1 ? (check that the
SQL Server client network utility on the server has TCP/IP as an enabled
protocol).
By port scanner, what do you mean? Are you scanning it on the server or from
outside the machine? Can you show that the server is listening on port 1433?
Check the SQL Server server network utility is listening on port 1433. Use
"netstat -a -n" (or "netsh interface ip show tcpconn") to look for an entry
like...
TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
Try telnetting to the port, eg "telnet 127.0.0.1 1433". If it's listening on
port 1433 you should get a blank telnet screen. If it's not you'll get an
error like "Connecting To 127.0.0.1...Could not open a connection to host on
port 1434 : Connect failed"
Try the above from a remote machine to see if there's an issue with
connecting remotely.
Run the SQL Server Profiler and check the Security Audit->Audit Login, Audit
Login Failed, Audit Logout events.
Kind Regards, Howard|||Hi again,
I tried telnetting both on the server and remotely and I get the blank
screen. The problem is OLE-DB does not work on Win2003. I can connect my
.Net apps just fine though through the SQL connector and Enterprise Manager.
I enabled DTC on the Win2003 box to see if that would help (but it did not
help, as I figured) and rebooted.
Somehow, OLE-DB requests are being blocked by a security setting deep within
the bowels of Windows 2003.
I must not be alone on this problem as a staff of MCSEs & MCDBAs are
scratching their heads at the hosting company (name withheld)!
Whilest I wait for them to figure it out, where in SQL profiler is the
"security audit"?
Dave
"dammit Jim, I'm just a country programmer!"
--
"Howard Long" <howard@.howardlongxxx.com> wrote in message
news:camggl$gqh$1@.sparta.btinternet.com...
> Hi Dave
> > I can't connect using an OLE DB connection string to SQL2K Server (SP3)
> > running on a Windows2003 Server, but using the same connection string
> (with
> > the address changed of course), I can connect to SQL2K Server (SP3)
> running
> > on Windows2000 Server.
> >
> > I figure it must be a security issue on the W2K3 box. The logins and
> users
> > were created correctly with the correct passwords as I can connect to
the
> > W2K3 box via Enterprise Manager just fine. The connection is set to
> TCP/IP
> > on port 1433 (default).
> >
> > an example of my connection string (it is in a web application running
on
> a
> > different server):
> >
> > Application("dbconnstring") ="Provider=sqloledb;Data
> > Source=10.10.10.1;Network Library=DBMSSOCN;Initial
Catalog=mydatabase;User
> > ID=mylogin;Password=mypassword;"
> >
> > The only thing that changed is the IP address of the Win2003 server. I
> can
> > ping the server from either direction. I can scan port 1433 just fine
> with
> > a port scanner.
> > I am new to 2003 server, so I figure there must be a security setting
> > somewhere, but I haven't a clue where to look!
> >
> Are you sure EM is connecting using TCP?
> Can you connect locally using isql or isqlw to 127.0.0.1 ? (check that the
> SQL Server client network utility on the server has TCP/IP as an enabled
> protocol).
> By port scanner, what do you mean? Are you scanning it on the server or
from
> outside the machine? Can you show that the server is listening on port
1433?
> Check the SQL Server server network utility is listening on port 1433. Use
> "netstat -a -n" (or "netsh interface ip show tcpconn") to look for an
entry
> like...
> TCP 0.0.0.0:1433 0.0.0.0:0 LISTENING
> Try telnetting to the port, eg "telnet 127.0.0.1 1433". If it's listening
on
> port 1433 you should get a blank telnet screen. If it's not you'll get an
> error like "Connecting To 127.0.0.1...Could not open a connection to host
on
> port 1434 : Connect failed"
> Try the above from a remote machine to see if there's an issue with
> connecting remotely.
> Run the SQL Server Profiler and check the Security Audit->Audit Login,
Audit
> Login Failed, Audit Logout events.
> Kind Regards, Howard
>|||"Dave" <dave(delete_this)@.miraclecatDELETETHISTOO.com> wrote in message
news:%23NhiEGuUEHA.2356@.TK2MSFTNGP10.phx.gbl...
> Hi again,
> I tried telnetting both on the server and remotely and I get the blank
> screen. The problem is OLE-DB does not work on Win2003. I can connect my
> .Net apps just fine though through the SQL connector and Enterprise
Manager.
> I enabled DTC on the Win2003 box to see if that would help (but it did not
> help, as I figured) and rebooted.
> Somehow, OLE-DB requests are being blocked by a security setting deep
within
> the bowels of Windows 2003.
> I must not be alone on this problem as a staff of MCSEs & MCDBAs are
> scratching their heads at the hosting company (name withheld)!
> Whilest I wait for them to figure it out, where in SQL profiler is the
> "security audit"?
When Profiler has opened, File->New->Trace, enter your details. In the
Events tab, add the Security Audit /Audit Login & Audit Login failed. The
trace will help you identify the fault.
I was wondering if it is trying to use integrated security to connect. Try
setting up an AD account mylogin/mypassword on the W2K3 server and retrying.
Alternatively it could be the other way around, and you are using SQL Server
authentication, in which case you should check that the login exists in SQL
Server.
Any error messages?
Regards, Howard
Can't connect to SQL Server Express 2005 using localhost in the connection string.
192-55-55-55\SQLEXPRESS.
Is there any way to configure it so I would be able to connect to it using
localhost?
Thank you,
VladTry using . (dot) as in .\SQLEXPRESS. localhost may or may not be
configured.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
> However it works perfectly if I specify the full server name like this
> 192-55-55-55\SQLEXPRESS.
> Is there any way to configure it so I would be able to connect to it using
> localhost?
> Thank you,
> Vlad
>|||Local host is set up properly, since I can use it in IE.
The idea is to avoid using a server instance name. Just an IP address.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ek4NI$OCHHA.4844@.TK2MSFTNGP02.phx.gbl...
> Try using . (dot) as in .\SQLEXPRESS. localhost may or may not be
> configured.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
> message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
>
Can't connect to SQL Server Express 2005 using localhost in the connection string.
192-55-55-55\SQLEXPRESS.
Is there any way to configure it so I would be able to connect to it using
localhost?
Thank you,
Vlad
Try using . (dot) as in .\SQLEXPRESS. localhost may or may not be
configured.
This posting is provided "AS IS" with no warranties, and confers no rights.
Use of included script samples are subject to the terms specified at
http://www.microsoft.com/info/cpyright.htm
"Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
> However it works perfectly if I specify the full server name like this
> 192-55-55-55\SQLEXPRESS.
> Is there any way to configure it so I would be able to connect to it using
> localhost?
> Thank you,
> Vlad
>
|||Local host is set up properly, since I can use it in IE.
The idea is to avoid using a server instance name. Just an IP address.
"Roger Wolter[MSFT]" <rwolter@.online.microsoft.com> wrote in message
news:ek4NI$OCHHA.4844@.TK2MSFTNGP02.phx.gbl...
> Try using . (dot) as in .\SQLEXPRESS. localhost may or may not be
> configured.
> --
> This posting is provided "AS IS" with no warranties, and confers no
> rights.
> Use of included script samples are subject to the terms specified at
> http://www.microsoft.com/info/cpyright.htm
> "Vlad Kryvokobylsky" <vlad.kryvokobylsky@.denovosoftware.com> wrote in
> message news:%23jqbiTOCHHA.4892@.TK2MSFTNGP04.phx.gbl...
>
Thursday, February 16, 2012
Can't connect to SQL Express 2005
I have a web app running on a laptop (for demo purposes) with the following connect string:
"datasource=<machine name>\SQLExpress;initial catalog=BlueTarp;User ID=sa;Password=xxx"
I can connect to this instance using both oSQL or sqlcmd and can select from the tables within BlueTarp, but my web app won't connect, and I can't figure out why!!
When I installed SQL Express, I used a named instance, called "SQLExpress".
I'm using mixed mode authentication.
One strange thing is that I can connect to either SQLExpress or MSSQLSERVER instances, but they appear to be the same instance -- I can use bluetarp in both.
when I use SQLExpress for instance name in web.config I get "SQL Server does not exist or access denied"
when I use MSSQLServer for instance name in web.config I get "Invalid connection"
And in fiddling with the web.config, I somehow did something to get a machine.config error, something like "machine.config couldn't be loaded because of an unloaded appdomain".
It's driving me nuts because I've spent a good 40 hours on this stupid problem, throwing the whole margin down the toilet.
Does anyone have any ideas?
Thank you,
Aarron
First, SQL Server has support for multiple protocols for remote connections (shared memory, named pipes, tcp/ip, and via) and if the client is trying a protocol the server has disabled then it will fail to connect.
To see what protocols are enabled, goto Computer Management -> SQL Server Configuration Manager -> SQL Server 2005 Network Configuration -> Protocols for <Instance Name>. If you change the protocols the server supports, you will need to restart the server.
Try using a protocol such as named pipes instead of shared memory. Try np:<machine name>.
http://msdn2.microsoft.com/en-US/library/system.data.sqlclient.sqlconnection.connectionstring(VS.80).aspx
For general troubleshooting of .NET connectivity issues, see this blog entry: http://blogs.msdn.com/sql_protocols/archive/2005/12/22/506607.aspx
For the ASP.NET issue, try restarting IIS/ASP.NET, and make sure machine.config is valid xml with the XML editor in Visual Studio.
|||Mark,
Thanks so much for your help. I've been all over the web trying to find info about this problem -- people have pointed me to Mcaffe, to the .NET frameworks possibly having issues, to my web.config being poorly formatted.... and it turns out that I wasn't using a supported protocol. I enabled named pipes and it works like a charm.
You da man!
Aarron
Sunday, February 12, 2012
Cant connect to database?
private DataSet hentVare()
{
string sql = "select * from vare";
string strForbindelse="server=localhost;trusted_connection=true;database=mericKebab;uid=ASLAN;password=;";
SqlConnection objConnect = new SqlConnection(strForbindelse);
SqlDataAdapter dataAdapter = new SqlDataAdapter(sql,objConnect);
DataSet dataSet = new DataSet();
dataAdapter.Fill(dataSet,"Vare");
return dataSet;
}
I get this error:
System.Data.SqlClient.SqlException: Cannot open database requested in login 'mericKebab'. Login fails. Login failed for user 'ASLAN\ASPNET'.
can someone plz help me with this?Since you are using trusted SQL Server connection and the IIS virtual directory is running under the ASPNET account the application is trying to connect using that account. Try changing the IIS virtual folder to a valid domain user account that has rights on the SQL Server database you are connecting or change the authentication to SQL Server authentication and give a valid User name and password.
For more on connection strings... Visit www.ConnectionStrings.com
Friday, February 10, 2012
Cant connect remotely to SQL Server
I just reinstalled SQL Server and after reattaching my databases, I can't connect remotely. If I use "localhost" in my connection string it works fine, but I can't register my remote Enterprise Manager this way.
I have looked around and made sure that my SQL Server installation has the same name as my computer and I checked the networks settings for SQl Server and it says it is using port 1433 (as expected?). I can't ping port 1433, nor can I connect if I put :1433 in the connection string (is that normal?) I am no network expert so I am not sure of the expected behaviours. I am digging through the Internet for a solution (Microsoft Support is a bit pricy to be anything but a last resort for us), but I thought I would ask here in case someone has a suggestion.
Any help is appreciated.
SP4 was not installed properly, so SQL Server was not listening on port 1433. All fixed now!