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

SQL SERVERʹÓÃÊÂÎñÈÕÖ¾»Ö¸´Êý¾ÝµÄʵÑé

/*
ʹÓÃÊÂÎñÈÕÖ¾»Ö¸´Êý¾ÝµÄʵÑé
*/
--1.´´½¨²âÊÔÊý¾Ý¿â
CREATE DATABASE Db_test
ON
( NAME = Db_test_DATA,
      FILENAME = 'c:\Db_test.mdf' )
LOG ON
( NAME = Db_test_LOG,
   FILENAME = 'c:\Db_test.ldf')
GO
--2.¹ÊÕÏ»¹Ô­Ä£ÐÍÉèÖÃΪfullÄ£ÐÍ,ĬÈϵļòµ¥Ä£Ðͱ¸·ÝÊÂÎñÈÕÖ¾ÊÇûÓõÄ
ALTER   DATABASE   Db_test   SET   RECOVERY   FULL   |   BULK_LOGGED
--3.´´½¨²âÊÔ±í
CREATE TABLE [dbo].[BackupTabToTxt] (
 [TabName] [varchar] (200)  ,
)
--4.²åÈë²âÊÔÊý¾Ý
insert into BackupTabToTxt(TabName) values('test1')
insert into BackupTabToTxt(TabName) values('test2')
insert into BackupTabToTxt(TabName) values('test3')
select * from BackupTabToTxt
--5.±¸·ÝÊý¾Ý¿â
BACKUP DATABASE Db_test TO DISK='c:\test_data.bak'
--6.ɾ³ýÊý¾Ý,±¸·ÝÈÕÖ¾
delete from BackupTabToTxt where TabName='test3'  --17:06
BACKUP LOG Db_test TO DISK='c:\test_log_1706.bak' --±¸·ÝÈÕÖ¾
delete from BackupTabToTxt where TabName='test2'  --17:07
BACKUP LOG Db_test TO DISK='c:\test_log_1707.bak' --±¸·ÝÈÕÖ¾
select * from BackupTabToTxt
--7.ʹÓÃÊÂÎñÈÕÖ¾»Ö¸´Êý¾Ý
RESTORE database Db_test from DISK='c:\test_data.bak'  WITH NORECOVERY
RESTORE LOG Db_test from DISK='c:\test_log_1706.bak' with stopat='2009-09-24 17:06' ,NORECOVERY
RESTORE LOG Db_test from DISK='c:\test_log_1707.bak' with stopat='2009-09-24 17:07'
select * from BackupTabToTxt
--8.ɾ³ý²âÊÔ¿â
drop database Db_test


Ïà¹ØÎĵµ£º

¿ª·¢¸¨Öú¹¤¾ß£ºSQLÎĸñʽ»¯¹¤¾ßSQLinFormpro_Desktop

    ÔÚÓйØÊý¾Ý¿âµÄÏîÄ¿¿ª·¢ÖУ¬±àÂ룬bugÐ޸ĵȵȣ¬¶¼ÐèÒª²é¿´²Ù×÷Ïà¹ØµÄSQLÎÄ£¬Èç¹ûSQLÎıȽϸ´ÔӵĻ°£¬ÎÒÃÇ×Ô¼ºÅÅ°æ·Ç³£Âé·³£¬Í¬Ê±Ò²ºÜ»¨·Ñʱ¼ä¡£¿ÉÄÜÓеĹ«Ë¾×Ô¼º¿ª·¢Á˸ñʽ»¯¹¤¾ß»òÕß¹ºÂòÁ˸ñʽ»¯¹¤¾ßÈí¼þ¡£ÓÐÁ˸ñʽ¹¤¾ßÎÒÃǾͽÚÊ¡ÁËÅÅ°æʱ¼ä¡£
    ½éÉÜÒ»ÏÂSQLinFormpro_Desktop£¨htt ......

SQLÓïÑԵIJ¼¾ÖºÍIllegalArgumentException

ºÍjava.lang.IllegalArgumentException: org.hibernate.QueryException: JPA-style positional param was not an integral ordinalÕ½¶·ÁË°ëÌ죬º¹°¡£¡
ʹÓÃjpa + strut+ hibernate ¾Í±¨org.hibernate.QueryException: JPA-style positional param was not an integral ordinal
Ò»°ã°ÑhqlÓï¾äдÔÚÒ»ÐУ¬»áºÜ³¤£¬ÔÚideÖÐÐèÒ ......

ͬһ¸ö½»²æ±íµÄ¶¯Ì¬SQLʵÏÖ

DECLARE
 TYPE list IS TABLE OF t_stu.project%TYPE INDEX BY BINARY_INTEGER;
 project_list list;
 v_pro_num NUMBER;
 sql_str VARCHAR(255);
 
t_stu
SID SUBJECT SCORE
1        Êýѧ       &n ......

ת)¼òÒ×SQL Server ±¸·Ý·½°¸


Òý:ÏÖÔÚһЩÖÐСÆóÒµ¶¼¹ã·ºÊ¹ÓÃMS Windows NT ΪÍøÂç²Ù×÷ϵͳƽ̨£¬SQL Server Ϊºǫ́Êý¾Ý¿â¹¹½¨ÆóÒµÄÚ²¿µÄ¸÷ÖÖ¹ÜÀíϵͳ£¬¸Ã³ÉÊì¼¼ÊõµÄÆÕ¼°£¬ÄÜÓÐЧµØ°ïÖúÆóÒµ¶ÔÄÚ²¿Êý¾Ý½øÐйÜÀí¡£ÕâÀàÓ¦ÓÃÖУ¬¶ÔÊý¾Ý¿âµÄ±¸·ÝÊǺÜÖØÒªµÄÒ»Ï×÷£¬ÆäÖØÒªÐÔ²»±Ø¶àÑÔ¡£
¡¡¡¡Æ䱸·ÝµÄ·½·¨ºÜ¶à£¬È磺ÔÚһЩ¹æÄ£½Ï´ó¡¢×ʽðÐÛºñµÄÆóÒµ£¬ÍùÍùÊÇ ......

SQL SERVERµ¼ÈëBAKÎļþ

ϵͳ»·¾³£ºwindows xp pro
Êý¾Ý¿â£ºMS Sql 2000
IIS: 5.1 ASP.NET2.0
ÒòΪ´úÂëÊÇ2.0.netµÄ,ûÓа취ֻºÃ°²×°ÁË.netÏÂÔØÄã¿ÉÒÔȥ΢ÈíµÄÍøÕ¾ÉÏÈ¥ÏÂÔØ.Õâ¸öÊÇÃâ·ÑµÄÈí¼þ£¬ÎÒÖªµÀµÄÊÇÃâ·ÑµÄ¡£
Êý¾Ý¿â×öÁËѹËõºó׺ÊÇbakµÄ£¬ËùÒÔÊý¾Ý¿â²»ÄÜÖ±½ÓʹÓã¬ÐèÒªµ¼ÈëÔÚÍøÉϲéÁ˺ܶàµÄ×ÊÁϵ«ÊDz»¶à£¬µ«×Ô¼º³É¹¦µ¼ÈëÁË£¬Ð´ÏÂÀ´×öÒ»¸ö±¸ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ