Sql 2000 Êý¾Ý¿â±¸·ÝʵÀý
Êý¾Ý¿â±¸·ÝʵÀý/**
**Êý¾Ý¿â±¸·ÝʵÀý
**Öì¶þ 2004Äê5ÔÂ
**±¸·Ý²ßÂÔ:
**Êý¾Ý¿âÃû:test
**±¸·ÝÎļþµÄ·¾¶e:\backup
**ÿ¸öÐÇÆÚÌìÁ賿1µã×öÒ»´ÎÍêÈ«±¸·Ý,Ϊ±£ÏÕÆð¼û,±¸·Ýµ½Á½¸öͬÑùµÄÍêÈ«±¸·ÝÎļþtest_full_A.bakºÍtest_full_B.bak
**ÿÌì1µã(³ýÁËÐÇÆÚÌì)×öÒ»´Î²îÒ챸·Ý,·Ö±ð±¸·Ýµ½Á½¸öÎļþtest_df_A.bakºÍtest_df_B.bak(²ÉÓø½¼Óµ½Ô±¸·ÝµÄ·½Ê½)
**ÿһ¸öСʱ×öÒ»´ÎÊÂÎñÈÕÖ¾±¸·Ý,·Ö±ð±¸·Ýµ½Á½¸öÎļþtest_log_A.bakºÍtest_log_B.bak(²ÉÓø½¼Óµ½Ô±¸·ÝµÄ·½Ê½)
**/
--µÚÒ» ÍêÈ«±¸·Ý²¿·Ö
--ÐÂÔö×÷Òµ
EXEC sp_add_job @job_name = 'ÍêÈ«±¸·Ý'
--ÐÂÔö×÷Òµ²½Öè1,°ÑÊý¾Ý¿â±¸·Ýµ½test_full_backup_A.bak
EXEC sp_add_jobstep @job_name = 'ÍêÈ«±¸·Ý',
@step_name = 'Setp1',
@subsystem = 'TSQL',
@command = 'BACKUP DATABASE Test TO DISK=''e:\backup\test_full_A.bak'' WITH INIT',
@on_fail_action=3, --ʧ°Üºóתµ½ÏÂÒ»²½
@on_success_action=3,-- ³É¹¦ºóתµ½ÏÂÒ»²½
@retry_attempts = 5,
@retry_interval = 5
--ÐÂÔö×÷Òµ²½Öè2,°ÑÊý¾Ý¿â±¸·Ýµ½test_full_B.bak
EXEC sp_add_jobstep @job_name = 'ÍêÈ«±¸·Ý',
@step_name = 'Setp2',
@subsystem = 'TSQL',
@command = 'BACKUP DATABASE Test TO DISK=''e:\backup\test_full_B.bak'' WITH INIT',
@retry_attempts = 5,
@retry_interval = 5
--µ÷¶È
EXEC sp_add_jobschedule @job_name = 'ÍêÈ«±¸·Ý',
@name = 'Schedule_1',
@freq_type = 8, -- °´ÖÜ
@freq_interval = 1, --ÿÐÇÆÚÌìÖ´ÐÐ
@freq_recurrence_factor=1,
&n
Ïà¹ØÎĵµ£º
String keyword = request.getParameter("keyword");
String timeRange = request.getParameter("timeRange");
String type = request.getParameter("type");
StringBuffer sql = new StringBuffer();
sql.append("use webstation_leadall s ......
MS SQL SERVER 2005È«ÎÄË÷Òýѧϰ±Ê¼ÇÒ»
ÏÈÁ˽âÒ»ÏÂÈ«ÎÄË÷ÒýÊÇÈçºÎ´´½¨ºÍʹÓõÄ
´´½¨È«ÎÄË÷Òý:
ÔÚMS SQL SERVER 2005Àï,È«ÎÄË÷ÒýÊÇÒ»¸öµ¥¶ÀµÄ·þÎñÏî,ĬÈÏÊÇÆô¶¯µÄ,µ«ÊÇûÓÐÔÊÐíÊý¾Ý¿âÆôÓÃÈ«ÎÄË÷Òý,Èç¹ûÒ ......
Ò»¡¢ ¼òµ¥²éѯ
¡¡¡¡¼òµ¥µÄTransact-SQL²éѯֻ°üÀ¨Ñ¡ÔñÁÐ±í¡¢from×Ó¾äºÍWHERE×Ӿ䡣ËüÃÇ·Ö±ð˵Ã÷Ëù²éѯÁС¢²éѯµÄ±í»òÊÓͼ¡¢ÒÔ¼°ËÑË÷Ìõ¼þµÈ¡£
¡¡¡¡ÀýÈ磬ÏÂÃæµÄÓï¾ä²éѯtesttable±íÖÐÐÕÃûΪ“ÕÅÈý”µÄnickname×ֶκÍemail×ֶΡ£
¡¡¡¡SELECT nickname,email
¡¡¡¡from testtable
¡¡¡¡WHERE name='ÕÅÈý'
......
ÔÚT-sqlµÄд·¨ÉÏÓкܴóµÄ½²¾¿£¬ÏÂÃæÁгö³£¼ûµÄÒªµã£ºÊ×ÏÈ£¬DBMS´¦Àí²éѯ¼Æ»®µÄ¹ý³ÌÊÇÕâÑùµÄ£º
1¡¢²éѯÓï¾äµÄ´Ê·¨¡¢Óï·¨¼ì²é
2¡¢½«Óï¾äÌá½»¸øDBMSµÄ²éѯÓÅ»¯Æ÷
3¡¢ÓÅ»¯Æ÷×ö´úÊýÓÅ»¯ºÍ´æȡ·¾¶µÄÓÅ»¯
4¡¢ÓÉÔ¤±àÒëÄ£¿éÉú³É²éѯ¹æ»®
5¡¢È»ºóÔÚºÏÊʵÄʱ¼äÌá½»¸øϵͳ´¦ÀíÖ´ÐÐ
6¡¢×îºó½«Ö´Ðнá¹û·µ»Ø¸øÓû§¡£
Æä´Î£¬¿´Ò»ÏÂS ......