Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

SQL SERVER»ñÈ¡±íµÄ¿Õ¼ä·Ö²¼Çé¿ö

/********************************
¹¦ÄÜ£º»ñÈ¡±íµÄ¿Õ¼ä·Ö²¼Çé¿ö
**********************************/
if not exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[tablespaceinfo]') and OBJECTPROPERTY(id, N'IsUserTable') = 1)
create table  tablespaceinfo                         --´´½¨½á¹û´æ´¢±í
              (nameinfo varchar(50) ,    --ΪÆäÇëÇó¿Õ¼äʹÓÃÐÅÏ¢µÄ±íÃû¡£
               rowsinfo int ,     --±íÖÐÏÖÓеÄÐÐÊý¡£
        reserved varchar(20) ,    --±í±£ÁôµÄ¿Õ¼ä×ÜÁ¿¡£
               datainfo varchar(20)  ,    --±íÖеÄÊý¾ÝËùʹÓõĿռäÁ¿¡£
               index_size varchar(20) ,   --±íÖеÄË÷ÒýËùʹÓõĿռäÁ¿
               unused varchar(20) )   --±íÖÐδÓõĿռäÁ¿
delete from tablespaceinfo --Çå¿ÕÊý¾Ý±í
declare @tablename varchar(255)  --±íÃû³Æ
declare @cmdsql varchar(500)
DECLARE Info_cursor CURSOR FOR
select o.name 
from dbo.sysobjects o where OBJECTPROPERTY(o.id, N'IsTable') = 1
     and o.name not like N'#%%'  order by o.name
OPEN Info_cursor
FETCH NEXT from Info_cursor
INTO @tablename
WHILE @@FETCH_STATUS = 0
BEGIN
  if exists (select * from dbo.sysobjects where id = object_id(@tablename) and OBJECTPROPERTY(id, N'IsUserTable') = 1)
  execute sp_executesql
         N'insert into tablespaceinfo  exec sp_spaceused @tbname',
    


Ïà¹ØÎĵµ£º

SQL Server 2008ÖеÄ9ÖÖÊý¾ÝÍÚ¾òËã·¨


ÕªÒª£ºSQL Server 2008ÖÐÌṩÁË9ÖÖ³£ÓõÄÊý¾ÝÍÚ¾òËã·¨£¬ÕâЩËã·¨ÓÃÔÚ²»Í¬Êý¾ÝÍÚ¾òµÄÓ¦Óó¡¾°Ï£¬±¾Îľ͸÷¸öËã·¨Öð¸ö·ÖÎöÌÖÂÛ¡£
±êÇ©£ºÊý¾ÝÍÚ¾òËã·¨  SQL Server 2008
1.¾ö²ßÊ÷Ëã·¨
¾ö²ßÊ÷£¬ÓÖ³ÆÅж¨Ê÷£¬ÊÇÒ»ÖÖÀàËƶþ²æÊ÷»ò¶à²æÊ÷µÄÊ÷½á¹¹¡£¾ö²ßÊ÷ÊÇÓÃÑù±¾µÄÊôÐÔ×÷Ϊ½áµã£¬ÓÃÊôÐÔµÄÈ¡Öµ×÷Ϊ·ÖÖ§£¬Ò²¾ÍÊÇÀàËÆÁ ......

SQL Server²éѯËٶȻºÂý½â¾ö°ì·¨(2)

ÔÚT-sqlµÄд·¨ÉÏÓкܴóµÄ½²¾¿£¬ÏÂÃæÁгö³£¼ûµÄÒªµã£ºÊ×ÏÈ£¬DBMS´¦Àí²éѯ¼Æ»®µÄ¹ý³ÌÊÇÕâÑùµÄ£º
1¡¢²éѯÓï¾äµÄ´Ê·¨¡¢Óï·¨¼ì²é
2¡¢½«Óï¾äÌá½»¸øDBMSµÄ²éѯÓÅ»¯Æ÷
3¡¢ÓÅ»¯Æ÷×ö´úÊýÓÅ»¯ºÍ´æȡ·¾¶µÄÓÅ»¯
4¡¢ÓÉÔ¤±àÒëÄ£¿éÉú³É²éѯ¹æ»®
5¡¢È»ºóÔÚºÏÊʵÄʱ¼äÌá½»¸øϵͳ´¦ÀíÖ´ÐÐ
6¡¢×îºó½«Ö´Ðнá¹û·µ»Ø¸øÓû§¡£
Æä´Î£¬¿´Ò»ÏÂS ......

³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁîÒ»

Ô­ÎÄ£ºÁõÎä| ³£ÓõÄORACLE PL/SQL¹ÜÀíÃüÁîÒ»
ÊìϤORACLE¹ÜÀíµÄÒ»¶¨¶ÔÕâЩÃüÁî²»»áÄ°Éú£¬²»¹ý¶ÔÓÚÎÒÕâ¸ö¸Õ½Ó´¥ORACLE¹ÜÀíµÄÀ´Ëµ£¬»¹ÊÇÓбØÒª×öϼǼ£¬ÒÔ±ãËæʱ²é¿´¡£
Ò» µÇ¼SQLPLUS
sqlplus Óû§Ãû/ÃÜÂë@Êý¾Ý¿âʵÀý as µÇ¼½ÇÉ«;
Èç:Óû§sys(ÃÜÂëΪ123)ÒÔsysdbaµÄ½ÇÉ«µÇ¼Êý¾Ý¿âORACL£¬ÎÒÃÇ¿ÉÒÔÊäÈ룺sqlplus sy ......

½ñÌì×°ÁËOracle SQL developer

ÏÂÔغó½âѹËõ¾ÍÄÜÖ±½ÓʹÓÃÁË£¬µ«ÊÇÊÇÖÐÎĵģ¬×ÖÌåÏÔʾµÄ²»ÊǺܺã¬ÓÚÊÇÕÒµ½ÁË»»Ó¢Îĵİ취£º
ÓÉÓÚ1.5°üº¬Á˶àÓïÑÔ½çÃæµÄÖ§³Ö£¬µ«ÊÇËüÊÇͨ¹ýJVMÀ´±æÈÏϵͳÓïÑԵģ¬ËùÒÔµ±ÄãµÄϵͳÓïÑÔΪÖÐÎĵÄʱºò£¬Ëü»áʹÓÃÖÐÎĽçÃæ¡£²»¹ýËüµÄÖÐÎÄ·­Òë²¢²»ÍêÕû£¬¼ÓÉÏĬÈϽçÃæ×ÖÌå̫С£¬Ê¹ÓÃÖÐÎĻῴ×ŷdz£ÄÑÊÜ¡£Èç¹ûÏëʹÓÃÓ¢ÎĽçÃ棬ÐèÒªÐÞ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ