Tuesday, March 27, 2012
Can't get connected? Do everyone a favor...
a.. The version of SQL Server you're accessing. For example, SQL Server 2000, SP3.
b.. Are you accessing SQL Express via User Instance?
c.. Are you attempting to connect by opening/attaching an .MDF database?
d.. Have you configured your SQL Server instance to be visible to the network? What ports/protocols are enabled?
e.. Are you attempting to open a local instance of SQL Server on your own system or a remote instance on a network or WAN share.
f.. What type of connection are you attempting? For example, named instance ("myserver\myinstance"), or a TCP/IP, port connection.
g.. What authentication you're attempting: For example, Integrated Security or SQL Server authentication.
h.. What rights you have on the server and network. Is the user an admin or a simple user with limited rights?
i.. What rights do you have on the target database?
j.. What version of ADO or other data access interface are you using? Are you using COM-based ADO (which version?) or ADO.NET?
k.. What provider or driver are you using? SqlClient, SqlCe, OleDb, Odbc or something else?
l.. Is the application a Windows Forms, ASP.NET a web service or something else?
m.. What have you tried so far? Let's see your ConnectionString. Nope, don't show us your username or password.
n.. What exception message are you getting? Make sure you wrap your code in a Try/Catch block to trap the exception. If you're using ADO classic, send us as many errors as you can.
I also suggest reading one or more of the whitepapers, articles and books that deal with 99% of the issues encountered when trying to get connected. Might I suggest http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html or http://www.sqlmag.com/Articles/Index.cfm?ArticleID=38356. I also include an entire chapter on getting connected (to SQL Server) in my new books.
____________________________________
William (Bill) Vaughn
Author, Mentor, Consultant
Microsoft MVP
INETA Speaker
www.betav.com/blog/billva
www.betav.com
Please reply only to the newsgroup so that others can benefit.
This posting is provided "AS IS" with no warranties, and confers no rights.
__________________________________
Visit www.hitchhikerguides.net to get more information on my latest book:
Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
------
I have a 2k3 web v6 server and a 2k3 SQL2005-SP1 server.
I created a SQL2005 user login calendar so there would be an 'instance'
although that is confusing. ODBC works great.
Our web server is suppose to call the .mdf database via a connection
settings in a common.asp file.
Set values for the configuration variables
'--
Config_ServerURL = "http://10.70.1.223/vcalendar/"
Config_DBConnString = "Provider=SQLOLEDB.1;Persist Security
Info=False;Initial Catalog=;Data Source=//midb01/d$/sql"
Config_DBUser = "calendar"
Config_DBPassword = "password"
Config_DBType = "MSSQLServer"
CalendarIsInstalled = True
I setup a db user calendar associated with the login name. Set the db user
calendar to a schema that has connect rights only - tired full dbo which
didn't work either.
"William (Bill) Vaughn" wrote:
> If you can't get connected to SQL Server, you need to help us help you by providing the answers to as many of these questions as possible:
> a.. The version of SQL Server you're accessing. For example, SQL Server 2000, SP3.
> b.. Are you accessing SQL Express via User Instance?
> c.. Are you attempting to connect by opening/attaching an .MDF database?
> d.. Have you configured your SQL Server instance to be visible to the network? What ports/protocols are enabled?
> e.. Are you attempting to open a local instance of SQL Server on your own system or a remote instance on a network or WAN share.
> f.. What type of connection are you attempting? For example, named instance ("myserver\myinstance"), or a TCP/IP, port connection.
> g.. What authentication you're attempting: For example, Integrated Security or SQL Server authentication.
> h.. What rights you have on the server and network. Is the user an admin or a simple user with limited rights?
> i.. What rights do you have on the target database?
> j.. What version of ADO or other data access interface are you using? Are you using COM-based ADO (which version?) or ADO.NET?
> k.. What provider or driver are you using? SqlClient, SqlCe, OleDb, Odbc or something else?
> l.. Is the application a Windows Forms, ASP.NET a web service or something else?
> m.. What have you tried so far? Let's see your ConnectionString. Nope, don't show us your username or password.
> n.. What exception message are you getting? Make sure you wrap your code in a Try/Catch block to trap the exception. If you're using ADO classic, send us as many errors as you can.
> I also suggest reading one or more of the whitepapers, articles and books that deal with 99% of the issues encountered when trying to get connected. Might I suggest http://betav.com/blog/billva/2006/06/getting_and_staying_connected.html or http://www.sqlmag.com/Articles/Index.cfm?ArticleID=38356. I also include an entire chapter on getting connected (to SQL Server) in my new books.
> --
> ____________________________________
> William (Bill) Vaughn
> Author, Mentor, Consultant
> Microsoft MVP
> INETA Speaker
> www.betav.com/blog/billva
> www.betav.com
> Please reply only to the newsgroup so that others can benefit.
> This posting is provided "AS IS" with no warranties, and confers no rights.
> __________________________________
> Visit www.hitchhikerguides.net to get more information on my latest book:
> Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)
> and Hitchhiker's Guide to SQL Server 2005 Compact Edition (EBook)
> ------
>
Can't get connected to MSDE Remotely
register the instance in Enterprise Manager, and work with it locally on the
machine it is installed on but cannot get connected remotely. I get the
famous SQL Server does not exist or access is denied.
It is a named instance.
The security mode is set to SQL.
Network Protocols are enabled.
netstat tells me that it is listening on the correct port.
I'm logging in remotely as sa with the correct password.
Any help here would be appreciated.
Also for some reason the name of the server doesn't show up in the list in
Enterprise manager on the remote machine when trying to register the server.
I typed in the name of the server, the sa login and password, but still the
same error. Server doesn't exist or access is denied.
"jdehne" wrote:
> I have a problem getting connected to an instance of MSDE remotely. I can
> register the instance in Enterprise Manager, and work with it locally on the
> machine it is installed on but cannot get connected remotely. I get the
> famous SQL Server does not exist or access is denied.
> It is a named instance.
> The security mode is set to SQL.
> Network Protocols are enabled.
> netstat tells me that it is listening on the correct port.
> I'm logging in remotely as sa with the correct password.
> Any help here would be appreciated.
|||I have also tried adding the alias with the same port as MSDE is configured.
"jdehne" wrote:
[vbcol=seagreen]
> Also for some reason the name of the server doesn't show up in the list in
> Enterprise manager on the remote machine when trying to register the server.
> I typed in the name of the server, the sa login and password, but still the
> same error. Server doesn't exist or access is denied.
> "jdehne" wrote:
|||i have also noticed that when running osql -L on the remote machine the MSDE
instance does not show up.
"jdehne" wrote:
[vbcol=seagreen]
> I have also tried adding the alias with the same port as MSDE is configured.
> "jdehne" wrote:
|||Am Mon, 17 Oct 2005 15:06:03 -0700 schrieb jdehne:
[vbcol=seagreen]
> i have also noticed that when running osql -L on the remote machine the MSDE
> instance does not show up.
> "jdehne" wrote:
I can only guess:
a) TCP is enabled on the server but not on the client
b) connect doesn't work with servername but with server-IP
c) MDAC's are different versions
bye,
Helmut
|||hi,
jdehne wrote:
> i have also noticed that when running osql -L on the remote machine
> the MSDE instance does not show up.
try having a look at http://support.microsoft.com/kb/841251/en-us ,
http://support.microsoft.com/kb/841249/en-us
Andrea Montanari (Microsoft MVP - SQL Server)
http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
(my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
interface)
-- remove DMO to reply
|||I managed to figure it out. SP2 Secruity center was blocking the port and I
had add the sqlserver.exe to the list of programs that can get through the
firewall.
"Andrea Montanari" wrote:
> hi,
> jdehne wrote:
> try having a look at http://support.microsoft.com/kb/841251/en-us ,
> http://support.microsoft.com/kb/841249/en-us
> --
> Andrea Montanari (Microsoft MVP - SQL Server)
> http://www.asql.biz/DbaMgr.shtmhttp://italy.mvps.org
> DbaMgr2k ver 0.15.0 - DbaMgr ver 0.60.0
> (my vb6+sql-dmo little try to provide MS MSDE 1.0 and MSDE 2000 a visual
> interface)
> -- remove DMO to reply
>
>
Tuesday, March 20, 2012
CANT DROP DATABASE
replication ... I have checked replication and replication monitor there is
nothing there replicated to the database I want to delete. Where else can I
find replication info so that I know why it wont let me delete the database/Edgar,
Try
sp_removedbreplication 'databasename'
It may be true that the replication is removed properly but may be the
sequence seems to be wrong.Try deleting the subscriptions first, followed by
the publications.
--
Dinesh.
SQL Server FAQ at
http://www.tkdinesh.com
"Edgar Engibarian" <edgar@.bellcpa.com> wrote in message
news:O2Xo51xSDHA.2152@.TK2MSFTNGP12.phx.gbl...
> ok I got a database I cant drop because it says its connected with
> replication ... I have checked replication and replication monitor there
is
> nothing there replicated to the database I want to delete. Where else can
I
> find replication info so that I know why it wont let me delete the
database/
>
Monday, March 19, 2012
Can't display the report page from the Internet
Hi,
I am using SQL 2000 SP4 and Report Server SP2 on W2k3 SP1 Server.
I am having trouble displaying the report pages if I am connected from the Internet.
I have no problem if I am connected in the office (Intranet).
The frame that is not show is underneath the New Subscription bar in my report page. I can see everything above (header pages etc) and Home page etc.
I think for some reasons the request frame URL page is still https://myserver/Repor... instead https://myserver.mycompany.com/Report...
Thank's for any help
gogu
PS: Also I am able to deploy only from the Intranet with Target Server URL https://myserver/ReportServer
If I setup VS.NET deploy Target Server URL https://myserver.mycompany.com/ReportServer it comes up with "A connection could not be made ..."
If I open the Browser from the Intranet I can see the reports pages even if with https://myserver.mycompany.com/Reports...
but it ask me for Username / Password.
How can I tell VS.NET when deploy to use username/password?
I think I figure out this (PostID=499647);
I modified RSWebApplication.config see PostID=499647 above and reinstall SSL certificate with <FQDN>
What stupid think is that only the body of report page follows the key <ReportServerUrl> other frame pages are relative to browser URL?
Thursday, March 8, 2012
Can't create stored procedure with access 2003 when connected to SQL 2005
It tells me I may have to update a driver.
Where can I find this update and what is updated?
Thanks for the help.
More than likely you have a disconnect with the MDAC. You can download the latest version of that here:
http://msdn.microsoft.com/data/mdac/default.aspx
If that doesn't work out, you might need the SQL Server Native Client. You can find that here:
http://msdn.microsoft.com/data/sqlnative/default.aspx
Buck
Saturday, February 25, 2012
Can't create a new record using Access?
an Access project file connected to an SQL table. I used the Enterprise
Manager to create a simple table with only 3 fields. When I open the
database from the Tables section in Access it will not let me add a new
record. I tried looking at every possible option but I am stumped and none
of the books I have address this issue. Any suggestion would be greatly
appreciated.
Thanks,
Steve P.What does "not let me" mean? Do you get an error message? What is it?
"Steve P" <sprovoyeur@.cox.net> wrote in message
news:J3%Ib.17521$WQ3.11463@.lakeread05...
quote:
> Please forgive this basic question but I am just getting started. I am
using
quote:
> an Access project file connected to an SQL table. I used the Enterprise
> Manager to create a simple table with only 3 fields. When I open the
> database from the Tables section in Access it will not let me add a new
> record. I tried looking at every possible option but I am stumped and none
> of the books I have address this issue. Any suggestion would be greatly
> appreciated.
> Thanks,
> Steve P.
>
>
Friday, February 24, 2012
Can't connect using sa login and don't have any other administrator logins
I connected successfully in SQL Server Management studio using the 'sa' login and changed the authentication mode to Windows NT because I could not connect using my windows login but now I can't get any connection at all because 'sa' is no longer trusted.
I changed the loginmode registry setting to 2 and rebooted my PC but this has made no difference.
Can anyone help me get the 'sa' login back?
Unless you explicitly removed the default privileges (members of sysadmin) to builtin\Administrators, you should be able to connect to SQL Server using a Windows account that is member of the machine administrator s group.
NOTE: If you are using Windows Vista, you probably have UAC enabled, and you will need to use a full administrator token before connecting to SQL Server in the way I described above. You can use the right-click menu in Windows to “Run as Administrator” in order to get an unrestricted token before connecting to SQL Server.
Let us know if this information helped.
-Raul Garcia
SDE/T
SQL Server Engine
|||I am on Windows XP, the engine is SQL Server 2000 and I am using SQL Server 2005 Management Studio. The problem started when I upgraded the software we are developing to the latest version which I suspect may have removed the existing SQL Server logins which did have full rights. It also changed the login mode from Windows Authentication to System Administration. My big mistake was to change the mode back to Windows Authentication in SQL Server Management Studio before checking the other logins and it was then that the problems started. My windows username has administrative rights but I still couldn't connect to the server using windows login.
I tried just now changing the LoginMode in the registry back to 1 and starting windows again but I still can't log in with 'sa'. I did notice that the default user registry key is set to 'guest' but don't know if that makes any difference.
I think that I may have to resort to re-installing SQL Server 2005. I would prefer not to do that but It doesn't really matter if I lose my local database as I do have a copy of it elsewhere.
Can you think of any other solutions?
|||Try switching the LoginMode value in the registry to 2 (if I remember correctly, 2 should mean "Mixed mode"), restart SQL Server and try to connect with the SA login again.
-Raul Garcia
SDE/T
SQL Server Engine
|||Thanks, that worked perfectly.
FYI...
The reason it didn't work the first time is that I changed it in registry key:
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Microsoft SQL Server\MSSQL.2\MSSQLServer\LoginMode
which I assume is the key for SQL Server Management Studio 2005 but I didn't realise that there was another key, i.e.
HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\MSSQLServer\MSSQLServer\LoginMode
which would be for the SQL Server 2000 engine.
Anyway, I have learned my lesson now and am going to add my windows login.
cant connect to sql server, error
Do you already review the firewall for sql server ports?
http://support.microsoft.com/kb/287932/en
Sunday, February 12, 2012
Cant connect to database
Ok I have several sites on a server that have connected to databases on a different server for a long. Out of the blue today none of the sites on the server can connect to any databases on the other server. However, sites on other servers can connect to databases on the same db server.
This is the message I get:
An error has occurred while establishing a connection tothe server. When connecting to SQL Server 2005, this failure may becaused by the fact that under the default settings SQL Server does notallow remote connections. (provider: Named Pipes Provider, error: 40 -Could not open a connection to SQL Server)
The database server runs SQL Server 2000not2005 I can connect to the database from desktop (with an asp.net application or sql server management studio), I can ping the database server fine from the production web server, but my applications can't connect for some reason. There is nothing in the event log to suggest a problem, any ideas what could be causing this?
Take a look
http://www.microsoft.com/communities/newsgroups/en-us/default.aspx?dg=microsoft.public.dotnet.framework.adonet&tid=0eaef762-1a7e-4391-8377-10a4080aed40&p=1
||| I saw that in my searching, I don't have access to the production database server and it works fine from every other computer. The network people tell me everything on the firewall looks normal, so I think that means it has to be an issue with the web server, I'm just dumbfounded by why this would happen so suddenly.
Hi,
From your description, since other website server can connect to the database server, so it seems that the issue is not caused by database server side.
I don't know what kind of security mode you use in your connection string, you have mentioned that you were managed to connect to the database via enterprise manager, are you using SQL authentication? If you are using Integrated Security in your connection string, can you make sure if the account of your web server has the access right to the database server. If you assign your database's userid and password explicitly, can you make sure if the user has been listed in the Logins list of your database server?
Actually, in order to check the issue, you may deploy the application which can't connect to the database to another web server, and try to check if it can work. If it can, the problem should be caused by the settings of that web server.
Thanks.