<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-12949402</id><updated>2012-01-03T12:47:11.799-07:00</updated><title type='text'>SybaseBlog</title><subtitle type='html'>Let's talk about Sybase ASE and Transact-SQL.  I'll get the ball rolling by writing about my experiences, including things that I've learned that may be useful to others.  Then you can leave comments, or follow my links to read about other people's experiences with Sybase ASE.</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>26</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-12949402.post-117045877980437139</id><published>2007-02-02T16:21:00.000-07:00</published><updated>2007-02-02T16:26:19.816-07:00</updated><title type='text'>How to Solve Problems</title><summary type='text'>I received the following question from (presumably) a student."I had a doubt can you kindly clarify me, and if you can send me details it will really help me to understand better. Thanks for your time.Delete operation will be faster ina) All page lockingb) Data page lockingc) Data row locking"How would I find an answer to this question?  First of all, I would consult Sybase documentation.  It </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/117045877980437139/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=117045877980437139&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/117045877980437139'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/117045877980437139'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2007/02/how-to-solve-problems.html' title='How to Solve Problems'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-114901938618504969</id><published>2006-05-30T13:58:00.000-06:00</published><updated>2006-05-30T14:03:06.206-06:00</updated><title type='text'>Accepting Contributions</title><summary type='text'>Please send any contributions to me, and I will post them here on your behalf.  Check my profile for contact information.  There are limited options for Sybase professionals looking for information, and I'd be pleased to help in any way I can.  Sadly I have changed jobs recently and since I don't work with Sybase as much anymore, I will be contributing very little myself.In the mean time, visit </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/114901938618504969/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=114901938618504969&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/114901938618504969'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/114901938618504969'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2006/05/accepting-contributions.html' title='Accepting Contributions'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-113839486701258676</id><published>2006-01-27T13:44:00.000-07:00</published><updated>2006-01-27T13:47:47.026-07:00</updated><title type='text'>Join Optimization</title><summary type='text'>Tuning queries is a required skill for a Sybase specialist.  One of the many ways to tune a query is to make sure that the very best query plan is being used.  One clear advantage one plan may have over another is the join order that it uses when querying several tables.  This advantage can be based on such factors as the where clauses, the number of rows in the tables, how they are stored, and </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/113839486701258676/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=113839486701258676&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/113839486701258676'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/113839486701258676'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2006/01/join-optimization.html' title='Join Optimization'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>4</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-113459528199699149</id><published>2005-12-14T14:20:00.000-07:00</published><updated>2005-12-14T14:22:08.723-07:00</updated><title type='text'>Sybase and Perl</title><summary type='text'>Question: I've got a Perl script that collects information every night that I'd like to store in the database.  What is the simplest way to do that?Answer:  Well that depends which is easiest for you, there are many ways.The most pedestrian way using Perl:1. Output your SQL to a file.2. Use "system" (or back-ticks) to run a command on the shell, and within:3. Run "isql" to connect to the database</summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/113459528199699149/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=113459528199699149&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/113459528199699149'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/113459528199699149'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/12/sybase-and-perl.html' title='Sybase and Perl'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-113043710956910254</id><published>2005-10-27T12:18:00.000-06:00</published><updated>2005-10-27T12:18:29.583-06:00</updated><title type='text'>MS SQL Server vs Sybase ASE</title><summary type='text'>What is the difference between MS SQL Server and Sybase ASE?  Those that have seen both are probably struck by how similar they are.  Why are they so similar?Well, MS SQL Server gets it roots from Sybase.  In fact, the first version, MS SQL 4.2, was Sybase SQL Server 4.0, and was designed for OS/2.  The NT port came out a few years later.  The first version of MS SQL Server that was not based on </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/113043710956910254/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=113043710956910254&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/113043710956910254'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/113043710956910254'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/10/ms-sql-server-vs-sybase-ase.html' title='MS SQL Server vs Sybase ASE'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112795068332489912</id><published>2005-09-28T17:35:00.000-06:00</published><updated>2005-09-28T17:38:03.330-06:00</updated><title type='text'>Where 1=2</title><summary type='text'>Here is an SQL trick for beginners.Say you want to know the columns in a table.  You can run sp_help on that table, but here is another trick:1&gt; select * from tablename where 1=22&gt; goThis will come back with all the columns and no matching rows (because 1=2 is always false).  It will also come back very quickly because the optimizer knows there shouldn't be any matching rows.This can be </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112795068332489912/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112795068332489912&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112795068332489912'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112795068332489912'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/09/where-12.html' title='Where 1=2'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112725281248542135</id><published>2005-09-20T15:45:00.000-06:00</published><updated>2005-09-20T15:46:52.493-06:00</updated><title type='text'>String Truncation</title><summary type='text'>The other day I was asked what happens when you provide a string that is too long to a table or stored procedure parameter.  Rather than guess, that sounds like an easy thing to test.create table atable (stringvar varchar(5))goinsert into atable values ("too long")goselect * from atablegostringvar --------- too l So it would appear as if the string is silently truncated.  Step two is to </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112725281248542135/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112725281248542135&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112725281248542135'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112725281248542135'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/09/string-truncation.html' title='String Truncation'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112568266176607353</id><published>2005-09-02T11:37:00.000-06:00</published><updated>2005-09-02T11:37:41.773-06:00</updated><title type='text'>DDL in Stored Procedures</title><summary type='text'>SQL is kind of a misnomer.  "Structured Query Language" is used for more than just queries.Often, SQL is broken up in DDL, DCL and DML.  DML, Data Manipulation Language, includes queries (SELECT) but also includes manipulation, like inserts and updates.DDL is Data Definition Language, and includes modifying the structures of tables and so on.Which brings us to the question I received.  Is it </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112568266176607353/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112568266176607353&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112568266176607353'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112568266176607353'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/09/ddl-in-stored-procedures.html' title='DDL in Stored Procedures'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112499000490393833</id><published>2005-08-25T11:11:00.000-06:00</published><updated>2005-08-25T11:13:24.910-06:00</updated><title type='text'>Constraints vs Rules</title><summary type='text'>Most organisations take data integrity very seriously.  Indeed, it is Codd's 10th rule of relational data management.  So the question isn't whether or not to manage the integrity of your data, but rather "how".In most situations, I advocate managing the integrity of your data at the server level, as opposed to the application or procedure level.  Using the server's data integrity is generally </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112499000490393833/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112499000490393833&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112499000490393833'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112499000490393833'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/08/constraints-vs-rules.html' title='Constraints vs Rules'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112490338394508314</id><published>2005-08-24T11:07:00.000-06:00</published><updated>2005-08-24T11:09:43.956-06:00</updated><title type='text'>Compute</title><summary type='text'>You have a table of client contracts and you want to know the sum of the value of those contracts by customer.  First let's set up our sample data.create table ClientContracts (client_name varchar(32), work_detail varchar(32), amount money)insert into ClientContracts values ("Johnson Autobody", "04AB Engine", 4000.00)insert into ClientContracts values ("Johnson Autobody", "TL7 Axel", 325.00)</summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112490338394508314/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112490338394508314&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112490338394508314'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112490338394508314'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/08/compute.html' title='Compute'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112362721262084317</id><published>2005-08-09T16:25:00.000-06:00</published><updated>2005-08-09T16:40:12.626-06:00</updated><title type='text'>Getting Help with Sybase ASE</title><summary type='text'>In a previous blog, I mentioned some of the key documents and tools that many Sybase ASE professionals would have available.http://sybasease.blogspot.com/2005/07/sybase-survival-pack.htmlIn this post, I am going to expand on this somewhat and talk about where you can go to find the solutions to your Sybase ASE problems.Understandably, the very first place you should look is with Sybase's </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112362721262084317/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112362721262084317&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112362721262084317'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112362721262084317'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/08/getting-help-with-sybase-ase.html' title='Getting Help with Sybase ASE'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112137453159347633</id><published>2005-07-14T14:53:00.000-06:00</published><updated>2005-08-02T11:43:16.806-06:00</updated><title type='text'>NULL is not nothing</title><summary type='text'>There is a big difference between NULL and nothing.  I will demonstrate one notable difference with a simple example.First, create a table that allows NULLs and has a default valuecreate table test_table (col_a int default 0 null, col_b int null)goNow let's try inserting these rows:1. A row where we assign neither value:insert into test_table values ()goselect * from test_tablegocol_a       col_b</summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112137453159347633/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112137453159347633&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112137453159347633'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112137453159347633'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/07/null-is-not-nothing.html' title='NULL is not nothing'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-112077777631219505</id><published>2005-07-07T17:07:00.000-06:00</published><updated>2005-08-02T11:43:49.766-06:00</updated><title type='text'>Sybase Survival Pack</title><summary type='text'>There are a lot of great resources on Sybase, and you can see some of them among my links.  But there are some utilities/documents that are so valuable that I burn them on a CD and carry a copy with me.  1. SQSHI have nothing against isql.  But SQSH (SQL-Shell, developed by Scott Gray) allows you to edit previous statements (even far back in your history), use variables, among many other things.</summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/112077777631219505/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=112077777631219505&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112077777631219505'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/112077777631219505'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/07/sybase-survival-pack.html' title='Sybase Survival Pack'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111904139385457629</id><published>2005-06-17T14:49:00.000-06:00</published><updated>2005-06-17T14:49:53.856-06:00</updated><title type='text'>Copying a database</title><summary type='text'>Warning: this is a VERY simplistic overview.Today I had to grab a database on one system and put it up on another: structure, data and all.  Here are the basic steps (refer to Sybooks for more detailed information):1. On the base machine, dump the database1&gt; use master2&gt; go1&gt; dump database fk6_5_latest_release to "/tmp/db_name.dmp"2&gt; goThis will create some messages.2. Move the dump file to the </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111904139385457629/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111904139385457629&amp;isPopup=true' title='2 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111904139385457629'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111904139385457629'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/06/copying-database.html' title='Copying a database'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>2</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111896039028226997</id><published>2005-06-16T16:19:00.000-06:00</published><updated>2005-06-16T16:19:50.286-06:00</updated><title type='text'>Select 8 from [Table]</title><summary type='text'>QUESTION:I think there's a database corruption.  The table is there, and I can insert rows without error, but when I select everything from the table all I get is this! -----------           8           8           8           8           8           8           8           8(8 rows affected)What is going on, do we have a virus?ANSWER:Sorry it took me so long to answer, but it took me awhile to </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111896039028226997/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111896039028226997&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111896039028226997'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111896039028226997'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/06/select-8-from-table.html' title='Select 8 from [Table]'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111876830174366245</id><published>2005-06-14T10:57:00.000-06:00</published><updated>2006-08-22T16:28:58.910-06:00</updated><title type='text'>Deadlocks in Sybase ASE</title><summary type='text'>Normally deadlock information is written to the Sybase error log.  However, that may not include enough information for your analysis.  You can enable more information to be written to the error log using the "print deadlock information" parameter.1&gt; sp_configure "print deadlock information" 12&gt; goThis parameter should be disabled after the detailed information has been collected because this </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111876830174366245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111876830174366245&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111876830174366245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111876830174366245'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/06/deadlocks-in-sybase-ase.html' title='Deadlocks in Sybase ASE'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111868373557474696</id><published>2005-06-13T11:27:00.000-06:00</published><updated>2005-06-13T11:28:55.576-06:00</updated><title type='text'>Exclusive OR (XOR)</title><summary type='text'>QUESTION:Hello Techies,Can you let me know on which situation the below type of queries are used.SELECT f1.parent_id , f2.child_id    FROM PortfolioTreeFlat f1 , PortfolioTreeFlat f2    WHERE f1.child_id = Pparent_id and f2.parent_id = Pchild_id ;Is this an "exclusive or"?ANSWER:- Given a child and a parent,- Give me all parents of that child,- Crossed with all children of that parentBasically, </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111868373557474696/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111868373557474696&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111868373557474696'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111868373557474696'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/06/exclusive-or-xor.html' title='Exclusive OR (XOR)'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111712121651809774</id><published>2005-05-26T09:26:00.000-06:00</published><updated>2005-05-26T09:26:56.516-06:00</updated><title type='text'>On Vacation</title><summary type='text'>I start my vacation tomorrow.  The next update will be June 13th.  Please enjoy the 8 posts from the last 2 weeks, and comments are welcome.</summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111712121651809774/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111712121651809774&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111712121651809774'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111712121651809774'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/on-vacation.html' title='On Vacation'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111712113540059002</id><published>2005-05-26T09:21:00.000-06:00</published><updated>2005-05-26T09:25:35.403-06:00</updated><title type='text'>Optimizing Sybase Queries and Stored Procedures</title><summary type='text'>This is meant for technical specialists, not DBAs, although some of the information obtained can be passed onto DBAs for server-level tuning.This is also not a step-by-step or a "how to," is it instead a collection of tools that can be used to find and resolve common performance issues.Basics:How to log your resultsisql -P password -e -i input_file -o outputfileisql -P password &lt; input_file &gt; </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111712113540059002/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111712113540059002&amp;isPopup=true' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111712113540059002'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111712113540059002'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/optimizing-sybase-queries-and-stored.html' title='Optimizing Sybase Queries and Stored Procedures'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111706189818816323</id><published>2005-05-25T16:57:00.000-06:00</published><updated>2005-06-10T08:26:09.080-06:00</updated><title type='text'>Investigating Locks</title><summary type='text'>I had a colleague come across a situation where an investigation of a performance issue revealed blocking in the database, but wasn't sure how to investigate further.The first step is usually to execute sp_who.1&gt; sp_who2&gt; goThis will list all the tasks and what they are doing.  Some of them may be waiting on locks being use by another task.  This task will also be in the list, and will helpfully </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111706189818816323/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111706189818816323&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111706189818816323'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111706189818816323'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/investigating-locks.html' title='Investigating Locks'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111697708849776675</id><published>2005-05-24T17:23:00.000-06:00</published><updated>2005-08-02T11:45:45.806-06:00</updated><title type='text'>Sybase ASE Glossary</title><summary type='text'>Recently I had a client with a tricky database performance issue.  So I read the Sybase Performance and Tuning Guide.  It is an excellent document, but very long (1000 pages).  I think it explains basically everything you need to know about performance and tuning:http://sybooks.sybase.com/onlinebooks/group-as/asg1250e/ptallbkWhile I read this guide, I made note of a number of confusing terms I </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111697708849776675/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111697708849776675&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111697708849776675'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111697708849776675'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/sybase-ase-glossary.html' title='Sybase ASE Glossary'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111660917774228874</id><published>2005-05-20T11:12:00.000-06:00</published><updated>2005-08-02T11:46:30.676-06:00</updated><title type='text'>Dynamic SQL</title><summary type='text'>I got the following question this past week from a colleague.QUESTION:Is there a way to query a field by having it as a variable?ExampleSybase isql prompt:declare @var varchar(20)@var="param_0"select @var from MyTable where @var &lt;&gt; NULLANSWER:Yes, it is possible.  Incidentally, this is called "Dynamic SQL."  That basically means any SQL code that is generated on the fly (ie. dynamically), as </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111660917774228874/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111660917774228874&amp;isPopup=true' title='1 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111660917774228874'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111660917774228874'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/dynamic-sql.html' title='Dynamic SQL'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>1</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111652735611092891</id><published>2005-05-19T12:27:00.000-06:00</published><updated>2005-08-02T11:47:21.296-06:00</updated><title type='text'>Propagating Session-Level Parameters</title><summary type='text'>I received a question on parallelism, and even after reviewing sections 24 and 25 of the Sybase Performance Tuning Guide, it still called for a testhttp://sybooks.sybase.com/onlinebooks/group-as/asg1250e/ptallbkI have a stored procedure that calls 20 others.  I want to set the parallel degree to 1 for this stored procedure, and everything it calls.  This works fine if I set it in isql before </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111652735611092891/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111652735611092891&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111652735611092891'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111652735611092891'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/propagating-session-level-parameters.html' title='Propagating Session-Level Parameters'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111643265216159245</id><published>2005-05-18T10:10:00.000-06:00</published><updated>2005-05-18T10:20:49.906-06:00</updated><title type='text'>Variables in Cursors</title><summary type='text'>You can use variables in cursor declarations, along these lines:1. declare a cursor, using a variable2. open that cursor, and use it3. close that cursor4. change the variable used in the declaration5. open the cursor, and use it6. close that cursor(repeat 4-6 as you wish)Here is an example.dump tran sybsystemprocs with truncate_onlygouse sybsystemprocsgo-- prepare the testsif exists (select * </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111643265216159245/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111643265216159245&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111643265216159245'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111643265216159245'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/variables-in-cursors.html' title='Variables in Cursors'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111635164582437948</id><published>2005-05-17T11:34:00.000-06:00</published><updated>2005-05-18T10:19:07.086-06:00</updated><title type='text'>Scoping in T-SQL</title><summary type='text'>Is there scoping in T-SQL? Actually ... no, not really.The term "scope" refers to the time or place that the value of a declared variable is accessible. Normally variables declared in a loop, for instance, are not available outside that loop.In T-SQL, a local variable is available basically anywhere in the stored procedure. There are also global variables, which endure beyond the session and can </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111635164582437948/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111635164582437948&amp;isPopup=true' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111635164582437948'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111635164582437948'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/scoping-in-t-sql.html' title='Scoping in T-SQL'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-12949402.post-111627977671303240</id><published>2005-05-16T15:37:00.000-06:00</published><updated>2005-05-16T15:52:59.753-06:00</updated><title type='text'>NULLs in Sybase ASE</title><summary type='text'>Here is where my story begins. For potential performance reasons, I was trying to change a "where" clause that looked like this:ta.b &amp; isnull (tb.b, ta.b) = isnull (tb.b, ta.b)to one that looked like this:ta.b &amp; tb.b = tb.b(ta and tb are different tables)But I wasn't sure if this would work if tb.b was null. Would ta.b &amp; null = null? So I did this test:declare @a intdeclare @b intselect @a = </summary><link rel='replies' type='application/atom+xml' href='http://sybasease.blogspot.com/feeds/111627977671303240/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=12949402&amp;postID=111627977671303240&amp;isPopup=true' title='4 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111627977671303240'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/12949402/posts/default/111627977671303240'/><link rel='alternate' type='text/html' href='http://sybasease.blogspot.com/2005/05/nulls-in-sybase-ase.html' title='NULLs in Sybase ASE'/><author><name>Robert Vollman</name><uri>http://www.blogger.com/profile/08275044623767553681</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='28' height='32' src='http://bp2.blogger.com/_hoghde2FwwU/RsNa5XdI0iI/AAAAAAAAADs/5_r3B0__HKM/s320/rbv.jpg'/></author><thr:total>4</thr:total></entry></feed>
