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

½âÃÜSQL SERVER 2005¼ÓÃÜ´æ´¢¹ý³Ì£¬º¯Êý


ÔÚSQL SERVER 2005ÖбØÐëÓÃרÓùÜÀíÁ¬½Ó²Å¿ÉÒԲ鿴¹ý³Ì¹ý³ÌÖÐÓõ½µÄ±í
EG£ºsqlcmd -A
1>use test
2>go
1>sp_decrypt 'p_testa'
2>go
Text
----------------------
Create procedure P_testa
with encryption
as
select * from test
 
create PROCEDURE [dbo].[sp_decrypt]
(@procedure sysname = NULL)  
AS  
SET NOCOUNT ON  
BEGIN
DECLARE @intProcSpace bigint, @t bigint, @maxColID smallint,@intEncrypted  
tinyint,@procNameLength int  
select @maxColID = max(subobjid),@intEncrypted = imageval from  
sys.sysobjvalues WHERE objid = object_id(@procedure)  
GROUP BY imageval  
select @procNameLength = datalength(@procedure) + 29  
DECLARE @real_01 nvarchar(max)  
DECLARE @fake_01 nvarchar(max)  
DECLARE @fake_encrypt_01 nvarchar(max)  
DECLARE @real_decrypt_01 nvarchar(max),@real_decrypt_01a nvarchar(max)  
declare @objtype varchar(2),@ParentName nvarchar(max)  
select @real_decrypt_01a = ''  
--ÌáÈ¡¶ÔÏóµÄÀàÐÍÈçÊÇ´æ´¢¹ý³Ì»¹ÊǺ¯Êý£¬Èç¹ûÊÇ´¥·¢Æ÷£¬»¹ÒªµÃµ½Æ丸¶ÔÏóµÄÃû³Æ  
select @objtype=type,@parentname=object_name(parent_object_id)  
from sys.objects where [object_id]=object_id(@procedure)  
-- ´Ósys.sysobjvaluesÀïÌá³ö¼ÓÃܵÄimageval¼Ç¼  
SET @real_01=(SELECT top 1 imageval from sys.sysobjvalues WHERE objid =  
object_id(@procedure) and valclass = 1 order by subobjid)  
--´´½¨Ò»¸öÁÙʱ±í  
create table #output ( [ident] [int] IDENTITY (1, 1) NOT NULL ,  
[real_decrypt] NVARCHAR(MAX) )  
--¿ªÊ¼Ò»¸öÊÂÎñ£¬ÉÔºó»Ø¹ö  
BEGIN TRAN  
--¸ü¸ÄԭʼµÄ´æ´¢¹ý³Ì£¬Óö̺áÏßÌæ»»  
if @objtype='P'  
SET @fake_01='ALTER PROCEDURE '+ @procedure +' WITH ENCRYPTION AS  
'+REPLICATE('-', 40003 - @procNameLength)  
else if @objtype='FN'  
SET @fake_01


Ïà¹ØÎĵµ£º

ÓÃsql²Ù×÷oracleµÄblob×Ö¶Î

ÓÃsql²Ù×÷oracleµÄblob×Ö¶Î
1¡¢²éѯ
select utl_raw.cast_to_varchar2(dlob),id from system.t_htinfo 
2¡¢²åÈë
insert into system.t_htinfo  values ('3',utl_raw.cast_to_raw('Äã'));
3¡¢¸üÐÂ
update system.t_htinfo set fld_value=utl_raw.cast_to_raw('1') where fh_nm=1820648 and form_index=52
......

ͬһ±í¶à×Ö¶ÎͬʱÖظ´¼Ç¼µÄSQL²éѯ¼°´¦ÀíÊý

ͬһ±í¶à×Ö¶ÎͬʱÖظ´¼Ç¼µÄSQL²éѯ¼°´¦ÀíÊý
±ÈÈçÏÖÔÚÓÐÒ»ÈËÔ±±í £¨±íÃû£ºpeosons£©
ÈôÏ뽫ÐÕÃû¡¢Éí·ÝÖ¤ºÅ¡¢×¡Ö·ÕâÈý¸ö×Ö¶ÎÍêÈ«ÏàͬµÄ¼Ç¼²éѯ³öÀ´
select p1.* from persons p1,persons p2 where p1.idp2.id and p1.cardid = p2.cardid and p1.pname = p2.pname and p1.address ......

³£ÓÃSQLÃæÊÔÌâ £¨Ò»£©

Êý¾Ý¿âÃæÊÔ³£ÓòâÊÔÌâ(SQL Server)
ÌâÄ¿1
¡¡¡¡ÎÊÌâÃèÊö:
¡¡¡¡Îª¹ÜÀí¸ÚλҵÎñÅàѵÐÅÏ¢£¬½¨Á¢3¸ö±í:
¡¡¡¡S (S#,SN,SD,SA) S#,SN,SD,SA ·Ö±ð´ú±íѧºÅ¡¢Ñ§Ô±ÐÕÃû¡¢ËùÊôµ¥Î»¡¢Ñ§Ô±ÄêÁä
¡¡¡¡C (C#,CN ) C#,CN ·Ö±ð´ú±í¿Î³Ì±àºÅ¡¢¿Î³ÌÃû³Æ
¡¡¡¡SC ( S#,C#,G ) S#,C#,G ·Ö±ð´ú±íѧºÅ¡¢ËùÑ¡Ð޵Ŀγ̱àºÅ¡¢Ñ§Ï°³É¼¨
¡¡¡¡1. Ê¹Ó ......

JAVAÁ¬½Ósql server 2005 Êý¾Ý¿âÐĵÃ

Ê×ÏȵÃÏÂÔØÇý¶¯³ÌÐòµ½Î¢ÈíÍøÕ¾ÏÂÔØMicrosoft SQL Server 2005 JDBC Driver 1.2
½âѹMicrosoft SQL Server 2005 jdbc driver1.2.exe£¬°Ñsqljdbc_1.1¸´ÖƵ½%ProgramFiles%£¨Èç¹ûϵͳÔÚCÅÌÔòΪC:\Program Files£©¡£
ÉèÖÃ Classpath
JDBC Çý¶¯³ÌÐò²¢Î´°üº¬ÔÚ Java SDK ÖС£Òò´Ë£¬Èç¹ûҪʹÓøÃÇý¶¯³ÌÐò£¬±ØÐ뽫 classpath ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ