SEARCHDATABASE.COM | Database Administrator Tips February 19, 2003 =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= FROM OUR SPONSOR:
Free database white papers http://searchdatabase.techtarget.com/whitepapers3/0,,sid13,00.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= IN THIS ISSUE | Table of Contents 1. DATABASE ADMINISTRATOR TIPS - DB2: Generating update statistics - SQL Server: Return all values in a comma-delimited string - Oracle: Move tables between tablespaces - SQL: Joining tables in SQL queries - More recent tips from members 2. IMPORTANT ANNOUNCEMENTS AND LINKS - Free webcasts: DB2 stored procedures, BI, and more... - Ask the experts: Your database questions answered - Featured Topic: Java versus .NET ___________________________________________________________________ ***************** Free database white papers ********************** Download the key papers you need today to make better-informed decisions. Targeted categories include: Data analysis and Business Intelligence; Data Security, Data Storage, Database Web Integration, and more. Click here to access the free SearchDatabase.com white papers section: http://searchdatabase.techtarget.com/whitepapers3/0,,sid13,00.html ******************************************************************* ___________________________________________________________________ THIS WEEK'S TIPS: GENERATING UPDATE STATISTICS | Chad Burdette This SQL script for DB2 UDB 7.2 will create a script for running full statistics on databases and provides an output file for updating statistics as needed. >> CLICK for the full tip... http://www.searchDatabase.com/tip/1,289483,sid13_gci874429,00.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= RETURN ALL VALUES IN A COMMA-DELIMITED STRING | P. Kulasingham This SQL Server script will return one big string with the rows separated by commas. When getting a set of rows of a field (any string type field), this script could be used to find the field names seperated by commas. >> CLICK for the full tip... http://www.searchDatabase.com/tip/1,289483,sid13_gci868972,00.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= MOVE TABLES BETWEEN TABLESPACES | Sergey Solodilov This Oracle script generates a script that moves tables from one tablespace to another. Also, it rebuildes indexes of these tables and makes analysis. The script can be fixed for a range of sizes for tables and size extents for new tables. >> CLICK for the full tip... http://www.searchDatabase.com/tip/1,289483,sid13_gci881048,00.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= JOINING TABLES IN SQL QUERIES | Ron Plew and Ryan Stephens Having the capability to select data from multiple tables is one of SQL's most powerful features. Without this capability, the entire relational database concept would not be feasible. This vendor-independent tip offers a few joining tips. >> CLICK for the full tip... http://www.searchDatabase.com/tip/1,289483,sid13_gci874692,00.html ___________________________________________________________________ MORE RECENT TIPS FROM SEARCHDATABASE MEMBERS: EXPORT ALL THE TABLES IN A GIVEN SCHEMA | Venkat Arikatla http://www.searchDatabase.com/tip/1,289483,sid13_gci875402,00.html This ksh script for DB2 UDB 7.2 will log into the database, find all the tables in the given schema, and dynamically create the export script and run it. The DATADIR will contain the latest .ixf and .txt files. FULL TEXT SEARCH WITH T-SQL STORED PROCEDURES | Eli Leiba http://www.searchDatabase.com/tip/1,289483,sid13_gci880154,00.html Enabling full text search in T-SQL is not as popular as doing it with the Enterprise Manager. Nonetheless, it can be useful in certain situations. Here are the steps to implement FTS in T-SQL. RETRIEVING OS/NETWORK USERNAMES FOR AUDIT TRAIL | K. Chennakeshav http://www.searchDatabase.com/tip/1,289483,sid13_gci874723,00.html An audit trail is often required to know who created a record and who updated it. A "SELECT NVL(user, SYS.login_user) FROM DUAL" query shows the database login account. The function below is helpful when the database login is not the same as the network/OS login, which may occur in applications that make JDBC/ODBC calls to the Oracle database. This function returns the network/OS login account username. Hundreds more free tech tips submitted by members: http://searchdatabase.techtarget.com/tips/0,289484,sid13_tax281808,00.html Share your knowledge, submit a tip, win a prize: http://searchdatabase.techtarget.com/tipsSubmit/1,289485,sid13,00.html ___________________________________________________________________ IMPORTANT LINKS: =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= FREE WEBCASTS | SearchDatabase.com >> Business intelligence with SQL Server http://searchDatabase.com/r/0,,10507,00.htm Microsoft's Bill Baker discusses best practices for implementing a SQL Server business intelligence solution on heterogeneous database systems. >> Impossible data warehouse situations http://searchdatabase.com/r/0,,10092,00.htm Experts Chuck Kelley and Sid Adelman discuss their personal experiences about the realities of data warehousing not covered in basic texts. >> Unraveling the complexities of DB2 stored procedures http://searchDatabase.com/r/0,,9873,00.htm Listen and learn as David Cohn of Themis Inc. provides an overview of DB2 stored procedures on OS/390, the mechanisms for using them, and the SQL/PSM language. >> DB2 test data management revolutionized http://search390.com/r/0,,10220,00.htm Learn how to perform more efficient testing and speed up development. Neal Lozins of SoftBase Systems takes an in-depth look into confronting the challenges associated with test data management. >> Dozens more high-quality webcasts: http://searchdatabase.techtarget.com/webcastsTranscripts/0,289709,sid13,00.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= YOUR TOUGH DATABASE QUESTIONS ANSWERED | Ask the Experts SQL Server: Using the IN operator in a WHERE clause http://www.searchDatabase.com/ateQuestionNResponse/0,289625,sid13_cid517389_tax285648,00.html Oracle: What values can be deduced from sys.dual? http://www.searchDatabase.com/ateQuestionNResponse/0,289625,sid13_cid517412_tax289342,00.html SQL: Orphan composite foreign keys http://www.searchDatabase.com/ateQuestionNResponse/0,289625,sid13_cid517381_tax285649,00.html DB2: Combining two queries into one http://www.searchDatabase.com/ateQuestionNResponse/0,289625,sid13_cid515725_tax285651,00.html Oracle: Searching for NULL values http://www.searchDatabase.com/ateQuestionNResponse/0,289625,sid13_cid517402_tax289341,00.html More expert answers here: http://searchdatabase.techtarget.com/ateExperts/0,289622,sid13,00.html =-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-= JAVA VERSUS .NET | SearchDatabase.com Featured Topic The battle for supremacy in the enterprise database development world has come down to two players: Java and .NET. Newbies and gurus alike will benefit from our collection of Java, J2EE, .NET, and C# resources inside... >> CLICK for our current Featured Topic... http://searchdatabase.techtarget.com/featuredTopic/0,290042,sid13_gci880531,00.html >> CLICK for previous Featured Topics... http://searchdatabase.techtarget.com/featuredTopics/0,290043,sid13,00.html ___________________________________________________________________ *********************SEARCHDATABASE CONTACTS*********************** TIP MAILBOX, (mailto:[EMAIL PROTECTED]) >> Submit your original tip here. TIM DICHIARA, Site Editor (mailto:[EMAIL PROTECTED]) >> Send your feedback and original articles. SARA CUSHMAN, Assistant Editor (mailto:[EMAIL PROTECTED]) >> Send your White Papers and favorite Web sites. ELLEN O'BRIEN, News Editor (mailto:[EMAIL PROTECTED]) >> Send your product announcements and poll ideas. TOM CLICK, Sales (mailto:[EMAIL PROTECTED]) >> Sponsor this or any other TechTarget newsletter. ___________________________________________________________________ :::::::::::::::::::: ABOUT THIS NEWSLETTER ::::::::::::::::::::: Published by TechTarget (http://www.techtarget.com) TechTarget - The Most Targeted IT Media Copyright 2003, All Rights Reserved. To unsubscribe from 'DBA Tips,' simply reply to this e-mail with REMOVE (all caps) within the Body or Subject or go to http://searchDatabase.techtarget.com/register, log in to edit your profile, click on the link to Edit email subscriptions, and uncheck the box next to the newsletter you wish to unsubscribe from. When finished, click "Save Changes to My Profile."