oracle sql*plus set &spool½éÉÜ(Ò»)
1). ÉèÖõ±Ç°sessionÊÇ·ñ¶ÔÐ޸ĵÄÊý¾Ý½øÐÐ×Ô¶¯Ìá½» :SET AUTO[COMMIT] {ON|OFF|IMM[EDIATE]| n}
SQL> set autocommit off
2)£®ÔÚÓÃstartÃüÁîÖ´ÐÐÒ»¸ösql½Å±¾Ê±£¬ÊÇ·ñÏÔʾ½Å±¾ÖÐÕýÔÚÖ´ÐеÄSQLÓï¾ä :SET ECHO {ON|OFF}
SQL> set echo on
3).ÊÇ·ñÏÔʾµ±Ç°sqlÓï¾ä²éѯ»òÐ޸ĵÄÐÐÊý
SQL> SET FEED[BACK] {6|n|ON|OFF}
ĬÈÏÖ»Óнá¹û´óÓÚ6ÐÐʱ²ÅÏÔʾ½á¹ûµÄÐÐÊý¡£Èç¹ûset feedback 1 £¬Ôò²»¹Ü²éѯµ½¶àÉÙÐж¼·µ»Ø¡£µ±Îªoff ʱ£¬Ò»Âɲ»ÏÔʾ²éѯµÄÐÐÊý
SQL> set feed off
SQL> select * from dual;
D
-
X
SQL> set feed on
SQL> select * from dual;
D
-
X
ÒÑÑ¡Ôñ 1 ÐС£(Çø±ðÓÚ´Ë)
4).ÊÇ·ñÏÔʾÁбêÌâ
SQL> SET HEA[DING] {ON|OFF}
µ±set heading off ʱ£¬ÔÚÿҳµÄÉÏÃæ²»ÏÔʾÁбêÌ⣬¶øÊÇÒÔ¿Õ°×ÐдúÌæ
SQL> set hea on
SQL> select * from a;
ID SNAME AGE(ÁÐÃû)
---------- -------------------------------------------------- ----------
1 ²»¿ª»ú 900
SQL> set heading off
SQL> select * from a;
1 ²»¿ª»ú 900
5).ÉèÖÃÒ»ÐпÉÒÔÈÝ
Ïà¹ØÎĵµ£º
ʲôÊǺϲ¢¶àÐÐ×Ö·û´®£¨Á¬½Ó×Ö·û´®£©ÄØ£¬ÀýÈ磺
SQL> desc test;
Name Type Nullable Default Comments
------- ------------ -------- ------- --------
COUNTRY VARCHAR2(20) Y &nb ......
author:skate
time:2010-05-27
oracleÌí¼Ó×Ö¶ÎÒýÆðµÄÎÊÌâ
ÓÉÓÚͬÊÂÔÚÌí¼ÓÁ˱íµÄ×ֶκó£¬Ã»ÓÐÖØбàÒëÊý¾Ý¿âµÄ¶ÔÏ󣬵¼ÖºÍÕâ¸ö±íÏà¹ØµÄºÜ¶àprocedureºÍpackage¶¼Ê§Ð§¡£
ÓÉÓÚ·¢ÏÖºóÊÇÔÚÐ޸ĺó2¸öСʱ°É£¬¶øÔÚÕâÆÚ¼äºÜ¶à³ÌÐòÔÚµ÷ÓÃÕâЩ¹ý³Ì£¬ÖÂʹºÜ¶à»á»°¶¼½©ËÀÔÚÄÇ£¬ËùÒÔÒ²ÎÞ·¨
ÔÙÖØбàÒë¹ýÈ ......
ÔÚoracleÖд洢¹ý³Ì»òÕßÊÓͼµÈ¶ÔÏó´´½¨Ê±£¬Èç¹ûÉæ¼°µ½ÁíÍâÒ»¸öÓû§µÄ±í£¬¼´Ê¹ÄãÒѾgrant dbaÁË£¬Ò²²»ÐУ¬±ØÐëÏÔʽµØ¸³Óè²éѯȨÏÞ¡£·ñÔò£¬Äã»á·¢ÏÖÔÚpl/sqlÖпÉÒÔÖ´ÐÐÓï¾ä£¬µ«ÊÇÒ»µ©·Åµ½create Öо͸æËßÄãȨÏÞ²»×ã¡£
grant select any table to user ......
DBAÃǾ³£»áÓöµ½Ò»¸öÕâÑùÁîÈËÍ·ÌÛµÄÎÊÌ⣺²»ÖªµÀËÔÚOracleÉÏ´´½¨ÁËÒ»¸öÓû§£¬´´½¨Ê±£¬Ã»ÓиøÕâ¸öÓû§Ö¸¶¨Ä¬Èϱí¿Õ¼ä£¬ËùÒÔÕâ¸öÓû§¾Í»á²ÉÓÃĬÈϵıí¿Õ¼ä——system±í¿Õ¼ä¡£µ¼ÖÂϵͳ±í¿Õ¼äѸËÙ±»Óû§Êý¾ÝÕ¼Âú£¬Ö±ÖÁå´»ú¡£
ÔÚ10GÖУ¬DBAÓа취±ÜÃâÕâÖÖÎÊÌâÁË——ÔÚÏßÖ¸¶¨ÏµÍ³Ä¬Èϱí¿Õ¼ä£º
ALTER DAT ......
Êý¾Ý¿âÐÔÄܵ÷ÓÅÊÇÿһ¸öÓÅÐãSQL Server¹ÜÀíÔ±×îÖÕµÄÔðÈΡ£ËäÈ»±£Ö¤Êý¾ÝµÄ°²È«ºÍ¿ÉÓÃÐÔÊÇÎÒÃǵÄ×î¸ßµÄÄ¿±ê£¬µ«ÊǼÙÈçÊý¾Ý¿âÓ¦ÓóÌÐòÎÞ·¨Âú×ãÓû§µÄÒªÇó£¬ÄÇôDBAÃÇ»áÒòΪÐÔÄܵÍϵÄÉè¼ÆºÍʵÏÖ¶øÊܵ½Ö¸Ôð¡£SQL Server 2005ÔÚÊý¾Ý¿âÐÔÄÜ·½ÃæµÃµ½Á˺ܶàÌá¸ß£¬ÓÈÆäÊDZí·ÖÇøµÄ¼¼Êõ¡£Èç¹ûÄ㻹û²»Á˽â±í·ÖÇøµÄÌØÕ÷£¬ÄÇôÇëÄ㻨µã ......