Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Monday, March 26, 2012

OH NO! Please help!

One of my IT guys "disabled" the "BUILTIN\Administrator" account in SQL
server and now we can't connect to the server using Enterprise Manager.
None of the other logins have administration privileges.
How can we either re-enable the account or get administrative access to
SQL server?
--DaveIf you are running in mixed security mode you can use sa.
Christian Smith
"Dave Navarro" <dave@.dave.dave> wrote in message
news:MPG.1a96f8a675e3bc62989785@.news-40.giganews.com...
> One of my IT guys "disabled" the "BUILTIN\Administrator" account in SQL
> server and now we can't connect to the server using Enterprise Manager.
> None of the other logins have administration privileges.
> How can we either re-enable the account or get administrative access to
> SQL server?
> --Dave|||In article <elZTG3m8DHA.2752@.TK2MSFTNGP09.phx.gbl>, csmith@.digex.com
says...
> If you are running in mixed security mode you can use sa.
Tried it and it didn't work.
I had already installed Service Pack 3, but I don't think it was 3a.
The knowledge base seems to indicate that re/installing the service pack
will enable/create the BUILTIN/Administrator account.
Is that correct?
--Dave|||Also, is it the BUILTIN\Administrator user or the BUILTIN\Administrators
group? If it is the user than the group should still be there unless
removed. What about the user that SQL is running under? Was it explicitly
given access or was it using the BUILTIN access?
"Dave Navarro" <dave@.dave.dave> wrote in message
news:MPG.1a96f8a675e3bc62989785@.news-40.giganews.com...
> One of my IT guys "disabled" the "BUILTIN\Administrator" account in SQL
> server and now we can't connect to the server using Enterprise Manager.
> None of the other logins have administration privileges.
> How can we either re-enable the account or get administrative access to
> SQL server?
> --Dave|||SP3 and SP3a are pretty much the same. 3a is only there if you couldn't get
3 to install. Which article said you the SP would fix this? Do you have a
link? Also, how did sa not work? What did you try to do? The
BUILTIN\Adminsitrators is completely different from SQL security model that
sa uses. If you have the password you should be able to access the system
using SA.
Christian Smith
"Dave Navarro" <dave@.dave.dave> wrote in message
news:MPG.1a96fd2a91bf5623989786@.news-40.giganews.com...
> In article <elZTG3m8DHA.2752@.TK2MSFTNGP09.phx.gbl>, csmith@.digex.com
> says...
> Tried it and it didn't work.
> I had already installed Service Pack 3, but I don't think it was 3a.
> The knowledge base seems to indicate that re/installing the service pack
> will enable/create the BUILTIN/Administrator account.
> Is that correct?
> --Dave|||http://support.microsoft.com/search/default.aspx?
InCC_hdn=true&Catalog=LCID%3D1033%26CDID%3DEN-US-KB%26PRODLISTSRC%
3DON&withinResults=&QuerySource=gASr_Query&Product=sql2k&Queryc=builtin%
5Cadministrator&Query=builtin%
5Cadministrator&KeywordType=ALL&maxResults=150
&Titles=false&numDays=&InCC=on
I looked over most of the articles in this query and almost every single
one of them says to install/re-install the service pack to fix security
problems.
My train of thought was to try it and see what happens...
I was able to get in using info from the following article:
http://www.microsoft.com/sql/techin...ration/May3.asp
We're back up and running now.
Thanks for taking the time to help, it's deeply appreciated.
--Dave
In article <eG76HDn8DHA.3404@.TK2MSFTNGP09.phx.gbl>, csmith@.digex.com
says...
> SP3 and SP3a are pretty much the same. 3a is only there if you couldn't g
et
> 3 to install. Which article said you the SP would fix this? Do you have
a
> link? Also, how did sa not work? What did you try to do? The
> BUILTIN\Adminsitrators is completely different from SQL security model tha
t
> sa uses. If you have the password you should be able to access the system
> using SA.
> Christian Smith
> "Dave Navarro" <dave@.dave.dave> wrote in message
> news:MPG.1a96fd2a91bf5623989786@.news-40.giganews.com...

Offline command hangs when I try to take database offline

Hi, I am relative newbie to SQLServer. When I try to take a user database offline, the query "hangs," with the query processing circle spinning. The Sharepoint 7 application is running on top of the Enterprise SQL Server 2005 db with several logins sleeping and awaiting commands. No errors are generated until I kill the offline command. Anyone have any ideas? Do I need to kill all the connections?Are there any users / connections to the database that you want to take offline? If so, you should ensure that these are disconnected first, as you cannot take a database offline until there are no outstanding connections.

Thanks,|||

Try "alter database <db> set restricted_user with rollback immediate" before setting it offline. This will terminiate user connections and rollback their transactions and only allow priviledged users to connect.

Monday, March 19, 2012

odbc-timeout error on a linked table from Access2k

Hi.
I have the problem that some records in a ms sqlserver table is unable
to update from Access.
I get the error message odbc-time out error in linked table.....
I tried to copy this table to another database, where none but me was
aktive.
And then it worked quit ok when I try to save the record.

I am thinking about if there is some trigger och restraint that I
don't know about, but I don't know how to se all of this in the
database.

I have changed the odbc-timeout settings in Access but that doesn't
seed to make any difference
So what's the problem?
Does anyone have an idea?
/regards BigOlle(olle@.ylm.se) writes:

Quote:

Originally Posted by

I have the problem that some records in a ms sqlserver table is unable
to update from Access.
I get the error message odbc-time out error in linked table.....
I tried to copy this table to another database, where none but me was
aktive.
And then it worked quit ok when I try to save the record.
>
I am thinking about if there is some trigger och restraint that I
don't know about, but I don't know how to se all of this in the
database.
>
I have changed the odbc-timeout settings in Access but that doesn't
seed to make any difference


Could be a blocking issue. You can check this in Query Analyzer by
running sp_who2. If there is a non-zero value in the Blk column,
that spid is blocking the spid on that line. With the rest of the
information from sp_who2, you may be able to identify the blocker.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx

Monday, March 12, 2012

ODBC/OLEDB support for HTTP-based comms to SQL server?

Does there exist an ODBC or OLEDB/ADODB driver for talking to SQL
server over HTTP/port 80?
In other words, I want to be able to issue SQL commands (INSERTs,
UPDATEs, SELECTs) from a client application to a database that happens
to be sitting on a server somewhere that I can only reach via HTTP
(https actually), due to firewall restrictions. I don't want to have
to modify my application, but note that it has the ability to use any
ODBC, ADO/OLEDB or a direct SQL native driver, depending on the
connection string supplied. I certainly don't want to have to care that
requests and results are being transmitted in XML SOAP format (or
whatever).
>From the various connection strings I've seen around, and the little
information I've seen regarding HTTP requests to SQL server, it
certainly isn't possible with the standard drivers etc. that Microsoft
supply, but if so, surely there's a demand for such a thing?
In article <1163482089.627876.121280@.h54g2000cwb.googlegroups .com>, wizofaus@.hotmail.com wrote:
>Does there exist an ODBC or OLEDB/ADODB driver for talking to SQL
>server over HTTP/port 80?
>In other words, I want to be able to issue SQL commands (INSERTs,
>UPDATEs, SELECTs) from a client application to a database that happens
>to be sitting on a server somewhere that I can only reach via HTTP
>(https actually), due to firewall restrictions. I don't want to have
>to modify my application, but note that it has the ability to use any
>ODBC, ADO/OLEDB or a direct SQL native driver, depending on the
>connection string supplied. I certainly don't want to have to care that
>requests and results are being transmitted in XML SOAP format (or
>whatever).
>information I've seen regarding HTTP requests to SQL server, it
>certainly isn't possible with the standard drivers etc. that Microsoft
>supply, but if so, surely there's a demand for such a thing?
>
You're not limited to http, you're limited to port 80
Just set SQL Server to listen on port 80, instead of the traditional 1433.
It sounds like this is at least partly internet accesible.
Be REAL careful about exposed SQL Servers on the net. There are a lot of
exploits...
|||Brian Bunin wrote:
> In article <1163482089.627876.121280@.h54g2000cwb.googlegroups .com>, wizofaus@.hotmail.com wrote:
> You're not limited to http, you're limited to port 80
> Just set SQL Server to listen on port 80, instead of the traditional 1433.
> It sounds like this is at least partly internet accesible.
No, because the firewall explicitly examines the packets to ensure they
are HTTP(S) packets only.
And actually I'd expect to use port 443.

> Be REAL careful about exposed SQL Servers on the net. There are a lot of
> exploits...
Well of course, but as it is the machine has open Terminal Service
access (of course you need a username and password ), so it's not
really less secure exposing another port for direct SQL server access.
The database doesn't hold particularly critical or sensitive data
anyway.
But SQL server *does* have (or at least, can support, along with IIS) a
web based interface...so why shouldn't I be able to talk to it without
caring that it is web-based or otherwise?
|||wizofaus@.hotmail.com wrote:
> Does there exist an ODBC or OLEDB/ADODB driver for talking to SQL
> server over HTTP/port 80?
> In other words, I want to be able to issue SQL commands (INSERTs,
> UPDATEs, SELECTs) from a client application to a database that happens
> to be sitting on a server somewhere that I can only reach via HTTP
> (https actually), due to firewall restrictions. I don't want to have
> to modify my application, but note that it has the ability to use any
> ODBC, ADO/OLEDB or a direct SQL native driver, depending on the
> connection string supplied. I certainly don't want to have to care that
> requests and results are being transmitted in XML SOAP format (or
> whatever).
> information I've seen regarding HTTP requests to SQL server, it
> certainly isn't possible with the standard drivers etc. that Microsoft
> supply, but if so, surely there's a demand for such a thing?
>
Have you considered creating some web methods?
That would allow you to consume and utilize SQL data over port 80, but
not open up your entire range of functions.
The Texeme Construct
http://you-read-it-here-first.com

ODBC/OLEDB support for HTTP-based comms to SQL server?

Does there exist an ODBC or OLEDB/ADODB driver for talking to SQL
server over HTTP/port 80?
In other words, I want to be able to issue SQL commands (INSERTs,
UPDATEs, SELECTs) from a client application to a database that happens
to be sitting on a server somewhere that I can only reach via HTTP
(https actually), due to firewall restrictions. I don't want to have
to modify my application, but note that it has the ability to use any
ODBC, ADO/OLEDB or a direct SQL native driver, depending on the
connection string supplied. I certainly don't want to have to care that
requests and results are being transmitted in XML SOAP format (or
whatever).
>From the various connection strings I've seen around, and the little
information I've seen regarding HTTP requests to SQL server, it
certainly isn't possible with the standard drivers etc. that Microsoft
supply, but if so, surely there's a demand for such a thing?In article <1163482089.627876.121280@.h54g2000cwb.googlegroups.com>, wizofaus@.hotmail.com wro
te:
>Does there exist an ODBC or OLEDB/ADODB driver for talking to SQL
>server over HTTP/port 80?
>In other words, I want to be able to issue SQL commands (INSERTs,
>UPDATEs, SELECTs) from a client application to a database that happens
>to be sitting on a server somewhere that I can only reach via HTTP
>(https actually), due to firewall restrictions. I don't want to have
>to modify my application, but note that it has the ability to use any
>ODBC, ADO/OLEDB or a direct SQL native driver, depending on the
>connection string supplied. I certainly don't want to have to care that
>requests and results are being transmitted in XML SOAP format (or
>whatever).
>information I've seen regarding HTTP requests to SQL server, it
>certainly isn't possible with the standard drivers etc. that Microsoft
>supply, but if so, surely there's a demand for such a thing?
>
You're not limited to http, you're limited to port 80
Just set SQL Server to listen on port 80, instead of the traditional 1433.
It sounds like this is at least partly internet accesible.
Be REAL careful about exposed SQL Servers on the net. There are a lot of
exploits...|||Brian Bunin wrote:
> In article <1163482089.627876.121280@.h54g2000cwb.googlegroups.com>, wizofa
us@.hotmail.com wrote:
> You're not limited to http, you're limited to port 80
> Just set SQL Server to listen on port 80, instead of the traditional 1433.
> It sounds like this is at least partly internet accesible.
No, because the firewall explicitly examines the packets to ensure they
are HTTP(S) packets only.
And actually I'd expect to use port 443.

> Be REAL careful about exposed SQL Servers on the net. There are a lot of
> exploits...
Well of course, but as it is the machine has open Terminal Service
access (of course you need a username and password ), so it's not
really less secure exposing another port for direct SQL server access.
The database doesn't hold particularly critical or sensitive data
anyway.
But SQL server *does* have (or at least, can support, along with IIS) a
web based interface...so why shouldn't I be able to talk to it without
caring that it is web-based or otherwise?|||wizofaus@.hotmail.com wrote:
> Does there exist an ODBC or OLEDB/ADODB driver for talking to SQL
> server over HTTP/port 80?
> In other words, I want to be able to issue SQL commands (INSERTs,
> UPDATEs, SELECTs) from a client application to a database that happens
> to be sitting on a server somewhere that I can only reach via HTTP
> (https actually), due to firewall restrictions. I don't want to have
> to modify my application, but note that it has the ability to use any
> ODBC, ADO/OLEDB or a direct SQL native driver, depending on the
> connection string supplied. I certainly don't want to have to care that
> requests and results are being transmitted in XML SOAP format (or
> whatever).
> information I've seen regarding HTTP requests to SQL server, it
> certainly isn't possible with the standard drivers etc. that Microsoft
> supply, but if so, surely there's a demand for such a thing?
>
Have you considered creating some web methods?
That would allow you to consume and utilize SQL data over port 80, but
not open up your entire range of functions.
The Texeme Construct
http://you-read-it-here-first.com

ODBC, SQL Server, "FOR XML" & Cursors error

Hi,


Has anybody had any luck using the Microsoft SQLServer ODBC drivers (Driver version: 03.81.9030, ODBC version : 03.52)

to connect to a SQL Server 2000 database and passing in a SELECT with a FOR XML clause. I keep

getting Error [Microsoft][ODBC SQL Server Driver][SQL Server]The FOR XML clause is not allowed in a CURSOR statement

., State: 42000, Error: 6819.

Is there a work around (eg putting the select in a stored procedure) or am I missing something ?

I am using SQLExecDirect() to execute the statement.

Or could any one suggest a better way to retrieve data from a standard table in XML formated string?


Please Help!!If you are using a cursor or a loop (it may actually work in a loop, but methinks NOT), then create a stored procedure that contains just SELECT...FOR XML AUTO/RAW/whatever. But I don't see a point doing that because further processing of the data retrieved in XML format within a stored procedure is not supported. Check this site for general guidelines on using FOR XML clause:

http://msdn.microsoft.com/library/default.asp?url=/library/en-us/xmlsql/ac_openxml_0alh.asp

ODBC vs OLEDB driver for SQLserver

Hi:
Which is the preferable driver to connect to the latest SQLServer
(SQL2000) ?
I have an application written in vb6, some of the data entry screen
hang (but most of the time it work perfectly), we have to clear off all
the sql connection from Enterprise manager and relogin into the system
again.
Is it because the driver we used (ODBC driver) cause the problem ?
because another application which use OLEDB driver has no problem at
all.
Any idea ?
Thanks
JCVoonHi
Look at the following page:
http://msdn.microsoft.com/data/mdac/default.aspx?pull=/library/en-us/dnmdac/html/data_mdacroadmap.asp
OLE DB is the newer technology over ODBC.
If you screens hang, check for clocking when this is occurring (run sp_who2
in Query Analyzer) to see what is going on. You might have one user blocking
another user.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jcvoon" <jcvoon_99@.yahoo.com> wrote in message
news:1128133741.955485.315030@.o13g2000cwo.googlegroups.com...
> Hi:
> Which is the preferable driver to connect to the latest SQLServer
> (SQL2000) ?
> I have an application written in vb6, some of the data entry screen
> hang (but most of the time it work perfectly), we have to clear off all
> the sql connection from Enterprise manager and relogin into the system
> again.
> Is it because the driver we used (ODBC driver) cause the problem ?
> because another application which use OLEDB driver has no problem at
> all.
> Any idea ?
> Thanks
> JCVoon
>|||Mike Epprecht
Thanks for the reply.
I'm not SQL expert, can u please tell me when one user will block
another user ?
Regards
JCVoon

ODBC vs OLEDB driver for SQLserver

Hi:
Which is the preferable driver to connect to the latest SQLServer
(SQL2000) ?
I have an application written in vb6, some of the data entry screen
hang (but most of the time it work perfectly), we have to clear off all
the sql connection from Enterprise manager and relogin into the system
again.
Is it because the driver we used (ODBC driver) cause the problem ?
because another application which use OLEDB driver has no problem at
all.
Any idea ?
Thanks
JCVoon
Hi
Look at the following page:
http://msdn.microsoft.com/data/mdac/...dacroadmap.asp
OLE DB is the newer technology over ODBC.
If you screens hang, check for clocking when this is occurring (run sp_who2
in Query Analyzer) to see what is going on. You might have one user blocking
another user.
Regards
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jcvoon" <jcvoon_99@.yahoo.com> wrote in message
news:1128133741.955485.315030@.o13g2000cwo.googlegr oups.com...
> Hi:
> Which is the preferable driver to connect to the latest SQLServer
> (SQL2000) ?
> I have an application written in vb6, some of the data entry screen
> hang (but most of the time it work perfectly), we have to clear off all
> the sql connection from Enterprise manager and relogin into the system
> again.
> Is it because the driver we used (ODBC driver) cause the problem ?
> because another application which use OLEDB driver has no problem at
> all.
> Any idea ?
> Thanks
> JCVoon
>
|||Mike Epprecht
Thanks for the reply.
I'm not SQL expert, can u please tell me when one user will block
another user ?
Regards
JCVoon

ODBC vs OLEDB driver for SQLserver

Hi:
Which is the preferable driver to connect to the latest SQLServer
(SQL2000) ?
I have an application written in vb6, some of the data entry screen
hang (but most of the time it work perfectly), we have to clear off all
the sql connection from Enterprise manager and relogin into the system
again.
Is it because the driver we used (ODBC driver) cause the problem ?
because another application which use OLEDB driver has no problem at
all.
Any idea ?
Thanks
JCVoonHi
Look at the following page:
http://msdn.microsoft.com/data/mdac...mdacroadmap.asp
OLE DB is the newer technology over ODBC.
If you screens hang, check for clocking when this is occurring (run sp_who2
in Query Analyzer) to see what is going on. You might have one user blocking
another user.
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"jcvoon" <jcvoon_99@.yahoo.com> wrote in message
news:1128133741.955485.315030@.o13g2000cwo.googlegroups.com...
> Hi:
> Which is the preferable driver to connect to the latest SQLServer
> (SQL2000) ?
> I have an application written in vb6, some of the data entry screen
> hang (but most of the time it work perfectly), we have to clear off all
> the sql connection from Enterprise manager and relogin into the system
> again.
> Is it because the driver we used (ODBC driver) cause the problem ?
> because another application which use OLEDB driver has no problem at
> all.
> Any idea ?
> Thanks
> JCVoon
>|||Mike Epprecht
Thanks for the reply.
I'm not SQL expert, can u please tell me when one user will block
another user ?
Regards
JCVoon

Friday, March 9, 2012

ODBC to SQL Server through DSN fails once in a while

Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.odbc:43808
Hello:
I have multiple ODBC connections to our SQL Server, and they are mostly
working well.
I have an issue once in a while with the connection when the DSN is not the
DSN used to create the linked table. For example, If the DSN is named the
same, but is connecting through IP address vs. Computer Name, the connection
will fail.
I just thought I'd post this to see if there are other similar situations,
maybe some ways around it?
Thanks,
Kyle
"Kyle McAdam" <kyle.mcadam@.sympatico.ca> wrote in message
news:Tw%dd.56921$JG5.927915@.news20.bellglobal.com. ..
> Hello:
> I have multiple ODBC connections to our SQL Server, and they are mostly
> working well.
> I have an issue once in a while with the connection when the DSN is not
the
> DSN used to create the linked table. For example, If the DSN is named the
> same, but is connecting through IP address vs. Computer Name, the
connection
> will fail.
> I just thought I'd post this to see if there are other similar situations,
> maybe some ways around it?
> Thanks,
> Kyle
In the DSN configuration, click Client Configuration and make sure TCP/IP is
checked as a protocol. You can also Alias a server name in this screen. I've
found that to work well.

ODBC to SQL Server through DSN fails once in a while

Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.odbc:43808
Hello:
I have multiple ODBC connections to our SQL Server, and they are mostly
working well.
I have an issue once in a while with the connection when the DSN is not the
DSN used to create the linked table. For example, If the DSN is named the
same, but is connecting through IP address vs. Computer Name, the connection
will fail.
I just thought I'd post this to see if there are other similar situations,
maybe some ways around it?
Thanks,
Kyle"Kyle McAdam" <kyle.mcadam@.sympatico.ca> wrote in message
news:Tw%dd.56921$JG5.927915@.news20.bellglobal.com...
> Hello:
> I have multiple ODBC connections to our SQL Server, and they are mostly
> working well.
> I have an issue once in a while with the connection when the DSN is not
the
> DSN used to create the linked table. For example, If the DSN is named the
> same, but is connecting through IP address vs. Computer Name, the
connection
> will fail.
> I just thought I'd post this to see if there are other similar situations,
> maybe some ways around it?
> Thanks,
> Kyle
In the DSN configuration, click Client Configuration and make sure TCP/IP is
checked as a protocol. You can also Alias a server name in this screen. I've
found that to work well.

Wednesday, March 7, 2012

odbc sql server driver timeout expired

Hi,

Has anyone ever had trouble using the query analyzer tool through a vpn
client? I'm able to connect outside of work to a sqlserver db on my
company lan with enterprise mgr, but the query analyzer times out every
time I try to connect from outside of work. Both utilities work fine at
work (no vpn tunnel).

The exact error is:

Unable to connect to server blahblahblah:
ODBC: Msg 0, Level 16, State 1
[Microsoft][ODBC SQL Server Driver] Timeout expired

I've tried increasing the sqlserver odbc driver's CPTimeout without success.

Appreciate any advice.
Eric"efinney" <efinney@.mitre.org> wrote in message
news:cjvgck$a1f$1@.newslocal.mitre.org...
> Hi,
> Has anyone ever had trouble using the query analyzer tool through a vpn
> client? I'm able to connect outside of work to a sqlserver db on my
> company lan with enterprise mgr, but the query analyzer times out every
> time I try to connect from outside of work. Both utilities work fine at
> work (no vpn tunnel).
> The exact error is:
> Unable to connect to server blahblahblah:
> ODBC: Msg 0, Level 16, State 1
> [Microsoft][ODBC SQL Server Driver] Timeout expired
> I've tried increasing the sqlserver odbc driver's CPTimeout without
> success.
> Appreciate any advice.
> Eric

Assuming there are no name resolution issues, then you need to make sure the
correct ports are open over the VPN:

http://support.microsoft.com/defaul...2&Product=sql2k

Simon|||Hi Eric

Can you do

Telnet <SQL Server's name or IP address> 1433

If it connects to port 1433 through VPN then it means your connection
is good then you can start diagnosing why you are getting timeouts,
perhaps slow connection or flakey VPN connection.

Regards

Shehzad

efinney <efinney@.mitre.org> wrote in message news:<cjvgck$a1f$1@.newslocal.mitre.org>...
> Hi,
> Has anyone ever had trouble using the query analyzer tool through a vpn
> client? I'm able to connect outside of work to a sqlserver db on my
> company lan with enterprise mgr, but the query analyzer times out every
> time I try to connect from outside of work. Both utilities work fine at
> work (no vpn tunnel).
> The exact error is:
> Unable to connect to server blahblahblah:
> ODBC: Msg 0, Level 16, State 1
> [Microsoft][ODBC SQL Server Driver] Timeout expired
> I've tried increasing the sqlserver odbc driver's CPTimeout without success.
> Appreciate any advice.
> Eric

Saturday, February 25, 2012

odbc select where parameters

Im enabling an apllication to use ODBC to connect to sqlserver which currently uses Oracle OCI, i have no prior knowledge about odbc use.
Im unsure how to approach where clause parameters (bind parameters)
ie Oracle OCI
select name into :name from emp where name = :a_name

via ODBC, connecting to sql server i'm attempting

select name from emp where name = ?

with,
sqlprepare
sqlbindparameter
sqlexecute
sqlbindcol
sqlfetch

all seems ok with sqlbindparameter, but sqlexecute fails with sqlstate 22001, String data, right truncation.
The question: can i use ? parameter in where conditions, if not whats the best approach.
Many Thanks.resolved. problem was oci doesnt require null terminated char string, odbc does

Monday, February 20, 2012

ODBC link across a vpn / WAN / internet link

Is it possible to achieve an ODBC link from a client pc to a remote SQL
server, either over a VPN / WAN or internet connection?
I'm looking to link a access front end to a SQL server, using a hosted
remote server.
TIA
Yes, it's possible and easy. However, the port 1433 (of the other one if
you set up the SQL-Server to listen to another port) must be open through
all firewalls; something that is easy to do on your side but less likely if
you are using an hosted server. For security purposes, most commercial web
hosting services will refuse to open the port 1433 through their firewall in
order to protect their sql-servers.
For OLEDB, make sure that you specify the TCP/IP protocol by indicating the
Network Library:
Provider=sqloledb;Data Source=190.190.200.100,1433;Network
Library=DBMSSOCN;Initial Catalog=myDataBase;User
ID=myUsername;Password=myPassword;
See: http://www.connectionstrings.com/?carrier=sqlserver or
http://www.carlprothman.net/Technology/ConnectionStrings/ODBCDSNLess/tabid/90/Default.aspx
For further explanations, take a look at the m.p.access.odbcclientsvr,
m.p.a.internet or m.p.a.externaldata newsgroups.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Fred" <fred@.blah.com> wrote in message
news:e7HoX4UQHHA.1364@.TK2MSFTNGP06.phx.gbl...
> Is it possible to achieve an ODBC link from a client pc to a remote SQL
> server, either over a VPN / WAN or internet connection?
> I'm looking to link a access front end to a SQL server, using a hosted
> remote server.
> TIA
>
>

ODBC link across a vpn / WAN / internet link

Is it possible to achieve an ODBC link from a client pc to a remote SQL
server, either over a VPN / WAN or internet connection?
I'm looking to link a access front end to a SQL server, using a hosted
remote server.
TIAYes, it's possible and easy. However, the port 1433 (of the other one if
you set up the SQL-Server to listen to another port) must be open through
all firewalls; something that is easy to do on your side but less likely if
you are using an hosted server. For security purposes, most commercial web
hosting services will refuse to open the port 1433 through their firewall in
order to protect their sql-servers.
For OLEDB, make sure that you specify the TCP/IP protocol by indicating the
Network Library:
Provider=sqloledb;Data Source=190.190.200.100,1433;Network
Library=DBMSSOCN;Initial Catalog=myDataBase;User
ID=myUsername;Password=myPassword;
See: http://www.connectionstrings.com/?carrier=sqlserver or
http://www.carlprothman.net/Technol...br />
ult.aspx
For further explanations, take a look at the m.p.access.odbcclientsvr,
m.p.a.internet or m.p.a.externaldata newsgroups.
Sylvain Lafontaine, ing.
MVP - Technologies Virtual-PC
E-mail: sylvain aei ca (fill the blanks, no spam please)
"Fred" <fred@.blah.com> wrote in message
news:e7HoX4UQHHA.1364@.TK2MSFTNGP06.phx.gbl...
> Is it possible to achieve an ODBC link from a client pc to a remote SQL
> server, either over a VPN / WAN or internet connection?
> I'm looking to link a access front end to a SQL server, using a hosted
> remote server.
> TIA
>
>

ODBC Isolation level

Hello Guys,

Is there any way I can set up the isolation level on the ODBC settings
I have a MFC application, it connects to the SQLServer 2000 , but I would like to set up the Isolation level to UR (uncommitted read), is this
possible ?

I have tried setting this up by means of the Query analyser but this only work during that session it does not affect any of the others connections to the database.

My app is a involves heavy OLTP transactions and I am performing a pseudo stress testing..

thank you for your helpIt is my understanding that this setting is per session. I asked our specialist the same question (dirty reads will do just fine here for our 'brochure' website but the default is read committed?) and was told that this setting was per session. (more later)|||Originally posted by Hollerith
It is my understanding that this setting is per session. I asked our specialist the same question (dirty reads will do just fine here for our 'brochure' website but the default is read committed?) and was told that this setting was per session. (more later)

hey thanks for your help, in the same topic
can you do this

selec foocolum from footable with (nolock) <-- is this correct

thanks

marcos oliva