Want to win a PS4? Go Premium and enter to win our High-Tech Treats giveaway. Enter to Win

x
?
Solved

sybase nolock

Posted on 2009-05-11
13
Medium Priority
?
6,519 Views
Last Modified: 2012-08-13
I am reading data from a sybase server and im causing a few issues. I want to know if there is a way to pull the data without locking the table? like to nolock command in sql server.
0
Comment
Question by:9772885
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 5
  • 3
  • 3
  • +1
13 Comments
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24352965
0
 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24352972
Sybase and SQL Server almost have same set of commands till SQL Server 2000 and Sybase versions till that.

Anyhow FYI, Nolock is discontinued from SQL Server 2005 onwards.
0
 

Author Comment

by:9772885
ID: 24352989
Im pulling my data from sybase into SQL Server 2000 using a linked server. My code looks like this

select * from openquery(LinkServer,'select * from sybasetable WITH( NOLOCK )')


however i am getting an error

[OLE/DB provider returned message: [Native Error code: 156]
[DataDirect ADO Sybase Provider] Incorrect syntax near the keyword 'WITH'.
]
OLE DB error trace [OLE/DB Provider 'Sybase.ASEOLEDBProvider' IColumnsInfo::GetColumnsInfo returned 0x80004005:   ].
Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'Sybase.ASEOLEDBProvider' reported an error.  
0
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
LVL 57

Expert Comment

by:Raja Jegan R
ID: 24353008
Try using without WITH (NOLOCK) keywords and tell me the results.

Kindly check whether the login used for Linked Server Creation has select rights on that table.
0
 
LVL 19

Expert Comment

by:grant300
ID: 24354385
How about we start with the Sybase product (there are at least 4) and the complete version (e.g. ASE 12.5.3).

My guess is that you are using ASE, not ASA which is why the ASA-only "NOLOCK" qualifier is not working.

Regards,
Bill
0
 

Author Comment

by:9772885
ID: 24355243
The database is ASE is a nolock commend possible?
0
 
LVL 19

Expert Comment

by:grant300
ID: 24357693
No.  NOLOCK is not supported by ASE.

What version of ASE?
Do a "SELECT @@version" and post the results.

Regards,
Bill
0
 

Author Comment

by:9772885
ID: 24357723
i tried that but got this error. Im not sure if its because i only have acces via a linked server?


OLE DB error trace [OLE/DB Provider 'Sybase.ASEOLEDBProvider' IColumnsInfo::GetColumnsInfo returned 0x80004005:  The provider did not give any information about the error.].
Msg 7399, Level 16, State 1, Line 3
OLE DB provider 'Sybase.ASEOLEDBProvider' reported an error. The provider did not give any information about the error.
0
 
LVL 19

Expert Comment

by:grant300
ID: 24357920
Hmmm.  If you can't get something simple like SELECT @@version" to work, I am guessing there is something wrong with your linked server / OLE DB setup.

You will have to go straight to the server to get the version information.

What kind(s) of thing(s) are you doing that are causing locks on the table(s)?

Also, what is the overall project requirement?  It may be possible to do something that doesn't have all the limitations and issues associated with a linked server.

Regards,
Bill
0
 

Author Comment

by:9772885
ID: 24373026
version 15

i have a page on noholdlock but im not sure how the syntax would go in my query

http://infocenter.sybase.com/help/index.jsp?topic=/com.sybase.dc20021_1251/html/locking/locking88.htm
0
 

Author Comment

by:9772885
ID: 24373073
dotn worry ive sorted it. noholdlock at the ed of the table name.

resolved. thank you for your input people
0
 

Accepted Solution

by:
ee_auto earned 0 total points
ID: 24646015
Question PAQ'd, 500 points refunded, and stored in the solution database.
0

Featured Post

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

If something goes wrong with Exchange, your IT resources are in trouble.All Exchange server migration processes are not designed to be identical and though migrating email from on-premises Exchange mailbox to Cloud’s Office 365 is relatively simple…
Explore the ways to Unlock VBA Project Password Excel 2010 & 2013 documents. Go through the article and perform the steps carefully to remove VBA Excel .xls file.
In this video you will find out how to export Office 365 mailboxes using the built in eDiscovery tool. Bear in mind that although this method might be useful in some cases, using PST files as Office 365 backup is troublesome in a long run (more on t…
Are you ready to place your question in front of subject-matter experts for more timely responses? With the release of Priority Question, Premium Members, Team Accounts and Qualified Experts can now identify the emergent level of their issue, signal…
Suggested Courses

618 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question