rp.sgi.com!mew.corp.sgi.com!pablo
Subject: Sybase FAQ: 1/16 - index
Date: 1 Aug 1997 06:00:25 GMT
Summary: Info about SQL Server, bcp, isql and other goodies
Posting-Frequency: monthly

Archive-name: databases/sybase-faq/part1
URL: http://reality.sgi.com/pablo/Sybase_FAQ

   Sybase Frequently Asked Questions supported by Silicon Graphics 
   
   _version 2.6 released 4/16/97_
     _________________________________________________________________
   
  Keyword and Phrase Search
  
   Enter search words/phrases: ____________________ ___ Ignore case?
   Help!
   
     _________________________________________________________________
   
  Index of Sections
     * Section 0: Acknowledgements & What's New in this Release
     * Section 1: SQL Server Administration
     * Section 2: User Database Administration
     * Section 3: DBCC's
     * Section 4: isql
     * Section 5: bcp
     * Section 6: SQL Fundamentals
     * Section 7: SQL Advanced
     * Section 8: Performance and Tuning
     * Section 9: Shareware
     * Section 10: Sybase Technical News
     * Section 11: Web Links
     * Section 12: Miscellany
       
   
     _________________________________________________________________
   
   To get a text version of this FAQ:
   
     ftp://sgigate.sgi.com/pub/Sybase_FAQ/FAQ_txt.Z [435K]
     
   To get the HTML for this FAQ:
   
     ftp://sgigate.sgi.com/pub/Sybase_FAQ/FAQ_html.tar.Z [563K]
     
   
     _________________________________________________________________
   
   
   
  SQL Server Administration
  
   1.1) How do I start/stop SQL Server when the CPU reboots?
   1.2) How do I clear a log suspend'ed connection?
   1.3) What's the best value for cschedspins?
   1.4) What traceflags are available?
   1.5) How do I use traceflags 5101 and 5102?
   1.6) What is cmaxpktsz good for? see also Q1.8
   1.7) How do I move tempdb off of the master device?
   1.8) What do all the parameters of a a buildmaster -d -yall mean?
   1.9) How do I correct timeslice -201?
   1.10) What is a SQL Server anyway?
   1.11) The how's and why's on becoming a Certified Sybase Professional
   (CSPDBA)?
   1.12) RAID and Sybase
   1.13) How to swap a db device with another
   1.14) Server naming and renaming
   1.15) How can I tell the datetime my Server started?
   1.16) Raw partitions or regular files?
   
     _________________________________________________________________
   
   
   
  User Database Administration
  
   2.1) Shrinking varchar(m) to varchar(n)
   2.2) Frequently asked questions on Table partitioning 2.3) How do I
   turn off marked suspect on my database?
   2.4) How do I manually drop a table?
   2.5) Why not create all my columns varchar(255)?
   2.6) What's a good example of a transaction?
   2.7) What's a natural key?
   2.8) Making a Stored Procedure invisible
   2.9) Saving space when inserting rows monotonically
   2.10) How to compute database fragmentation
   2.11) Tasks a DBA should do...
   2.12) How to implement database security
   
     _________________________________________________________________
   
   
   
  DBCC's
  
   3.1) How do I set TS Role in order to run DBCC ...?
   3.2) What are some of the hidden/trick DBCC commands?
   3.3) The unauthorized DBCC list with doco - see Q11.15
   3.4) Fixing a Munged Log
   
     _Performing any of the above may_ corrupt your SQL Server. Please do
     _not_ call Sybase Technical Support after screwing up your SQL
     Server. Remember, _always_ take a dump of the master database and
     any other databases that are to be affected.
     
   
     _________________________________________________________________
   
   
   
  isql
  
   4.1) How do I hide my password using isql?
   4.2) How do I remove row affected and/or dashes when using isql?
   4.3) How do I pipe the output of one isql to another?
   
     _________________________________________________________________
   
   
   
  bcp
  
   5.1) How do I bcp null dates?
   5.2) Can I use a named pipe to bcp/dump data out or in?
   5.3) How do I exclude a column?
   
     _________________________________________________________________
   
   
   
  SQL Fundamentals
  
   6.1) Are there alternatives to row at a time processing?
   6.2) When should I execute an sp_recompile?
   6.3) What are the different types of locks and what do they mean?
   6.4) What's the purpose of using holdlock?
   6.5) What's the difference between an _update in place_ versus a
   _deferred update_? - see Q8.9
   6.6) How do I find the oldest open transaction?
   6.7) How do I check if log truncation is blocked?
   6.8) The timestamp datatype
   6.9) Stored Procedure Recompilation and Reresolution
   
     _________________________________________________________________
   
   
   
  SQL Advanced
  
   7.1) _deleted due to copyright hassles by the publisher_
   7.2) How to implement if-then-else within a select-clause.
   7.3) _deleted due to copyright hassles by the publisher_
   7.4) How to pad with leading zeros an int or smallint.
   7.5) Divide by zero and nulls. 7.6) Convert months to financial
   months. 7.7) Hierarchy traversal - BOMs. 7.8) Is it possible to call a
   UNIX command from within a stored procedure or a trigger?
   
     _________________________________________________________________
   
   
   
  Performance and Tuning
  
   8.1) What are the nitty gritty details on Performance and Tuning?
   8.2) What is best way to use temp tables in an OLTP environment?
   8.3) What's the difference between clustered and non-clustered
   indexes?
   8.4) Optimistic versus Pessimistic locking?
   8.5) How do I force an index to be used?
   8.6) Why place tempdb and log on low numbered devices? 
   8.7) Have I configured enough memory for my SQL Server?
   8.8) Why should I use stored procedures?
   8.9) I don't understand showplan's output, please explain.
   8.10) Poor man's sp_sysmon.
   8.11) View MRU-LRU procedure cache chain. 8.12) Improving Text/Image
   Type Performance
   8.13) SyBooks Performance and Tuning, see Q11.20
   
     _________________________________________________________________
   
   
   
  Shareware
  
   9.1) sp_freedevice - lists device, size, used and free.
   9.2) sp_whodo - augments sp_who by including additional columns: cpu,
   I/O...
   9.3) SQL and sh(1)to dynamically generate a dump/load database
   command.
   9.4) SybPerl - Perl interface to Sybase.
   9.5) dbschema.pl - SybPerl script to take a logical snap of a
   database.
   9.6) Sybtcl - TCL interface to Sybase.
   9.7) Augmented system stored procedures.
   9.8) Examples of Open Client and Open Server programs -- see Q11.11.
   9.9) SQL to determine the space used for an index.
   9.10) xsybmon - an X interface to sp_monitor
   9.11) sp_dos - This procedure graphically displays the scope of a
   object
   9.12) sqsh - a superset of dsql with local variables, redirection,
   pipes and all sorts of goodies.
   9.13) sp_getdays - returns days in current month.
   9.14) ddl_insert.pl - creates insert DDL for a table.
   9.15) sp_ddl_create_table - creates DDL for all user tables in the
   current database
   9.16) int.pl - converts interfaces file to tli
   9.17) How to access a SQL Server using Linux
   
     _________________________________________________________________
   
   
   
  Sybase Technical News
  
   10.1.1) Volume 3, Number 2
   10.1.2) Volume 3, Number 3
   10.1.3) Volume 3, Number 4
   10.2.1) Volume 4, Number 1
   10.2.2) Volume 4, Number 2
   10.2.3) Volume 4, Number 3
   10.2.4) Volume 4, Number 4
   10.3.1) Volume 5, Number 1
   10.3.2) Special Supplement -- Migration to System 11
   10.3.3) Volume 5, Number 2
   10.3.4) Volume 5, Number 3
   10.3.5) Volume 5, Number 4
   10.4.1) Volume 6, Number 1
   
     _________________________________________________________________
   
   
   
  Web Links
  
   11.1) http://sybase.pnl.gov:2080/Sybase/.Sybase.html
   11.2) http://paella.med.yale.edu/topics/database.html
   11.3) http://www.acs.ncsu.edu:80/Sybase
   11.4) http://www.alaska.net/~pacrim/sybase.html
   11.5) Sybase's Replication Server link.
   11.6) Sybase's third-party Applications
   11.7) Sybase's Online Books - sybooks
   11.8) Sybase's third-party bibliography
   11.9) Sybase's White Papers
   11.10) Sybase's Performance Tips
   11.11) Sybase's Open Client, Open Server and other examples
   11.12) Sybase Freeware and Shareware http://www.tiac.net/users/sqltech
   11.13) ftp://sgigate.sgi.com/pub/Sybase_FAQ/Thawleyhndout.ppt.ps.Z
   [3670K]
   11.14) http://www.sybase.com/products/system11/S11_FAQ.html
   11.15) http://members.aol.com/huntleyad/dbccinfo.htm
   11.16) BusinessObjects FAQ - http://www.upenn.edu/da/bo/busob-faq.html
   11.17) Intro to Sybase Architecture -
   http://www2.dgsys.com/~dcasug/sybintro/intro.html
   11.18) Sybase Scheme Extensions -
   http://www.cs.indiana.edu/scheme-repository/ext.html
   11.19) Ontario Sybase User Group (OSUG) Website -
   http://www.interlog.com/~osug
   11.20) Sybase's SyBooks Performance and Tuning
   11.21) Sybase's Technical Support Technical Information Library
   
   The mother ship may be reached at http://www.sybase.com
     _________________________________________________________________
   
   
   
  Miscellany
  
   12.1) What can Sybase IQ do for me?
   12.2) Net-review of Sybase books
   12.3) email lists
   
     _________________________________________________________________
   
   
   
    Acknowledgements ...
    
   Thanks to all the folks in comp.databases.sybase who have made this
   FAQ possible. Furry instance, this release has two minor contributions
   by me (although admining the thing can be a nightmare at times!) and
   the rest has come from folks on the net and at Sybase. I've
   degenerated into a brain stem. Add a little water and I'm your chia
   pet.
   
   Please mail pablo@sgi.com any changes, comments, complaints and/or
   disagreements and I will respond in due time. Heck I may even fix
   them.
   
   Please abide by the following and include it if redistributing the
   Sybase FAQ:
   
     _Do not use this information for profit but do_ share it with
     anyone.
     
   
   
   So who is this guy?
   
   [IMAGE]
   Since 11/04/96 10.00AM MST
     _________________________________________________________________
   
    Hall of Fame
    
   The following people have made the _Sybase FAQ Hall of Fame_. Partly
   because Sybase refuses to acknowledge the good work that these people
   have done for _their_ product and sales but most importantly because
   they have done it for us!
     * Michael Peppler (mpeppler@bix.com) - author of SybPerl and
       provider of awesome support.
     * Scott Gray (gray@voicenet.com) - author of sqsh and
       ultra-responsive developer. The best tool this side of the Ozarks.
       
   
     _________________________________________________________________
   
    What's New in this Release?
     * Reorganization of Section 10 so that text posting of FAQ is in
       smaller bite-sized chunks. Also went to the Sybase Archives and
       pulled out all the Tech News.
     * Q12.3 - a whole bunch of email lists.
     * Q1.16 - the raw partition lo down
     * Steve Etchelecu (steve.etchelecu@sunquest.com) - Q3.2 - submitted
       information on _dbcc tune()_
     * Martin Moessel (mm@sybase.com) - Q9.16 - My version was too
       "slow." :-) Hey, what's best for the group is what I say!
     * Richard Leyton (rleyton@acm.org) - Q12.2 - Add CJ Date's book
     * Richard Leyton (rleyton@acm.org) - Q1.13 - Moving data from one
       device to another device
     * Greg Lindahl (lindahl@deshaw.com) - Q2.10 - How to compute
       database fragmentation
     * Greg Thain (thain@ntdev1.sunquest.com) - QQ9.17 - How to access
       SQL Server with Linux
     * Pummy Laul (plaul@sybase.com) - Q1.7 and Q3.4 - Presented warnings
       from Sybase Technical Support's point of view
     * Stephen F. Doherty (doherty@itginc.com) - Q1.4 - Gave us s'more
       traceflgs. Thx! and also suggested that I note which traceflags
       are configurable. He was kinda enuf to list which were (made my
       job easier!)
     * Ira D. Rosen (idr@mail.transleasing.com) - Q3.2 - dbcc
       setkeepalive(). Thx!
     * Anthony Mandic - Move Q4.3 to become Q5.2 and Q5.2 to become Q4.3.
       Ugh! I must had a brain fade that day...
     * Anthony Mandic - Q8.12 - added some more information on text/image
       types
     * David Whitmarsh (david.whitmarsh@dial.pipex.com) - Q3.2 - gave us
       dbcc listoam. Thx!
     * Q2.11 - Things a DBA should do. Here's a list of things a DBA
       ought to do. Your input, as always, is welcome.
     * Yann Courtel (Yann.Courtel@edipresse.ch) - Q6.7 - Questioned
       Q6.7... it was wrong! I fixed it.
     * David Whitmarsh (david.whitmarsh@dial.pipex.com) - Q1.4 and Q8.7 -
       traceflag 311; suggested link to Q8.11
     * anonymous - Q3.2/Q1.4 - dbcc engine, dbcc cursorinfo, dbcc tune
       options; traceflags: 1206, 4012, 4020, 1605, 3500
     * Karen Paulsell (karenp@sybase.com) - Q11.20 - SyBooks' P&T link.
       Of course!
     * Heidi Voltmer (heidi.voltmer@sybase.com) - Sybase WebLinks - Thx
       for the updates! ... and for Q11.21
     * Willard Dawson (wdawson@bsat.com) - Q9.5 - Provided an unmunged
       version of dbschema.pl. Thx!
     * Simon Walker (siwalker@cix.compulink.co.uk) -
       Q6.8/Q6.9/Q1.14/Q2.12/Q1.15 - pretty much wrote 'em all up... I
       did some _slight_ modifications - boy when he contributes he
       _contributes!_
       
   
     _________________________________________________________________
-- 
Pablo Sanchez              | Ph # (415) 933.3812        Fax # (415) 933.2821
pablo@sgi.com              | Pg # (800) 930.5635  -or-  pablo_p@corp.sgi.com
===============================================================================
I am accountable for my actions.   http://reality.sgi.com/pablo [ /Sybase_FAQ ]
