Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB
ÈÈÃűêÇ©£º c c# c++ asp asp.net linux php jsp java vb Python Ruby mysql sql access Sqlite sqlserver delphi javascript Oracle ajax wap mssql html css flash flex dreamweaver xml
 ×îÐÂÎÄÕ : sqlserver

¹ØÓÚSQLServer2005µÄѧϰ±Ê¼Ç——XMLµÄ´¦Àí

ÔÚ
SQLServer2005
ÖжÔ
XML
µÄ´¦Àí¹¦ÄÜÏÔÈ»ÔöÇ¿Á˺ܶ࣬ÌṩÁË
query(),value(),exist(),modify(),nodes()
µÈº¯Êý¡£
¹ØÓÚ
xml
£¬ÄÑÒÔÀí½âµÄ²»ÊÇ
SQLServer
ÌṩµÄº¯Êý£¬¶øÊǶÔ
xml
±¾ÉíµÄÀí½â£¬¿´Ëƺܼòµ¥µÄÎļþ¸ñʽ£¬´¦ÀíÆðÀ´È´ÊǷdz£À§Äѵġ£±¾ÎÄÖ»Êdzõ̽һ϶øÒÑ¡£
Ïê¼û
SQLServer
Áª»ú°ïÖú£º
Ö÷Ìâ
˵Ã÷
query()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ¶Ô
XML
ʵÀý½øÐвéѯ¡£
value()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ´Ó
XML
ʵÀý¼ìË÷
SQL
ÀàÐ͵ÄÖµ¡£
exist()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÈ·¶¨²éѯÊÇ·ñ·µ»Ø·Ç¿Õ½á¹û¡£
modify()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÖ¸¶¨
XML DML
Óï¾äÒÔÖ´ÐиüС£
nodes()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ½«
XML
²ð·Ö³É¶àÐÐÒÔ½«
XML
ÎĵµµÄ×é³É²¿·Ö´«²¥µ½ÐÐ
¼¯ÖС£
 
Ïл°ÉÙ˵£¬Ê×ÏÈ´´½¨Ò»¸ö°üº¬
xml
ÀàÐ͵ÄÊý¾Ý±í£¬Æä´Î´´½¨Ò»¸ö
xml
Îļþ£¬ÔÚ·þÎñ¶Ë°Ñ
xml
ÎļþÄÚÈݼÓÔظÃÊý¾Ý±íÖС£
CREATE
TABLE VisioXML
(
 
ID 
INT,
 
Doc
XML
);
GO
´´½¨Ò»¸ö
ÃûΪ
xxx.xml
µÄÎļþ£¬ÄÚÈÝÈçÏÂ
/*
<ROOT>
 
<ROW>
  ......

¹ØÓÚSQLServer2005µÄѧϰ±Ê¼Ç——XMLµÄ´¦Àí

ÔÚ
SQLServer2005
ÖжÔ
XML
µÄ´¦Àí¹¦ÄÜÏÔÈ»ÔöÇ¿Á˺ܶ࣬ÌṩÁË
query(),value(),exist(),modify(),nodes()
µÈº¯Êý¡£
¹ØÓÚ
xml
£¬ÄÑÒÔÀí½âµÄ²»ÊÇ
SQLServer
ÌṩµÄº¯Êý£¬¶øÊǶÔ
xml
±¾ÉíµÄÀí½â£¬¿´Ëƺܼòµ¥µÄÎļþ¸ñʽ£¬´¦ÀíÆðÀ´È´ÊǷdz£À§Äѵġ£±¾ÎÄÖ»Êdzõ̽һ϶øÒÑ¡£
Ïê¼û
SQLServer
Áª»ú°ïÖú£º
Ö÷Ìâ
˵Ã÷
query()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ¶Ô
XML
ʵÀý½øÐвéѯ¡£
value()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ´Ó
XML
ʵÀý¼ìË÷
SQL
ÀàÐ͵ÄÖµ¡£
exist()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÈ·¶¨²éѯÊÇ·ñ·µ»Ø·Ç¿Õ½á¹û¡£
modify()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚÖ¸¶¨
XML DML
Óï¾äÒÔÖ´ÐиüС£
nodes()
·½·¨£¨
xml
Êý¾ÝÀàÐÍ£©
´Ë·½·¨ÓÃÓÚ½«
XML
²ð·Ö³É¶àÐÐÒÔ½«
XML
ÎĵµµÄ×é³É²¿·Ö´«²¥µ½ÐÐ
¼¯ÖС£
 
Ïл°ÉÙ˵£¬Ê×ÏÈ´´½¨Ò»¸ö°üº¬
xml
ÀàÐ͵ÄÊý¾Ý±í£¬Æä´Î´´½¨Ò»¸ö
xml
Îļþ£¬ÔÚ·þÎñ¶Ë°Ñ
xml
ÎļþÄÚÈݼÓÔظÃÊý¾Ý±íÖС£
CREATE
TABLE VisioXML
(
 
ID 
INT,
 
Doc
XML
);
GO
´´½¨Ò»¸ö
ÃûΪ
xxx.xml
µÄÎļþ£¬ÄÚÈÝÈçÏÂ
/*
<ROOT>
 
<ROW>
  ......

SQLServer DBA³£見問題

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 skills. Once you read the question and have determined your answer, then highlight the answer to see how you did.
Solution
Question Difficulty = Easy
Question 1: What are the SQL Server system databases and can you outline the general functionality of each database?
Master - Database responsible for SQL Server instance related data. You can also think of this database corresponding to the Windows SQL Server service account.
Resource - Database responsible for SQL Server system objects. This database was introduced in SQL Server 2005 and is intended to ease the upgrade and rollback of SQL Server system objects.
Model - Template database for the creation of new user defined databases. ......

SQLSERVER¾Û¼¯Ë÷ÒýÓë·Ç¾Û¼¯Ë÷Òý£¨×ªÔØ£©

΢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý)ºÍ·Ç¾Û¼¯Ë÷Òý(nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý)…… (Ò»)ÉîÈëdz³öÀí½âË÷Òý½á¹¹ ʵ¼ÊÉÏ£¬Äú¿ÉÒÔ°ÑË÷ÒýÀí½âΪһÖÖÌØÊâµÄĿ¼¡£Î¢ÈíµÄSQL SERVERÌṩÁËÁ½ÖÖË÷Òý£º¾Û¼¯Ë÷Òý(clustered index£¬Ò²³Æ¾ÛÀàË÷Òý¡¢´Ø¼¯Ë÷Òý)ºÍ·Ç¾Û¼¯Ë÷Òý(nonclustered index£¬Ò²³Æ·Ç¾ÛÀàË÷Òý¡¢·Ç´Ø¼¯Ë÷Òý)¡£ÏÂÃ棬ÎÒÃǾÙÀýÀ´ËµÃ÷һϾۼ¯Ë÷ÒýºÍ·Ç¾Û¼¯Ë÷ÒýµÄÇø±ð£º Æäʵ£¬ÎÒÃǵĺºÓï×ÖµäµÄÕýÎı¾Éí¾ÍÊÇÒ»¸ö¾Û¼¯Ë÷Òý¡£±ÈÈ磬ÎÒÃÇÒª²é“°²”×Ö£¬¾Í»áºÜ×ÔÈ»µØ·­¿ª×ÖµäµÄÇ°¼¸Ò³£¬ÒòΪ“°²”µÄÆ´ÒôÊÇ“an”£¬¶ø°´ÕÕÆ´Òô ÅÅÐòºº×ÖµÄ×ÖµäÊÇÒÔÓ¢ÎÄ×Öĸ“a”¿ªÍ·²¢ÒÔ“z”½áβµÄ£¬ÄÇô“°²”×Ö¾Í×ÔÈ»µØÅÅÔÚ×ÖµäµÄÇ°²¿¡£Èç¹ûÄú·­ÍêÁËËùÓÐÒÔ“a”¿ªÍ·µÄ²¿·ÖÈÔÈ»ÕÒ²»µ½Õâ¸ö×Ö£¬ÄÇ Ã´¾Í˵Ã÷ÄúµÄ×ÖµäÖÐûÓÐÕâ¸ö×Ö;ͬÑùµÄ£¬Èç¹û²é“ÕÅ”×Ö£¬ÄÇÄúÒ²»á½«ÄúµÄ×ֵ䷭µ½×îºó²¿·Ö£¬ÒòΪ“ÕÅ”µÄÆ´ÒôÊÇ“zhang”¡£Ò²¾ÍÊÇ˵£¬×ÖµäµÄÕýÎIJ¿·Ö ±¾Éí¾ÍÊÇÒ»¸öĿ¼£¬Äú²»ÐèÒªÔÙÈ¥²éÆäËûĿ¼À´ÕÒµ½ÄúÐèÒªÕÒµÄÄÚÈ ......

SQLServerºÍOracleµÄ³£Óú¯Êý¶Ô±È

SQLServerºÍOracleµÄ³£Óú¯Êý¶Ô±È
 
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:select trunc(-1.002) value from dual
 
5.ËÄÉáÎåÈë
S:select round(1.23456,4) value 1.23460
O:select round(1.23456,4) value from dual 1.2346
 
6.eΪµ×µÄÃÝ
S:select Exp(1) value 2.7182818284590451
O:select Exp(1) value from dual 2.71828182
 
7.È¡eΪµ×µÄ¶ÔÊý
S:select log(2.7182818284590451) value 1
O:select ln(2.7182818284590451) value from dual; 1
 
8.È¡10Ϊµ×¶ÔÊý
S:select log10(10) value 1
O:select log(10,10) value from dual; 1
 
9.ȡƽ·½
S:select SQUARE(4) value 16
O:select power(4,2) value from dual 16
 
10.ȡƽ·½¸ù
S:select SQRT(4) value 2
O:select SQRT(4 ......

SQLServerºÍOracleµÄ³£Óú¯Êý¶Ô±È

SQLServerºÍOracleµÄ³£Óú¯Êý¶Ô±È
 
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:select trunc(-1.002) value from dual
 
5.ËÄÉáÎåÈë
S:select round(1.23456,4) value 1.23460
O:select round(1.23456,4) value from dual 1.2346
 
6.eΪµ×µÄÃÝ
S:select Exp(1) value 2.7182818284590451
O:select Exp(1) value from dual 2.71828182
 
7.È¡eΪµ×µÄ¶ÔÊý
S:select log(2.7182818284590451) value 1
O:select ln(2.7182818284590451) value from dual; 1
 
8.È¡10Ϊµ×¶ÔÊý
S:select log10(10) value 1
O:select log(10,10) value from dual; 1
 
9.ȡƽ·½
S:select SQUARE(4) value 16
O:select power(4,2) value from dual 16
 
10.ȡƽ·½¸ù
S:select SQRT(4) value 2
O:select SQRT(4 ......

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
ÒÔ×îСÅäÖÃģʽÆô¶¯· ......

sqlserver ·þÎñÔËÐв»ÁË

½ñÈÕsqlserver2000µÄ·þÎñÆô¶¯²»ÁË£¬¿´ÁËһϴíÎóÈÕÖ¾“SQL Server evaluation period has expired.”
´ÓÍøÉÏÕÒÁËÕÒ£¬ÖØа²×°sqlserver2000¼´¿É£¬ÖØװʱ¿ÉÄÜ»áÓöµ½“ÒÔÇ°µÄij¸ö³ÌÐò°²×°ÒÑÔÚ°²×°¼ÆËã»úÉÏ´´½¨¹ÒÆðµÄÎļþ²Ù×÷¡£ÔËÐа²×°³ÌÐò֮ǰ±ØÐëÖØÐÂÆô¶¯¼ÆËã»ú”´íÎ󣬿ɲ鿴±¾ÈËǰһƪÎÄÕ½â¾ö ......
×ܼǼÊý:341; ×ÜÒ³Êý:57; ÿҳ6 Ìõ; Ê×Ò³ ÉÏÒ»Ò³ [12] [13] [14] [15] 16 [17] [18] [19] [20] [21]  ÏÂÒ»Ò³ βҳ
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ