Showing posts with label win. Show all posts
Showing posts with label win. Show all posts

Monday, March 19, 2012

Connection lost

I'm running an access application on my local server (SQL Server 2000)
On my win 2000 it worked perfectly.
On my win XP, I always get this error message :
3151: ODBC--Connection to 'MyODBC' Failed.
This happens when I want to run a procedure that fills a table with records
from other tables. There's a lot of Select in this code but always on the
same recordset. Many loops. I see my record number going fast in the bottom
of the screen but it always stops at 207. When I do it in debug, no
problem... can't find where's the problem.
I allowed the maximum quantity of memory for SQL Server (512) and I have 2
Go of memory on my computer.
Help please!
StephSteph,
First, the memory issue. If your host computer has 2 GB of memory, and there
are no other significant applications using the computer, SQL Server should
NOT be limited to 512 MB. With Enterprise Manager, check the max memory
setting for the server and check the box to allow SQL to Dynamically manage
the memory. -AND, it doesn't sound as though your issue is related to
memory. (But if you are running MSDE or SQL Express on your desktop
computer, that it a different issue.)
Second, your Access application probably 'should' be using an OLEDB (or ADO)
connection instead of ODBC.
Third, it is extremely poor use of SQL Server to be using 'Many loops' in a
procedure. SQL Server handles data in sets -and very fast and efficiently.
We 'should' not step through data one row at a time.
If you were to post your code to one of the Access newgroups, someone may be
able to help you in making it fast and efficient.
Arnie Rowland, Ph.D.
Westwood Consulting, Inc
Most good judgment comes from experience.
Most experience comes from bad judgment.
- Anonymous
"Stephen" <smarcoux@.cbgi.qc.ca> wrote in message
news:Oapt9$7uGHA.1296@.TK2MSFTNGP02.phx.gbl...
> I'm running an access application on my local server (SQL Server 2000)
> On my win 2000 it worked perfectly.
> On my win XP, I always get this error message :
> 3151: ODBC--Connection to 'MyODBC' Failed.
> This happens when I want to run a procedure that fills a table with
> records from other tables. There's a lot of Select in this code but always
> on the same recordset. Many loops. I see my record number going fast in
> the bottom of the screen but it always stops at 207. When I do it in
> debug, no problem... can't find where's the problem.
> I allowed the maximum quantity of memory for SQL Server (512) and I have 2
> Go of memory on my computer.
> Help please!
> Steph
>

Thursday, March 8, 2012

Connection failed to local SQL server

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

Connection failed to local SQL server

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

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

Connection failed to local SQL server

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

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

connection failed - ODBC from remote SQL SERVER

hello,
im trying to create an ODBC data source from a SQL SERVER 2005 database located in a remoted pc.
Client---->PC1 : win 2000 sp4, not sql server
Remote server-->PC2 : win 2000 sp4, sql server 2005 express

From the Command Prompt, im typing "ping PC2" successfully.
After, in the ODBC datasource administrator-->System DNS tab, i choose "sql server" as a new data source , and in the server box , i'm typing PC2/SQLEXPRESS.

In the next steps, im typing the user-passwords.
The error :
connection failed
...
[microsoft][odbc sql server driver][named pipes]ConnectionOpen(CreateFile()).
Connection failed:
SQLState: '08001'
..
Client unable to establish connection

What goes wrong?
I follow the same steps locally, and everything is OK.

Sorry for my bad english:cool:Here's an article (http://blogs.msdn.com/sql_protocols/archive/2006/03/23/558651.aspx) on troubleshooting connectivity issues on SQL Server Express.|||SQL 2005 does not support the Named Pipes protocol by default. I would choose a different protocol, preferably TCP/IP. You can set the protocol using the Client Configuration button on the second screen of the DSN definition in the ODBC DSN applet.

-PatP

Friday, February 17, 2012

Connecting Win 2000 Server to a Win 98 machine

I am stumped. I am trying to fix this for a client. My client is running a Win 2000 Server with MSDE. She is networked to a Win 98SE machine.
I can ping both computers, and I can use a UDL file to test connection on the Server and it works, but I try to use the UDL file on the Win 98 machine to connect to the DB on the Server and I get a error message:

DBNET LIB (Connection Open) Speicfy Server Not Found.

I have checked the Cliconfig on the 98 box and the port number is the same as the Server. What should I do? Does MSDE and Win 98 only work on a system to system basis? Or does she just need to update to a Win XP or 2000 Pro.You may want to check the MDAC level on the Win98 machine. I think anything before MDAC 2.5 was unable to find instances of SQL 2000, which is how MSDE usually installs.

Sunday, February 12, 2012

Connecting to SQL SERVER over the Internet comes up with access denied error

I have set up an MSDE SQL Server in my Win XP Pro PC and am able to connect to it on the host PC, and over my LAN. However, when I try to connect to it over the Internet my connection is refused with the following message:
SQL server does not exist or access denied. ConnectionOpen (Connect())
Some background:
I have router/NAT firewall and have opened port 1433 (I have even tried a DMZ to the SQL Server machine). The Router is definitely going to the SQL Server PC! I am fairly certain that the connection string is correct.
Any help would be most gratefully received.

Try connecting to the SQL Server from your web server and make sure you can connect from there. If not, you will need to get a dedicated connection the server.
Are you using an aliased connection name for the server like DBServer or something instead of the IP? If so, make sure it is in DNS or your web servers host file.

Nick|||

Hi

Sorry for the delay... Had to shoot off elsewhere... Does this mean I have to have web services up and running on the PC that is hosting the SQL Database?

Thanks

Paul

|||

It Depends. How are your web pages connecting to your sql server? Do you have 2 seperate boxes, one for web site other for sql server, or is it all on one server? Can you show your connection string to your server (remove the user name password info)?

Nick

|||

Currently done have a web server at all! I am just trying to connect to the SQL database using an internet connection. I can use either a direct IP or NO-IP.com to connect to the PC. Its once I'm on the PC that I get kicked out by the SQL server.

Thanks

Paul

|||

It sounds like you can make a connection to the server, but cant get authorization into the server? Try this:

Start>Control Panel>Admin Tools>Data Sources(ODBC)>System DSN>Add>SQL Server.
In the name, enter anything you want. For the server, enter the IP address and click next. Depending on how you connect (either with windows NT or SQL Server info into the machine, you will need to check the corresponding radio button. If you use NT and a different user name for SQL, uncheck the checkbox and enter your credentials and click next. If something is incorrect, it will tell you here. If not, you can make a good connection to your server. Let me know what it returns.
Nick

|||

Hi! i'm having the same issue as Paul. I added the new datasource and it came up with this error:
Microsoft SQL Server ODBC Driver Version 03.85.1025

Running connectivity tests...

Attempting connection
[Microsoft][ODBC SQL Server Driver][TCP/IP Sockets]SQL Server does not exist or access denied.

TESTS FAILED
i'm doing everything through NT auth and i'm on 2 servers. My work won't allow me to have an IIS and a SQL server on the same machine.
Any help would be great! thanks
Joel

|||The Network configuration of SQL Server can be accessed at the Server properties in Enterprise Manager, if you don't have access tell who have access to configure it. Let me explain you are connecting to SQL Server through either Named Pipes, NWLink IPX/SPX, Apple Talk, Banya Vine and VIA but not TCP/IP so you or who have access have to make the changes in the Network Configuration section of Enterprise Manager. Hope this helps.

Friday, February 10, 2012

Connecting to SQL Server 2k5 Dev Edition

I recently removed my June CTP version of SS2k5 and installed the release developer version on a 2 proc server with Win Server 2003 SP1 (I'll call this machine Server), and suddenly I cannot connect to this box over our network. I have SS2k5 Dev Edition installed on my local machine (WinXP, and I'll call this machine Local), and was able to connect to the CTP version on the server with no problems. Now, not only can I not connect (or see the server through the network browse) to the Server from Local, nor can I connect or see my Local from the Server. I used the Surface Area Configuration tool to allow TCP/IP and Named Pipe connections (Local was set to local only connections, but was working fine to and from the CTP version of the Server), but to no avail.

Are there any other settings that I should look at? I'm working a bit in the dark here.

Thank you,

NoelHi Noel,

So I understand the problem you're experiencing, let me restate the problem. :)

On SERVER, which is Windows Server 2003 SP1, you have SQL 2005 Dev RTM.
On LOCAL, which is Windows XP SP2, you also have SQL 2005 Dev RTM.

When you say you "cannot see" SERVER from LOCAL or LOCAL from SERVER, what do you mean? Can you PING LOCAL from SERVER and vice versa by name? by IP?

Did you run the Surface Area Configurator on both machines and ensure Local + Remote access was enabled? After enabling TCP\IP and Named Pipes on LOCAL, did you stop and restart the service (this has to be done for the service to start listening on those protocols)?

jeff.|||Also, if your instance name is a named instance you'll need to start the SQL Browser service. If the Windows Firewall is enabled you'll need to add exceptions for sqlservr.exe and sqlbrowser.exe. To find the path to the correct SQL Server executable check out the "Path to executable" in the Windows Service Control Manager for the SQL Server service.

This blog for SQL Server Express is also relevant for Dev edition: http://blogs.msdn.com/sqlexpress/archive/2005/05/05/415084.aspx

Dan