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

Firebird³£ÓÃϵͳ±íSqlÓï¾ä

--µÃµ½Êý¾Ý¿âµÄËùÓÐÕßÃû³Æ
SELECT distinct RDB$OWNER_NAME AS DATABASE_OWNER
from RDB$RELATIONS
WHERE (RDB$SYSTEM_FLAG = 1);
--¸ù¾Ý±íÃûµÃµ½±íµÄÖ÷¼ü
SELECT RC.RDB$CONSTRAINT_NAME AS CONSTRAINT_NAME,
I.RDB$RELATION_NAME AS TABLE_NAME,
S.RDB$FIELD_NAME AS COLUMN_NAME
from RDB$RELATION_CONSTRAINTS RC
LEFT JOIN RDB$INDICES I ON
   (I.RDB$INDEX_NAME = RC.RDB$INDEX_NAME)
LEFT JOIN RDB$INDEX_SEGMENTS S ON
   (S.RDB$INDEX_NAME = I.RDB$INDEX_NAME)
WHERE (RC.RDB$CONSTRAINT_TYPE = 'PRIMARY KEY')
AND (I.RDB$RELATION_NAME = 'COUNTRY')
---¸ù¾Ý±íÃûµÃµ½ÆäÏà¹ØµÄÒÀÀµ.
SELECT RDB$DEPENDENT_NAME AS DEPENDENT_NAME,
RDB$DEPENDED_ON_NAME AS DEPENDS_ON,
RDB$FIELD_NAME AS FIELD_NAME,
RDB$DEPENDENT_TYPE DEPENDENT_TYPE,
   CASE
    WHEN RDB$DEPENDENT_TYPE = 0 THEN 'TABLE'
    WHEN RDB$DEPENDENT_TYPE = 1 THEN 'VIEW'
    WHEN RDB$DEPENDENT_TYPE = 2 THEN 'TRIGGER'
    WHEN RDB$DEPENDENT_TYPE = 3 THEN 'COMPUTED'
    WHEN RDB$DEPENDENT_TYPE = 4 THEN 'VALIDATION'
    WHEN RDB$DEPENDENT_TYPE = 5 THEN 'PROCEDURE'
    WHEN RDB$DEPENDENT_TYPE = 6 THEN 'expression_r_INDEX'
    WHEN RDB$DEPENDENT_TYPE = 7 THEN 'EXCEPTION'
    WHEN RDB$DEPENDENT_TYPE = 8 THEN 'USER'
    WHEN RDB$DEPENDENT_TYPE = 9 THEN 'FIELD'
    WHEN RDB$DEPENDENT_TYPE = 10 THEN 'INDEX'
    WHEN RDB$DEPENDENT_TYPE = 14 THEN 'GENERATOR'
    ELSE 'UNKNOWN'
    END AS DEPENDENT_TYPE_STR,
   RDB$DEPENDED_ON_TYPE AS DEPEND_ON_TYPE,
   CASE
    WHEN RDB$DEPENDED_ON_TYPE = 0 THEN 'TABLE'
    WHEN RDB$DEPENDED_ON_TYPE = 1 THEN 'VIEW'
    WHEN RDB$DEPENDED_ON_TYPE = 2 THEN 'TRIGGER'
    WHEN RDB$DEPENDED_ON_TYPE = 3 THEN 'COMPUTED'
    WHEN RDB$DEPENDED_ON_TYPE = 4 THEN 'VALIDATIO


Ïà¹ØÎĵµ£º

SQL server´¥·¢Æ÷ÈëÃÅ2 ÖØÃüÃû´¥·¢Æ÷

1.Óòéѯ·ÖÎöÆ÷ÖØÃüÃû
exec sp_rename Ô­Ãû³Æ, ÐÂÃû³Æ
sp_rename ÊÇ SQL Server™ ×Ô´øµÄÒ»¸ö´æ´¢¹ý³Ì£¬ÓÃÓÚ¸ü¸Äµ±Ç°Êý¾Ý¿âÖÐÓû§´´½¨µÄ¶ÔÏóµÄÃû³Æ£¬Èç±íÃû¡¢ÁÐ±í¡¢Ë÷ÒýÃûµÈ¡£
2.ÓÃÆóÒµ¹ÜÀíÆ÷ÖØÃüÃû
ÔÚ±íÉϵãÓÒ¼ü->“ËùÓÐÈÎÎñ”->“¹ÜÀí´¥·¢Æ÷”£¬Ñ¡ÖÐËùÒªÖØÃüÃûµÄ´¥·¢Æ÷£¬Ð޸Ĵ¥·¢Æ÷Óï ......

[ת]sql·Ö×éͳ¼Æ

--°´Ä³Ò»×ֶηÖ×éÈ¡×î´ó(С)ÖµËùÔÚÐеÄÊý¾Ý   
Êý¾ÝÈçÏ£º
name val memo
a    2   a2(aµÄµÚ¶þ¸öÖµ)
a    1   a1--aµÄµÚÒ»¸öÖµ
a    3   a3:aµÄµÚÈý¸öÖµ
b    1   b1--bµÄµÚÒ»¸öÖµ
b &n ......

ÆƽâSQL Prompt 3.9µÄ¼¸²½²Ù×÷


¹ØÓÚSQL Prompt
µÄÆƽâÎÄÕÂÔ°×ÓÀïÒѾ­Óв»ÉÙÈË·¢¹ýÁË¡£Æƽâ˼·ÎÒÒ²²»ÏëÖظ´£¬²»ÖªµÀµÄ¿ÉÒԲο¼£ºhttp://www.cnblogs.com/jintan/archive/2008/06/16/1223282.html
¹Ù·½ÏÂÔصØÖ·ÊÇ£ºhttp://downloads.red-gate.com/SQLToolbelt.exe
½ÓÏÂÀ´ÎÒ¾Í˵˵¾ßÌåÔõô×ö°É¡£ÎÒ¾Í˵˵×î¼òµ¥×îɵ¹ÏµÄ×ö·¨£¬²»ÐèÒª¶®ILÕÕÑùÆƽ⣡
× ......

Auto process Cube with SQL Agent job

(1)     Connect to the Analysis server, select the database which we want it to be automatically processed. Right click on this database, choose ‘Process’:
(2)     In the opening ‘Process database’ form, click the ‘Script Action ......

Á¬½Óms sqlÊý¾Ý¿âд·¨

windows ¼¯³ÉÑéÖ¤£º
<connectionStrings>
   <add name="ConnectionStr" connectionString="Data Source=CAIPENG-PC;database=Test;Integrated Security=SSPI" providerName="System.Data.SqlClient"/>
  </connectionStrings>
»òÕß
<connectionStrings>
<add name=" ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ