SqlServerÆô¶¯²ÎÊý
SqlServerÆô¶¯²ÎÊý
1.Sqlservr.exeÔËÐвÎÊý¡£
SqlServerµÄÆô¶¯¿ÉÒÔΪWindows·þÎñ·½Ê½£¨Ä¬ÈÏ£©£¬Ò²¿ÉÒÔÒÔÓ¦ÓóÌÐò·½Ê½Æô¶¯¡£ÏÂÃæ½éÉÜsqlservr.exeÒÔÓ¦ÓóÌÐò·½Ê½Æô¶¯Ê±µÄ²ÎÊýÎÊÌâ¡£
sqlservrÓ¦ÓóÌÐòÓ÷¨£º
sqlservr[-sinstance_name][-c][-dmaster_path][-f]
[-eerror_log_path][-lmaster_log_path][-m]
[-n][-Ttrace#][-v][-x][-gnumber][-O][-ynumber]
-sinstance_name
Ö¸¶¨ÒªÁ¬½Óµ½µÄSQLServerʵÀý¡£Èç¹ûδָ¶¨ÃüÃûʵÀý£¬sqlservr½«Æô¶¯SQLServerĬÈÏʵÀý¡£ÖØÒªÆô¶¯SQLServerʵÀýʱ£¬±ØÐë´ÓʵÀýËùÔÚµÄÊʵ±Ä¿Â¼Ê¹ÓÃsqlservrÓ¦ÓóÌÐò¡£¶ÔÓÚĬÈÏʵÀý£¬´Ó\MSSQL\BinnĿ¼ÔËÐÐsqlservr¡£¶ÔÓÚÃüÃûʵÀý£¬ÔÚ\MSSQL$instance_name\BinnĿ¼ÔËÐÐsqlservr¡£
-c
±íʾÒÔ¶ÀÁ¢ÓÚWindowsNT·þÎñ¿ØÖƹÜÀíÆ÷µÄ·½Ê½Æô¶¯SQLServerʵÀý¡£µ±´ÓÃüÁîÌáʾ·ûÏÂÆô¶¯SQLServerʱ£¬¿ÉʹÓøÃÑ¡ÏîËõ¶ÌÆô¶¯SQLServerµÄʱ¼ä¡££¨×¢Ò⣺µ±Ê¹ÓøÃÑ¡Ïîʱ£¬ÎÞ·¨Í¨¹ýʹÓÃSQLServer·þÎñ¹ÜÀíÆ÷»ònetstopÃüÁîÍ£Ö¹SQLServer£¬¶øÇÒÈç¹ûÒÑ´ÓMicrosoftWindowsNT?ϵͳעÏú£¬ÔòSQLServer½«Í£Ö¹ÔËÐС££©-dmaster_pathÖ¸³ömasterÊý¾Ý¿âÎļþµÄÍêÈ«ºÏ·¨Â·¾¶¡£ÔÚ-dºÍmaster_pathÖ®¼äûÓпոñ¡£
-f
ÒÔ×îСÅäÖÃģʽÆô¶¯·þÎñÆ÷¡£È»ºó£¬ÏµÍ³¹ÜÀíÔ±¿É¶ÔÅäÖÃÑ¡ÏîÖØÐÂÅäÖã¨Ê¹ÓÃsp_configureϵͳ´æ´¢¹ý³Ì£©¡£
-eerror_log_path
±íʾ´íÎóÈÕÖ¾ÎļþµÄÍêÈ«ºÏ·¨Â·¾¶¡£Èç¹ûδָ¶¨Â·¾¶£¬ÔòĬÈÏʵÀýµÄĬÈÏλÖÃÊÇx:\ProgramFiles\MicrosoftSQLServer\MSSQL\Log\Errorlog£¬ÃüÃûʵÀýµÄĬÈÏλÖÃÊÇx:\ProgramFiles\MicrosoftSQLServer\MSSQL$instance_name\Log\Errorlog¡£ÔÚ-eºÍerror_log_pathÖ®¼äûÓпոñ¡£
-lmaster_log_path
ָʾmasterÊý¾Ý¿âÊÂÎñÈÕÖ¾ÎļþµÄÍêÈ«ºÏ·¨Â·¾¶¡£ÔÚ-lºÍmaster_log_pathÖ®¼äûÓпոñ¡£
-m
±íʾÔÚµ¥Óû§Ä£Ê½ÏÂÆô¶¯SQLServerʵÀý¡£Èç¹ûSQLServerÊÇÒÔµ¥Óû§Ä£Ê½Æô¶¯µÄ£¬ÔòÖ»ÄÜÁ¬½ÓÒ»¸öÓû§¡£CHECKPOINT»úÖÆ£¨ËüÈ·±£Íê³ÉµÄÊÂÎñ¶¨ÆÚ´Ó´ÅÅ̸ßËÙ»º´æÐ´ÈëÊý¾Ý¿âÉ豸ÖУ©½«²»Æô¶¯¡££¨Ò»°ãÇé¿öÏ£¬Èç¹ûÄúÓöµ½ÐèÒªÐÞ¸´µÄϵͳÊý¾Ý¿âÎÊÌâʱ£¬¿ÉʹÓôËÑ¡Ïî¡££©
-n
±íʾÄú²»ÏëʹÓÃWindowsNTÓ¦ÓóÌÐòÈÕÖ¾À´¼Ç¼SQLServerʼþ¡£Èç¹ûÓÃ-nÑ¡ÏîÆô¶¯SQLServerʵÀý£¬Ôò×îºÃҲʹÓÃ-eÑ¡Ï·ñÔò½«²»»á¼Ç¼SQLServerʼþ¡£
-Ttrace#
±íʾӦʹÓÃÖ¸¶¨µÄÓÐЧ¸ú×Ù±ê¼Ç(trace#)À´Æô¶¯SQLServerʵÀý¡£¸ú×Ù±êÖ¾ÓÃÀ´Æô¶¯¾ßÓзDZê×¼ÐÐΪµÄ·þÎñÆ÷¡£ÓйؿÉÓøú×Ù±ê¼Ç(trace#)µÄ¸ü¶àÐÅÏ¢£¬Çë²Î¼û¸ú×Ù±ê¼Ç¡£ÖØÒªµ±Ö¸
Ïà¹ØÎĵµ£º
Ò»¡¢Ö÷¼üÓë¾Û¼¯Ë÷Òý²¢²»ÊÇÒ»¶ÔһƥÅäµÄ
Ò»°ãÇé¿öÏÂÎÒÃǶ¼ÈÏΪ,¾Û¼¯Ë÷ÒýºÍÖ÷¼üÊÇÏ໥ƥÅäµÄ,ÒòΪֻҪÄãÔÚSQLServer±íÖж¨ÒåÁËÒ»¸öÖ÷¼ü,ÄÇôSQLServer»áΪÕâ¸öÖ÷¼ü×Ô¶¯Ìí¼Ó¾Û¼¯Ë÷Òý.µ«ÊÇ,Èç¹ûÄãÏÈÔÚ±íÖлùÓÚÈÎÒâÒ»Áн¨Á¢¾Û¼¯Ë÷Òý,È»ºóÔÙÑ¡ÔñÁíÒ»ÁÐ×÷ΪÖ÷¼ü,Õâʱ,Õâ¸öSQLServer½«»á»ùÓÚÕâ¸öÖ÷¼ü½¨Á¢Ò»¸öΨһ·Ç¾Û¼¯Ë÷Òý.
¶þ¡¢ ......
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È ......
1.¾ø¶ÔÖµ
S:select abs(-1) value
O:select abs(-1) value from dual
2.È¡Õû(´ó)
S:select ceiling(-1.001) value
O:select ceil(-1.001) value from dual
3.È¡Õû£¨Ð¡£©
S:select floor(-1.001) value
O:select floor(-1.001) value from dual
4.È¡Õû£¨½ØÈ¡£©
S:select cast(-1.002 as int) value
O:selec ......
In the latest installment of the SQL Server interview questions, we will outline questions suitable for a DBA interview to assess the candidates skills related to SQL Server system databases. In this tip, the questions are there to read, but the answers are intentionally hidden to really test your s ......