锘??xml version="1.0" encoding="utf-8" standalone="yes"?>亚洲一区二区高清,亚洲伊人久久精品,亚洲欧洲av综合色无码http://m.tkk7.com/crazycy/category/8596.html璁板綍鐐規(guī)淮 閴村線浜嬩箣寰楀け 浠ヨ祫浜庡彂灞?zh-cnThu, 06 Mar 2014 16:02:08 GMTThu, 06 Mar 2014 16:02:08 GMT60Database-001 MySQL瀛樺偍寮曟搸MyISAM涓嶪nnoDB鐨勪富瑕佸尯鍒姣?(杞級http://m.tkk7.com/crazycy/archive/2014/03/06/410673.htmlcrazycycrazycyThu, 06 Mar 2014 03:09:00 GMThttp://m.tkk7.com/crazycy/archive/2014/03/06/410673.htmlhttp://m.tkk7.com/crazycy/comments/410673.htmlhttp://m.tkk7.com/crazycy/archive/2014/03/06/410673.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/410673.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/410673.html鏈枃鏁寸悊浜?a title="Mysql" style="padding: 0px; margin: 0px; color: #006600; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #006600;">Mysql 涓ゅぇ甯哥敤鐨勫瓨鍌ㄥ紩鎿?a title="MyISAM" style="padding: 0px; margin: 0px; color: #006600; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #006600;">MyISAM錛?a title="InnoDB" style="padding: 0px; margin: 0px; color: #006600; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #006600;">InnoDB鐨勫叚澶у父瑙佸尯鍒紝鏉ユ簮浜?a title="Mysql" style="padding: 0px; margin: 0px; color: #006600; text-decoration: none; border-bottom-width: 1px; border-bottom-style: dashed; border-bottom-color: #006600;">Mysql鎵嬪唽浠ュ強浜掕仈緗戠殑璧勬枡銆?/p>
InnoDB涓?/strong>Myisam鐨勫叚澶у尯鍒?/strong>
MyISAMInnoDB
鏋?鎴愪笂鐨勫尯鍒細(xì)姣忎釜MyISAM鍦ㄧ鐩樹笂瀛樺偍鎴愪笁涓枃浠躲傜涓涓?鏂囦歡鐨勫悕瀛椾互琛ㄧ殑鍚嶅瓧寮濮嬶紝鎵╁睍鍚嶆寚鍑烘枃浠剁被鍨嬨?p style="padding: 0px; margin: 1.2em 0px; line-height: 1.5em;">

.frm鏂囦歡瀛樺偍琛ㄥ畾涔夈?br />鏁版嵁鏂囦歡鐨勬墿 灞曞悕涓?MYD (MYData)銆?/span>绱㈠紩鏂囦歡鐨勬墿 灞曞悕鏄?MYI (MYIndex)銆?/span>

鍩轟簬紓佺洏鐨勮祫婧愭槸InnoDB琛ㄧ┖闂存暟鎹枃浠跺拰瀹冪殑鏃ュ織鏂囦歡錛孖nnoDB 琛ㄧ殑 澶у皬鍙彈闄愪簬鎿嶄綔緋葷粺鏂囦歡鐨勫ぇ灝忥紝涓鑸負(fù) 2GB
浜嬪姟澶勭悊涓婃柟闈?/strong>:MyISAM綾誨瀷鐨勮〃寮鴻皟鐨勬槸鎬ц兘錛屽叾鎵ц鏁?搴︽瘮InnoDB綾誨瀷鏇村揩錛屼絾鏄笉鎻愪緵浜嬪姟鏀寔InnoDB鎻愪緵浜嬪姟鏀寔浜嬪姟(commit, rollback, crash recovery capability)錛屽閮ㄩ敭絳夐珮綰?鏁版嵁搴撳姛鑳?br />
SELECTUPDATE,INSERT錛?/strong>Delete鎿?浣?/strong>濡傛灉鎵ц澶ч噺鐨凷ELECT錛孧yISAM鏄洿濂界殑閫夋嫨1.濡傛灉浣犵殑鏁版嵁鎵ц澶ч噺鐨?strong style="padding: 0px; margin: 0px;">INSERT鎴?/strong>UPDATE錛屽嚭浜庢ц兘鏂歸潰鐨勮冭檻錛屽簲璇ヤ嬌鐢↖nnoDB琛?p style="padding: 0px; margin: 1.2em 0px; line-height: 1.5em;">

2.DELETE FROM table鏃訛紝InnoDB涓嶄細(xì)閲嶆柊寤虹珛琛紝鑰屾槸涓琛屼竴琛岀殑 鍒犻櫎銆?/p>

3.LOAD TABLE FROM MASTER鎿嶄綔瀵笽nnoDB鏄笉璧蜂綔鐢ㄧ殑錛岃В鍐蟲柟娉曟槸棣栧厛鎶奍nnoDB琛ㄦ敼鎴怣yISAM琛紝瀵煎叆鏁版嵁鍚庡啀鏀規(guī)垚InnoDB琛紝浣嗘槸瀵逛簬浣跨敤鐨勯澶栫殑InnoDB鐗規(guī)э紙渚嬪澶栭敭錛夌殑琛ㄤ笉閫傜敤

瀵?/strong>AUTO_INCREMENT鐨?鎿嶄綔

姣忚〃涓涓狝UTO_INCREMEN鍒楃殑鍐呴儴澶勭悊銆?p style="padding: 0px; margin: 1.2em 0px; line-height: 1.5em;">

MyISAM涓?/strong>INSERT鍜?/strong>UPDATE鎿?浣滆嚜鍔ㄦ洿鏂拌繖涓鍒?/strong>銆傝繖浣垮緱AUTO_INCREMENT鍒楁洿蹇紙鑷沖皯10%錛夈傚湪搴忓垪欏剁殑鍊艱鍒犻櫎涔嬪悗灝變笉 鑳藉啀鍒╃敤銆?褰揂UTO_INCREMENT鍒楄瀹氫箟涓哄鍒楃儲寮曠殑鏈鍚庝竴鍒楋紝 鍙互鍑虹幇閲嶄嬌鐢ㄤ粠搴忓垪欏墮儴鍒犻櫎鐨勫肩殑鎯呭喌錛夈?/p>

AUTO_INCREMENT鍊煎彲鐢ˋLTER TABLE鎴杕yisamch鏉ラ噸緗?/p>

瀵逛簬AUTO_INCREMENT綾誨瀷鐨勫瓧孌碉紝InnoDB涓繀欏誨寘鍚彧鏈夎瀛楁鐨勭儲寮曪紝浣?鏄湪MyISAM琛ㄤ腑錛屽彲浠ュ拰鍏朵粬瀛楁涓璧峰緩绔嬭仈 鍚堢儲寮?/p>

鏇村ソ鍜屾洿蹇殑auto_increment澶勭悊

濡傛灉浣犱負(fù)涓涓〃鎸囧畾AUTO_INCREMENT鍒楋紝鍦ㄦ暟鎹瘝鍏擱噷鐨処nnoDB琛ㄥ彞鏌勫寘鍚竴涓悕涓鴻嚜鍔ㄥ闀胯鏁?鍣ㄧ殑璁℃暟鍣紝瀹冭鐢ㄥ湪涓鴻鍒楄祴鏂板箋?p style="padding: 0px; margin: 1.2em 0px; line-height: 1.5em;">

鑷姩澧為暱璁℃暟 鍣ㄤ粎琚瓨鍌ㄥ湪涓誨唴瀛樹腑錛岃屼笉鏄瓨鍦ㄧ鐩樹笂

鍏充簬璇ヨ綆楀櫒 鐨勭畻娉曞疄鐜幫紝璇峰弬鑰?/p>

AUTO_INCREMENT鍒?鍦?/strong>InnoDB閲?濡備綍宸ヤ綔

琛ㄧ殑鍏蜂綋琛屾暟select count(*) from table,MyISAM鍙綆鍗曠殑璇誨嚭淇濆瓨濂界殑琛屾暟錛屾敞鎰忕殑鏄紝褰揷ount(*)璇彞鍖呭惈 where鏉′歡鏃訛紝涓ょ琛ㄧ殑鎿嶄綔鏄竴鏍風(fēng)殑InnoDB 涓笉 淇濆瓨琛ㄧ殑鍏蜂綋琛屾暟錛屼篃灝辨槸璇達(dá)紝鎵цselect count(*) from table鏃訛紝InnoDB瑕佹壂鎻忎竴閬嶆暣涓〃鏉ヨ綆楁湁澶氬皯琛?br />
improved in V5.6

閿?/strong>琛ㄩ攣鎻愪緵琛岄攣(locking on row level)錛屾彁渚涗笌 Oracle 綾誨瀷涓鑷寸殑涓嶅姞閿佽鍙?non-locking read in
SELECTs);

鍙﹀錛孖nnoDB琛ㄧ殑琛岄攣涔熶笉鏄粷瀵圭殑錛屽鏋滃湪鎵?琛屼竴涓猄QL璇彞鏃禡ySQL涓嶈兘紜畾瑕佹壂鎻忕殑鑼冨洿錛孖nnoDB琛ㄥ悓鏍蜂細(xì)閿佸叏琛紝渚嬪update table set num=1 where name like “%aaa%”
鏈枃鍘熷嚭澶勪負(fù) www.dbahacker.com杞澆鐑﹁淇濈暀 閾炬帴


crazycy 2014-03-06 11:09 鍙戣〃璇勮
]]>
index study - 001http://m.tkk7.com/crazycy/archive/2014/01/22/409191.htmlcrazycycrazycyTue, 21 Jan 2014 19:02:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/22/409191.htmlhttp://m.tkk7.com/crazycy/comments/409191.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/22/409191.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/409191.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/409191.html
Source:http://programmerinterview.com/index.php/java-questions/java-introduction
How do database indexes work? And, how do indexes help? Provide a tutorial on database indexes.

Let’s start out our tutorial and explanation of why you would need a database index by going through a very simple example. Suppose that we have a database table called Employee with three columns – Employee_Name, Employee_Age, and Employee_Address. Assume that the Employee table has thousands of rows.

Now, let’s say that we want to run a query to find all the details of any employees who are named ‘Jesus’? So, we decide to run a simple query like this:

SELECT * FROM Employee  WHERE Employee_Name = 'Jesus'  

What would happen without an index on the table?

Once we run that query, what exactly goes on behind the scenes to find employees who are named Jesus? Well, the database software would literally have to look at every single row in the Employee table to see if the Employee_Name for that row is ‘Jesus’. And, because we want every row with the name ‘Jesus’ inside it, we can not just stop looking once we find just one row with the name ‘Jesus’, because there could be other rows with the name Jesus. So, every row up until the last row must be searched – which means thousands of rows in this scenario will have to be examined by the database to find the rows with the name ‘Jesus’. This is what is called a full table scan.

How a database index can help performance

You might be thinking that doing a full table scan sounds inefficient for something so simple – shouldn’t software be smarter? It’s almost like looking through the entire table with the human eye – very slow and not at all sleek. But, as you probably guessed by the title of this article, this is where indexes can help a great deal. The whole point of having an index is to speed up search queries by essentially cutting down the number of records/rows in a table that need to be examined.

What is an index?

So, what is an index? Well, an index is a data structure (most commonly a B- tree) that stores the values for a specific column in a table. An index is created on a column of atable. So, the key points to remember are that an index consists of column values from one table, and that those values are stored in a data structure. The index is a data structure – remember that.

What kind of data structure is an index?

B- trees are the most commonly used data structures for indexes. The reason B- trees are the most popular data structure for indexes is due to the fact that they are time efficient – because look-ups, deletions, and insertions can all be done in logarithmic time. And, another major reason B- trees are more commonly used is because the data that is stored inside the B- tree can be sorted. The RDBMS typically determines which data structure is actually used for an index. But, in some scenarios with certain RDBMS’s, you can actually specify which data structure you want your database to use when you create the index itself.

How does a hash table index work?

Hash tables are another data structure that you may see being used as indexes – these indexes are commonly referred to as hash indexes. The reason hash indexes are used is because hash tables are extremely efficient when it comes to just looking up values. So, queries that compare for equality to a string can retrieve values very fast if they use a hash index. For instance, the query we discussed earlier (SELECT * FROM Employee WHERE Employee_Name = ‘Jesus’) could benefit from a hash index created on the Employee_Name column. The way a hash index would work is that the column value will be the key into the hash table and the actual value mapped to that key would just be a pointer to the row data in the table. Since a hash table is basically an associative array, a typical entry would look something like “Jesus => 0×28939″, where 0×28939 is a reference to the table row where Jesus is stored in memory. Looking up a value like “Jesus” in a hash table index and getting back a reference to the row in memory is obviously a lot faster than scanning the table to find all the rows with a value of “Jesus” in the Employee_Name column.

The disadvantages of a hash index

Hash tables are not sorted data structures, and there are many types of queries which hash indexes can not even help with. For instance, suppose you want to find out all of the employees who are less than 40 years old. How could you do that with a hash table index? Well, it’s not possible because a hash table is only good for looking up key value pairs – which means queries that check for equality (like “WHERE name = ‘Jesus’”). What is implied in the key value mapping in a hash table is the concept that the keys of a hash table are not sorted or stored in any particular order. This is why hash indexes are usually not the default type of data structure used by database indexes – because they aren’t as flexible as B- trees when used as the index data structure. Also see: Binary trees versus Hash Tables.

What are some other types of indexes?

Indexes that use a R- tree data structure are commonly used to help with spatial problems. For instance, a query like “Find all of the Starbucks within 2 kilometers of me” would be the type of query that could show enhanced performance if the database table uses a R- tree index.

Another type of index is a bitmap index, which work well on columns that contain Boolean values (like true and false), but many instances of those values – basically columns with low selectivity.

How does an index improve performance?

Because an index is basically a data structure that is used to store column values, looking up those values becomes much faster. And, if an index is using the most commonly used data structure type – a B- tree – then the data structure is alsosorted. Having the column values be sorted can be a major performance enhancement – read on to find out why.

Let’s say that we create a B- tree index on the Employee_Name column This means that when we search for employees named “Jesus” using the SQL we showed earlier, then the entire Employee table does not have to be searched to find employees named “Jesus”. Instead, the database will use the index to find employees named Jesus, because the index will presumably be sorted alphabetically by the Employee’s name. And, because it is sorted, it means searching for a name is a lot faster because all names starting with a “J” will be right next to each other in the index! It’s also important to note that the index also stores pointers to the table row so that other column values can be retrieved – read on for more details on that.

What exactly is inside a database index?

So, now you know that a database index is created on a column in a table, and that the index stores the values in that specific column. But, it is important to understand that a database index does not store the values in the other columns of the same table. For example, if we create an index on the Employee_Name column, this means that the Employee_Age and Employee_Address column values are not also stored in the index. If we did just store all the other columns in the index, then it would be just like creating another copy of the entire table – which would take up way too much space and would be very inefficient.

An index also stores a pointer to the table row

So, the question is if the value that we are looking for is found in an index (like ‘Jesus’) , how does it find the other values that are in the same row (like the address of Jesus and his age)? Well, it’s quite simple – database indexes also store pointers to the corresponding rows in the table. A pointer is just a reference to a place in memory where the row data is stored on disk. So, in addition to the column value that is stored in the index, a pointer to the row in the table where that value lives is also stored in the index. This means that one of the values (or nodes) in the index for an Employee_Name could be something like (“Jesus”, 0×82829), where 0×82829 is the address on disk (the pointer) where the row data for “Jesus” is stored. Without that pointer all you would have is a single value, which would be meaningless because you would not be able to retrieve the other values in the same row – like the address and the age of an employee.

How does a database know when to use an index?

When a query like “SELECT * FROM Employee WHERE Employee_Name = ‘Jesus’ ” is run, the database will check to see if there is an index on the column(s) being queried. Assuming the Employee_Name column does have an index created on it, the database will have to decide whether it actually makes sense to use the index to find the values being searched – because there are some scenarios where it is actually less efficient to use the database index, and more efficient just to scan the entire table. Read this article to understand more about those scenarios: Selectivity in SQL.

Can you force the database to use an index on a query?

Generally, you will not tell the database when to actually use an index – that decision will be made by the database itself. Although it is worth noting that in most databases (like Oracle and MySQL), you can actually specify that you want the index to be used.

How to create an index in SQL:

Here’s what the actual SQL would look like to create an index on the Employee_Name column from our example earlier:CREATE INDEX name_index ON Employee (Employee_Name) 

How to create a multi-column index in SQL:

We could also create an index on two of the columns in the Employee table , as shown in this SQL:CREATE INDEX name_index ON Employee (Employee_Name, Employee_Age)

What is a good analogy for a database index?

A very good analogy is to think of a database index as an index in a book. If you have a book about dogs and you are looking for the section on Golden Retrievers, then why would you flip through the entire book – which is the equivalent of a full table scan in database terminology – when you can just go to the index at the back of the book, which will tell you the exact pages where you can find information on Golden Retrievers. Similarly, as a book index contains a page number, a database index contains a pointer to the row containing the value that you are searching for in your SQL.

What is the cost of having a database index?

So, what are some of the disadvantages of having a database index? Well, for one thing it takes up space – and the larger your table, the larger your index. Another performance hit with indexes is the fact that whenever you add, delete, or update rows in the corresponding table, the same operations will have to be done to your index. Remember that an index needs to contain the same up to the minute data as whatever is in the table column(s) that the index covers.

As a general rule, an index should only be created on a table if the data in the indexed column will be queried frequently.



crazycy 2014-01-22 03:02 鍙戣〃璇勮
]]>
NoSQL瀛︿範(fàn)錛堜節(jié)錛夛豢 2014騫村叓澶ф渶鐑棬鐨勫ぇ鏁版嵁宸ヤ綔http://m.tkk7.com/crazycy/archive/2014/01/19/409098.htmlcrazycycrazycySat, 18 Jan 2014 18:20:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/19/409098.htmlhttp://m.tkk7.com/crazycy/comments/409098.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/19/409098.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/409098.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/409098.html2014騫村叓澶ф渶鐑棬鐨勫ぇ鏁版嵁宸ヤ綔
浣滆咃細(xì)寮犻湒 1鏈?nbsp;16, 2014
http://www.ctocio.com/ccnews/14565.html
鍘熸枃閾炬帴錛?鏂囩珷鏉ヨ嚜IT緇忕悊緗?/a>

澶ф暟鎹椂浠o紝鏁版嵁榪囧墿錛屼漢鎵嶇煭緙猴紝瓚婃潵瓚婂鐨処T涓撲笟浜哄+甯屾湜鑳藉榪涘叆鍏呮弧鏈洪亣鐨勫ぇ鏁版嵁棰嗗煙錛屼絾鏄紝鍒板簳鍝簺鍏蜂綋鐨勫ぇ鏁版嵁涓撲笟宀椾綅鍜屼漢鎵嶆渶涓哄悆棣欏憿錛熶漢鍔涜祫婧愬叕鍙窴force榪戞棩鍙戝竷浜嗕竴浠芥姤鍛婃牴鎹?a style="font-size: 1em; outline: 0px; padding: 0px; margin: 0px; border: 0px; text-decoration: none; vertical-align: baseline; color: #004276;">IT鑱屼笟钖叕姘村鉤緇欏嚭浜?014騫存渶鐑棬鐨勫崄澶уぇ鏁版嵁宸ヤ綔鑱屼綅錛堝勾钖級錛?/p>

涓銆丒TL寮鍙戣咃紙11-13涓囩編鍏冿級
闅忕潃鏁版嵁縐嶇被鐨勪笉鏂鍔狅紝浼佷笟瀵規(guī)暟鎹暣鍚堜笓涓氫漢鎵嶇殑闇姹傝秺鏉ヨ秺鏃虹洓銆侲TL寮鍙戣呬笌涓嶅悓鐨勬暟鎹潵婧愬拰緇勭粐鎵撲氦閬擄紝浠庝笉鍚岀殑婧愬ご鎶藉彇鏁版嵁錛岃漿鎹㈠茍瀵煎叆鏁版嵁浠撳簱浠ユ弧瓚充紒涓氱殑闇瑕併?/span>

ETL杞歡琛屼笟鐩稿鎴愮啛錛岀浉鍏沖矖浣嶇殑宸ヤ綔鐢熷懡鍛ㄦ湡姣旇緝闀匡紝閫氬父鐢卞唴閮ㄥ憳宸ュ拰澶栧寘鍚堝悓鍟嗕箣闂撮氬姏瀹屾垚銆侲TL浜烘墠鍦ㄥぇ鏁版嵁鏃朵唬鐐欐墜鍙儹鐨勫師鍥犱箣涓鏄細(xì)鍦ㄤ紒涓氬ぇ鏁版嵁搴旂敤鐨勬棭鏈熼樁孌碉紝Hadoop鍙槸絀蜂漢鐨凟TL銆?br />
浜屻丠adoop寮鍙戣咃紙15-17.5涓囩編鍏冿級
Hadoop鏄熀浜嶫ava鐨勫紑婧愭鏋訛紝闅忕潃鏁版嵁闆嗚妯′笉鏂澶э紝鑰屼紶緇烞I鐨勬暟鎹鐞嗘垚鏈繃楂橈紝浼佷笟瀵?/span>Hadoop鍙婄浉鍏崇殑寤変環(huán)鏁版嵁澶勭悊鎶鏈Hive銆丠Base銆丮apReduce銆丳ig絳夌殑闇姹傚皢鎸佺畫澧為暱銆傚浠婂叿澶嘓adoop妗嗘灦緇忛獙鐨勬妧鏈漢鍛樻槸鏈鎶㈡墜鐨勫ぇ鏁版嵁浜烘墠銆?br />
涓夈佸ぇ鏁版嵁鍙鍖栧伐鍏峰紑鍙戣咃紙15-17.5涓囩編鍏冿級
嫻烽噺鏁版嵁鐨勫垎鏋愭槸涓ぇ鎸戞垬錛岃?/span>鏂板瀷鏁版嵁鍙鍖栧伐鍏峰Spotifre錛孮likview鍜孴ableau鍙互鐩磋楂樻晥鍦板睍紺烘暟鎹?/strong>銆傝繃鍘伙紝鏁版嵁鍙鍖栧睘浜庡晢涓氭櫤鑳藉紑鍙戣呯被鍒紝浣嗘槸闅忕潃Hadoop鐨勫礇璧鳳紝鏁版嵁鍙鍖栧凡緇忔垚浜嗕竴欏圭嫭绔嬬殑涓撲笟鎶鑳藉拰宀椾綅銆?br />
鍥涖佹暟鎹瀛﹀錛?2-14涓囩編鍏冿級
榪囧幓涔熺О鏁版嵁鏋舵瀯甯堬紝鏁版嵁縐戝瀹舵槸涓涓叏鏂扮殑宸ョ錛岃兘澶熷皢浼佷笟鐨勬暟鎹拰鎶鏈漿鍖栦負(fù)浼佷笟鐨勫晢涓氫環(huán)鍊箋傛暟鎹瀛﹀棣栧厛搴斿綋鍏峰浼樼鐨勬矡閫氭妧鑳斤紝鑳藉鍚屾椂灝嗘暟鎹垎鏋愮粨鏋滆В閲婄粰IT閮ㄩ棬鍜屼笟鍔¢儴闂ㄩ瀵箋?/span>

鎬葷殑鏉ヨ錛屾暟鎹瀛﹀鏄垎鏋愬笀銆佽壓鏈鐨勫悎浣擄紝闇瑕佸叿澶囧縐嶄氦鍙夌瀛﹀拰鍟嗕笟鎶鑳姐?br />
浜斻丱LAP寮鍙戣咃紙9.8-11.6涓囩編鍏冿級
OLAP鍦ㄧ嚎鑱旀満鍒嗘瀽寮鍙戣咃紝璐熻矗灝嗘暟鎹粠鍏崇郴鍨嬫垨闈炲叧緋誨瀷鏁版嵁婧愪腑鎶藉彇鍑烘潵寤虹珛妯″瀷錛岀劧鍚庡垱寤烘暟鎹闂殑鐢ㄦ埛鐣岄潰錛屾彁渚涢珮鎬ц兘鐨勯瀹氫箟鏌ヨ鍔熻兘銆?/strong>

鍏佹暟鎹粨搴撲竴浣撴満涓撳錛?.8-12.4涓囩編鍏冿級
姝ょ被涓撳鐔熸?zhèn)塗eradata銆丯eteeza鍜孍xadata絳夊叕鍙哥殑澶ф暟鎹竴浣撴満銆傝兘澶熷湪榪欎簺涓浣撴満涓婂畬鎴愭暟鎹泦鎴愩佺鐞嗗拰鎬ц兘浼樺寲絳夊伐浣溿?br />
涓冦侀嫻嬪垎鏋愬紑鍙戣咃紙10-13涓囩編鍏冿級
钀ラ攢閮ㄩ棬緇忓父浣跨敤棰勬祴鍒嗘瀽棰勬祴鐢ㄦ埛琛屼負(fù)鎴栭攣瀹氱洰鏍囩敤鎴楓傞嫻嬪垎鏋愬紑鍙戣呮湁浜涘満鏅湅涓婃湁鏈変簺綾諱技鏁版嵁縐戝瀹訛紝鍗沖湪浼佷笟鍘嗗彶鏁版嵁鐨勫熀紜涓婇氳繃鍋囪鏉ユ祴璇曢槇鍊煎茍棰勬祴鏈潵鐨勮〃鐜般?br />
鍏佷俊鎭灦鏋勫笀錛?1.4-13.5涓囩編鍏冿級
澶ф暟鎹噸鏂版縺鍙戜簡涓繪暟鎹鐞嗙殑鐑疆銆傚厖鍒嗗紑鍙戝埄鐢ㄤ紒涓氭暟鎹茍鏀寔鍐崇瓥闇瑕侀潪甯鎬笓涓氱殑鎶鑳姐備俊鎭灦鏋勫笀蹇呴』浜嗚В濡備綍瀹氫箟鍜屽瓨妗e叧閿厓绱狅紝紜繚浠ユ渶鏈夋晥鐨勬柟寮忚繘琛屾暟鎹鐞嗗拰鍒╃敤銆備俊鎭灦鏋勫笀鐨勫叧閿妧鑳藉寘鎷富鏁版嵁綆$悊銆佷笟鍔$煡璇嗗拰鏁版嵁寤烘ā絳夈?/span>



crazycy 2014-01-19 02:20 鍙戣〃璇勮
]]>
NoSQL瀛︿範(fàn)錛堝叓錛夛豢 澶ф暟鎹鈥滆惤鍦扳濓紝榪樼己浜涗粈涔堬紵http://m.tkk7.com/crazycy/archive/2014/01/19/409097.htmlcrazycycrazycySat, 18 Jan 2014 17:59:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/19/409097.htmlhttp://m.tkk7.com/crazycy/comments/409097.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/19/409097.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/409097.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/409097.html澶ф暟鎹“钀藉湴”錛岃繕緙轟簺浠涔?br />http://www.pingwest.com/bigdata2/

澶ф暟鎹?/span>鏄湪2013騫磋鐢ㄦ互浜嗙殑璇嶆眹錛屼絾瀹為檯涓婏紝鐢變簬鏁版嵁閲忕己澶便佸ぇ鏁版嵁娓呮礂鍜屽垎鏋愯兘鍔涗笉瓚籌紝浠ュ強鏁版嵁鍙鍖栫摱棰堢瓑闂錛?/span>澶ф暟鎹?/span>涓鐩存湭鑳借繜榪熻惤鍦般備即闅忕潃鍩虹璁炬柦鐨勫彂灞曪紝鎰忓懗鐫澶ф暟鎹殑鍙戝睍鍙堣蛋鍒版柊鐨勪竴涓柊鐨勪復(fù)鐣岀偣銆傜郴緇熻蔣浠朵緵搴斿晢Software AG鐨?/span>Gagan Mehra錛屽湪Venturebeat緗戠珯闃愯堪浜嗕粬瀵逛簬澶ф暟鎹帴涓嬫潵鍙戝睍鐨勮璇嗭紝浠栬涓烘洿蹇湴鏁版嵁澶勭悊銆佹洿鍙潬鐨勬暟鎹川閲忥紝浠ュ強鏇村姞緇嗗垎鐨勫簲鐢ㄥ競鍦猴紝鏄ぇ鏁版嵁2.0鏃朵唬鐨勯噸瑕佺壒寰併?br />

鏇村揩鐨勬暟鎹鐞嗛熷害

鐢變簬鏁版嵁閲忔寚鏁板瀷澧為暱錛屼嬌寰?/span>瀵逛簬鏁版嵁鐨勫揩閫熷垎鏋愮殑闇瑕?/strong>宸茬粡鍙樺緱姣斾互寰浠諱綍鏃跺欓兘瑕佽揩鍒囥傚嚑涔庢瘡瀹跺ぇ鏁版嵁鍘傚晢錛岄兘鎯寵鍏滃敭姣斿埆瀹跺鐞嗛熷害鏇村揩鐨勪駭鍝併?/span>Hadoop鍙戝竷鐨勬柊鍝?/span>Hadoop 2.0 / YARN錛屽嚑涔庤兘瀹炴椂鍒嗘瀽鏁版嵁銆傝屼笅涓浠eぇ鏁版嵁鐨勮綆楃壍寮曟鏋?/span>Apache Spark錛屽畠鐨勯熷害姣?/span>Hadoop蹇?/span>100鍊嶃?/span>紜呰胺椋庨櫓鎶曡祫鏈烘瀯Andreessen Horowitz錛屽凡緇忎互1400涓囩編鍏冪殑浠鋒牸錛岄鎶曚簡涓瀹朵互Apache Spark涓轟笟鍔℃牳蹇冪殑鍒濆垱浼佷笟Databricks銆備笉涔呭墠錛?/span>浜氶┈閫婁篃涓婄嚎浜嗗疄鏃舵祦鏁版嵁鏈嶅姟Kinesis錛屾潵甯姪娌℃湁鏁版嵁澶勭悊鑳藉姏鐨勫叕鍙歌В鍐寵繖涓闂銆?br />

璁稿鍒嗘瀽渚涘簲鍟嗛兘宸茬粡璁よ瘑鍒頒簡鏁版嵁澶勭悊閫熷害鐨勯噸瑕佹?/strong>錛屽茍寤虹珛浜嗚兘澶熸瘡縐掑鐞?/span>TB鏁版嵁鐨勪駭鍝併?/span>浼犳劅鍣ㄦ暟鎹垎鏋愩佺墿鑱旂綉鍦ㄥ伐涓氬拰娑堣垂綰у競鍦哄揩閫熷彂灞曠殑鍔垮ご錛岄┍鍔ㄤ簡榪欐鍙橀潻銆?/strong>姣斿涓瀹朵紒涓氱殑浼犳劅鍣紝鑳藉姣忕浜х敓鍑烘暟鐧炬鐨勪簨浠訛紝瀹炴椂澶勭悊榪欎簺鏁版嵁闅懼害寰堥珮銆傜壒鍒槸褰撳疄鏃跺鐞嗙殑浼犳劅鍣ㄦ暟鎹紝嬋澧炲埌涓澶?/span>5TB鐨勬椂鍊欙紝閫熷害錛屽氨鎴愪簡灝や負(fù)鍏抽敭鐨勬寚鏍囥?/span>


鍚屾椂錛屽敖綆℃暟鎹瓨鍌ㄦ垚鏈凡緇忕瘡騫翠笅闄嶏紝浣嗘暟鎹瓨鍌ㄧ殑璐圭敤榪樻槸涓嶅皬鐨勪竴絎旀敮鍑恒傞儴鍒嗗晢瀹剁浉姣斿瓨鍌ㄥ畬鏁存暟鎹祦鑰岃█錛屾洿鍊懼悜浜庝繚瀛樿繃婊ゆ帀鍣煶鐨勬暟鎹?br />

鏅鴻兘娓呮礂鍨冨溇鏁版嵁

鍦ㄦ湰灝遍毦浠ヨ鏁扮殑鏁版嵁閲忕戶緇互鎸囨暟妯″瀷嬋澧炴椂錛屽浜庢暟鎹川閲忕殑寮哄寲錛屼究鎽嗕笂浜嗚澶氭暟鎹緵搴斿晢鐨勮紼嬨?/span>鎹㈠彞璇濊錛屽湪搴炲ぇ鏁版嵁闈㈠墠錛屽嵆浣胯綆楁満鑳藉楂樻晥鐨勫鐞嗗畠浠紝浣嗗ぇ閲忔棤鐢ㄧ殑鍨冨溇鏁版嵁錛屽彧浼?xì)缁櫨p葷粺甯︽潵璐熸媴錛屽茍澧炴坊瀛樺偍銆佷富鏈虹瓑璁懼鎴愭湰銆?/span>榪欏氨闇瑕佹暟鎹鐞嗚繃紼嬩腑錛屾牴鎹壒瀹氱殑瑙勫垯鍜屽弬鏁幫紝瀵規(guī)秾榪涙暟鎹祦榪涜娓呮礂鍜屽垎鏋愶紝騫惰嚜鍔ㄥ喅絳栬鍘誨鐞嗗摢浜涙暟鎹紝榪欎竴鍒囦笉鍐嶉渶瑕佷漢宸ュ幓騫查銆?/span>

鍦ㄨ繖鏍風(fēng)殑鐜涓嬶紝濡傛灉閫夋嫨浜嗕竴涓潖鐨勬暟鎹紝灝變細(xì)鍍忕梾姣掍竴鏍鳳紝鍙兘寮曞彂榪炵畫鐨勯敊璇喅絳栵紝鐢氳嚦璁╀紒涓氳挋鍙楃粡嫻庢崯澶便?/span>涓涓緥瀛愬氨鏄埄鐢ㄧ畻娉曞幓榪涜鑲$エ浜ゆ槗錛屼互姣璁℃暟鑲$エ甯傚満涓紝浠諱綍涓鐐瑰皬鐨勫樊閿欙紝閮芥湁鍙兘寮曞彂鏃犳硶宸ㄥぇ鐨勬崯澶便?/strong>

鎵浠ワ紝鏁版嵁璐ㄩ噺宸叉垚涓烘湇鍔$駭鍒崗璁紙
service level agreements錛夋渶閲嶈鐨勫弬鏁頒箣涓銆傛棤娉曞睆钄藉姡璐ㄧ殑鏁版嵁鐨勪緵搴斿晢錛屼細(xì)鍥犳琚垪鍏ヨ涓氱殑榛戝悕鍗曪紝浠ュ強闈復(fù)涓ラ噸鐨勭粡嫻庡緗氥?/span>B2B琛屼笟涓烘棭鏈熸暟鎹川閲忕殑鍏ュ眬鑰咃紝浠栦滑闈炲父閲嶈鏁版嵁鐨勮川閲忥紝鏉ヤ繚鎸佸晢涓氳繍浣滄椂鐨勭ǔ瀹氭с傜敋鑷籌紝璁稿浼佷笟璁″垝涓烘暟鎹川閲忛儴緗插疄鏃剁殑璀﹀憡緋葷粺錛岃繖浜涜鍛婁細(xì)琚彂閫佷簬璐熻矗鐩稿簲闂鐨勪笓鍛橈紝鐢變粬浠彁渚涢棶棰樼殑瑙e喅鏂規(guī)銆?br />

鏈哄櫒瀛︿範(fàn)鏄彟涓欏歸渶瑕佷繚璇佹暟鎹川閲忕殑棰嗗煙銆傛満鍣ㄥ涔?fàn)绯痪l熼儴緗插湪涓涓棴鐜殑鐢熸佷腑錛岄氳繃妯″紡鍒嗘瀽涓庡叾浠栫殑鏁版嵁鍒嗘瀽鎶鏈紝緇嗗寲鍘熸潵鐨勬暟鎹川閲忚鍒欍傝岄珮璐ㄩ噺鐨勬暟鎹紝鑳藉淇濊瘉鏈哄櫒榪涜姝g‘鐨勮涓烘ā寮忓垎鏋愩?/span>


瓚婃潵瓚婂鐨勫熀紜搴旂敤

澶ф暟鎹甫鏉ョ殑鍙橀潻錛屼嬌寰楁瘡涓涓漢閮芥兂瑕佸埄鐢ㄥ畠錛屼絾鎶鏈笂闂ㄦ鍙堣璁稿浜轟笉寰楀凡鍙兘鍏呭綋涓涓湅瀹€傝屽簲鐢ㄥ皢鏈夊姪浜庝漢浠幓鍏嬫湇榪欎竴鍥伴毦銆傚湪鎺ヤ笅鏉ョ殑鍑犲勾涓紝鎴戜滑灝嗕細(xì)鐪嬪埌鎴愬崈涓婁竾鐨勮В鍐?/span>鏌愪竴鍨傜洿棰嗗煙鐨勪笓涓氬簲鐢?/strong>錛屼互搴斿鏉ヨ嚜鍚勮鍚勪笟鐨勫ぇ鏁版嵁鎸戞垬銆?br />

鐩墠錛屽凡緇忓皬鏈夋垚灝辯殑鏁版嵁鍒嗘瀽鍏徃鍖呮嫭eHarmony銆?/span> Roambi銆?/span> Climate Corporation絳夌瓑銆傛湭鏉ワ紝鐢氳嚦璁稿灝忎紒涓氾紝鏃笉鐢ㄤ緷璧栫壒瀹氬熀紜璁懼錛屼篃涓嶈闆囦劍涓撲笟鐨勬暟鎹瀛﹀錛屽氨鑳藉彈鐩婁簬瀵瑰ぇ鏁版嵁鍒嗘瀽鍒╃敤銆?br />

姣斿錛屼竴浜涘簲鐢ㄥ皢浠庡悇縐嶆笭閬擄紝鏀墮泦鍏寵仈鐨勫鎴鋒暟鎹紝浠ユ洿濂藉湴浜嗚В瀹㈡埛鐨勯渶姹傘備粠鑰屼紒涓氳兘澶熶負(fù)鐗瑰畾鐨勭洰鏍囧鎴鳳紝鎻愪緵鐗瑰畾闇姹傜殑浜у搧錛屾洿鏈夐拡瀵規(guī)у湴璧氬埌閽便傚綋榪欎簺搴旂敤璧拌繘浜轟滑鏃ュ父鐨勫悆鍠濈帺涔愩佸尰鐤椾繚鍋ョ瓑棰嗗煙錛岀敓媧諱篃浼?xì)鍥犳鑰屾洿緹庡ソ銆?/span>

 



crazycy 2014-01-19 01:59 鍙戣〃璇勮
]]>
NoSQL瀛︿範(fàn)錛堜竷錛塇adoop鏄暟鎹粨搴撶殑緇堢粨鑰呭悧?http://m.tkk7.com/crazycy/archive/2014/01/19/409096.htmlcrazycycrazycySat, 18 Jan 2014 17:27:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/19/409096.htmlhttp://m.tkk7.com/crazycy/comments/409096.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/19/409096.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/409096.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/409096.htmlHadoop鏄暟鎹粨搴撶殑緇堢粨鑰呭悧?
2014騫?1鏈?3鏃ャ|銆浣滆咃細(xì)閭歸摦緙栬瘧銆|銆鏉ユ簮錛氱綉鐣岀綉
http://news.cnw.com.cn/news-international/htm2014/20140113_289451.shtml

銆?/span>CNW.com.cn鐙璇戠ǹ銆?/span>鍦ㄨ繃鍘諱笁騫達(dá)紝Hadoop鐢熸佺郴緇熷凡緇忓ぇ鑼冨洿鎵╁睍錛屽緢澶氫富瑕両T渚涘簲鍟嗛兘鎺ㄥ嚭浜咹adoop榪炴帴鍣紝浠ュ寮篐adoop鐨勯《灞傛灦鏋勬垨鏄緵搴斿晢鑷繁浣跨敤鐨凥adoop鍙戣鐗堛傞壌浜嶩adoop鐨勯儴緗茬巼鍛堟寚鏁扮駭鐨勫闀匡紝浠ュ強鍏剁敓鎬佺郴緇熶笉鏂湴娣卞叆鑰屽箍娉涘湴鍙戝睍錛屾垜浠緢鎯崇煡閬揌adoop鐨勫礇璧鋒槸鍚︿細(xì)瀵艱嚧浼犵粺鏁版嵁浠撳簱瑙e喅鏂規(guī)鐨勭粓緇撳憿銆?/span>

鎴戜滑涔熷彲浠ュ皢榪欎釜闂鏀懼埌涓涓洿澶х殑鐜涓幓璁ㄨ錛氬湪浣曠紼嬪害涓婏紝澶ф暟鎹細(xì)鏀瑰彉浼犵粺鏁版嵁鍒嗘瀽鐨勭幆澧?/span>?

鏁版嵁浠撳簱鏄妧鏈拰杞歡濂椾歡錛屽畠鑳藉浠庢搷浣滅郴緇熸敹闆嗘暟鎹紝騫跺皢榪欎簺鏁版嵁鏁村悎錛屽茍緇熶竴鍒頒腑澶暟鎹簱涓紝鐒跺悗瀵規(guī)暟鎹華琛ㄧ洏涓婃寚鏍囪繘琛屽垎鏋愩佸彲瑙嗗寲鍜岃拷韙叧閿ц兘澶勭悊銆?/span>

鏁版嵁浠撳簱鍜?/span>Hadoop涔嬮棿鐨勪富瑕佸尯鍒槸錛氭暟鎹粨搴撻氬父閮ㄧ講鍦ㄥ崟涓叧緋繪暟鎹簱涓紝鑰岃繖涓暟鎹簱鍒欒搗鍒頒腑澶瓨鍌ㄧ殑浣滅敤銆傜浉姣斾箣涓嬶紝Hadoop鍙婂叾Hadoop鏂囦歡緋葷粺鏄法澶氫釜鏈哄櫒錛屽茍鐢ㄦ潵澶勭悊嫻烽噺鏁版嵁鐨勶紝鑰岃繖鏄換浣曞崟鍙版満鍣ㄩ兘杈句笉鍒扮殑鑳藉姏銆?/span>

姝ゅ錛?/span>Hadoop鐢熸佺郴緇熷寘鎷瀯寤哄湪Hadoop鏍稿績涔嬩笂鐨勬暟鎹粨搴撳眰/鏈嶅姟錛岃孒adoop涓婂眰鏈嶅姟鍖呮嫭SQL(Presto)銆丼QL-Like(Hive)鍜孨oSQL(Hbase)綾誨瀷鐨勬暟鎹瓨鍌?/span>銆傜浉姣斾箣涓嬶紝鍦ㄨ繃鍘葷殑鍗佸勾涓紝澶у瀷鏁版嵁浠撳簱杞Щ鍒頒嬌鐢ㄨ嚜瀹氫箟澶氬鐞嗗櫒璁懼鏉ユ墿灞曟暟鎹噺錛屽儚Netezza(琚獻(xiàn)BM鏀惰喘)鍜孴eradata鎵鎻愪緵鐨勬暟鎹粨搴撱傜劧鑰岋紝榪欎簺璁懼閮介潪甯告槀璐碉紝澶у鏁頒腑灝忎紒涓氶兘璐熸媴涓嶈搗銆?/span>

鍦ㄨ繖縐嶈儗鏅笅錛屾垜浠緢鑷劧鍦拌闂細(xì)Hadoop鏄惁鏄暟鎹粨搴撶殑緇堢粨鑰?

涓轟簡鍥炵瓟榪欎釜闂錛屾垜浠渶瑕佸皢鏁版嵁浠撳簱鎶鏈笌鏁版嵁浠撳簱閮ㄧ講鍒嗗紑鏉ョ湅銆?/span>Hadoop(鍜孨oSQL鏁版嵁搴撶殑鍑虹幇)灝嗛紺虹潃鏁版嵁浠撳簱璁懼鍜屼紶緇熸暟鎹粨搴撳崟涓鏁版嵁搴撻儴緗茬殑娑堜骸銆?/span>

鑰屽湪榪欐柟闈㈠氨鏈夎繃瀹炰緥銆?/span>Hadoop渚涘簲鍟咰loudera灝嗗叾騫沖彴浣滀負(fù)“浼佷笟鏁版嵁鏋㈢航”錛岃繖鍦ㄦ湰璐ㄤ笂灝嗕紶緇熸暟鎹鐞嗚В鍐蟲柟妗堢殑綰沖叆浜嗛渶姹傘俁eadWrite.com鍦ㄦ渶榪戝彂琛ㄧ殑涓綃囬涓?#8220;涓轟粈涔堜笓鏈夊ぇ鏁版嵁鎶鏈病鏈夊笇鏈涗笌Hadoop绔炰簤”鐨勬枃绔犱腑涔熷彂琛ㄤ簡綾諱技鐨勭湅娉曘傚悓鏍峰湴錛屾渶榪戜竴綃囧崕灝?dāng)琛楁棩鎶ユ枃绔犳弿杩颁簡Hadoop濡備綍鎸戞垬鐢查鏂囧拰Teradata銆?/span>

Hadoop鎴朜oSQL鐢熸佺郴緇熶粛灝嗙戶緇彂灞曘傚緢澶氬ぇ鏁版嵁鐜寮濮嬮夋嫨NoSQL銆丼QL鐢氳嚦鏄疦ewSQL鏁版嵁浠撳簱鐨勬販鍚堟柟娉曘傛澶栵紝MapReduce騫惰澶勭悊寮曟搸涔熸湁鍙樺寲鍜屾敼榪涳紝渚嬪Apache鐨凷park欏圭洰銆傝櫧鐒惰繖涓晠浜嬭繕榪滆繙娌℃湁緇撴潫錛?strong>浣嗗彲浠ヨ錛屼紶緇熺殑鍗曚竴鏈嶅姟鍣ㄥ叧緋誨瀷鏁版嵁搴撴垨鏁版嵁搴撹澶囧茍涓嶆槸澶ф暟鎹垨鏁版嵁浠撳偍鐨勬湭鏉?/strong>銆?/span>

鍙︿竴鏂歸潰錛屾暟鎹粨搴撴妧鏈?/span>(鍖呮嫭鎻愬彇—杞崲—鍜?#8212;鍔犺澆銆佷笁緇村緩妯″拰鍟嗕笟鏅鴻兘)灝嗕細(xì)搴旂敤鍒版柊鐨凥adoop/NoSQL鐜銆傛澶栵紝榪欎簺鎶鏈篃灝嗗彉韜潵鏀寔鏇村鐨勬販鍚堢幆澧冦備富瑕佸師鍒欐槸鍥犱負(fù)騫朵笉鏄墍鏈夋暟鎹兘鏄鉤絳夌殑錛屾墍浠T緇忕悊浠簲璇ラ夋嫨鏁版嵁瀛樺偍鍜岃闂満鍒舵潵閫傚簲鏁版嵁鐨勪嬌鐢ㄣ傛販鍚堢幆澧冨皢鍖呮嫭鍏抽敭浠峰煎瓨鍌ㄣ佸叧緋誨瀷鏁版嵁搴撱佸浘褰㈠瓨鍌ㄣ佹枃妗e瓨鍌ㄣ佹煴鐘跺瓨鍌ㄣ乆ML鏁版嵁搴撱佸厓鏁版嵁鐩綍絳夌瓑銆?/span>

姝e浣犳墍鐪嬪埌鐨勶紝榪欏茍涓嶆槸涓涓畝鍗曠殑闂錛屼篃涓嶅彲鑳界畝鍗曞湴寰楀嚭涓涓瓟妗堛傜劧鑰岋紝涓鑸儏鍐典笅錛岃櫧鐒跺ぇ鏁版嵁鍦ㄦ湭鏉ヤ簲騫村唴灝嗕細(xì)鏀瑰彉鏁版嵁浠撳簱鐨勯儴緗詫紝浣嗗畠涓嶄細(xì)瀵艱嚧鏁版嵁浠撳簱鐨勬蹇靛拰鍋氭硶榪囨椂銆?/span>

瀵逛簬鍚戞暟鎹粨搴撴姇鍏ュ法璧勭殑鑱旈偊鏀垮簻榪欐剰鍛崇潃浠涔堝憿?

棣栧厛錛屽綋鐜版湁鏁版嵁浠撳簱鐨勫閲忎笉澶熸椂錛屾暟鎹粨搴撳皢琚漿縐誨埌鍩轟簬Hadoop銆佸鏈哄櫒鎴栦簯鎵樼鐨勮В鍐蟲柟妗堛傚叾嬈★紝浼佷笟騫朵笉浼?xì)閫夋嫨“鏀句箣鍥涙搗鑰岀殕鍑?#8221;鐨勫仛娉曪紝鑰屼細(xì)灝嗙洰鍏夎漿鍚戦傚悎鍏朵紒涓氬唴閮ㄦ暟鎹閲忕殑娣峰悎瀛樺偍鏂規(guī)硶銆傦紙閭歸摦緙栬瘧錛?/span>

 



crazycy 2014-01-19 01:27 鍙戣〃璇勮
]]>
NoSQL瀛︿範(fàn)錛堝叚錛夛豢 2014騫村ぇ鏁版嵁鍒嗘瀽瓚嬪娍灞曟湜(杞?http://m.tkk7.com/crazycy/archive/2014/01/18/409091.htmlcrazycycrazycySat, 18 Jan 2014 13:51:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/18/409091.htmlhttp://m.tkk7.com/crazycy/comments/409091.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/18/409091.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/409091.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/409091.html2014騫村ぇ鏁版嵁鍒嗘瀽瓚嬪娍灞曟湜
Posted on 2014騫?1鏈?鏃?nbsp;by DinK in 琛屼笟璧勮 
http://www.199it.com/archives/185758.html

甯傚満鐮旂┒鍏徃IDC棰勬祴錛?015騫村ぇ鏁版嵁甯傚満瑙勬ā灝嗕粠2010騫寸殑32浜跨編鍏冨闀垮埌170浜跨編鍏冿紝澶嶅悎騫村闀跨巼涓?0%銆傚ぇ鏁版嵁鏄竴涓簽澶х殑鏂扮殑棰嗗煙錛屽叾涓殑鏁版嵁闆嗗彲浠ュ闀跨殑闈炲父搴炲ぇ錛屼互鑷充簬浣跨敤浼犵粺鐨勬暟鎹簱綆$悊宸ュ叿涔熷緢闅懼鐞嗐傚鐞嗚繖縐嶉棶棰樻墍闇瑕佺殑鏂板伐鍏楓佹鏋躲佺‖浠躲佽蔣浠跺拰鏈嶅姟鏄竴涓法澶х殑甯傚満鏈轟細(xì)銆傞殢鐫浼佷笟鐢ㄦ埛瓚婃潵瓚婂鍦伴渶瑕佽繛緇笉鏂湴璁塊棶鏁版嵁錛屽ソ鐨勫ぇ鏁版嵁宸ュ叿闆嗗皢浠ユ渶浣庣殑鎴愭湰鍜屾帴榪戝疄鏃剁殑閫熷害鎻愪緵鍙幾緙╃殑銆侀珮鎬ц兘鐨勫垎鏋愩傞氳繃鍒嗘瀽榪欑鏁版嵁錛屼紒涓氬彲寰楀埌鏇村ぇ鐨勬櫤鑳戒互鍙婄珵浜変紭鍔褲備笅闈㈡槸Hadoop鍜屽ぇ鏁版嵁涓撲笟鍘傚晢MapR鍏卞悓鍒涘浜哄拰棣栧腑鎵ц瀹樼害緲?#183;鏂界綏寰鳳紙John Schroeder錛夊2014澶ф暟鎹競鍦虹殑棰勬祴銆?/span>

1. SQL鎷ユ湁澶ф暟鎹殑鏈澶ф綔鍔?/span>

鐢ㄤ簬 Hadoop錛堝垎甯冨紡璁$畻錛夌殑SQL鐨勫彂灞曡兘澶熻鍟嗕笟鍒嗘瀽甯堝埄鐢ㄨ嚜宸辯殑鎶鑳藉拰閫夋嫨鐨凷QL宸ュ叿鎵ц澶ф暟鎹」鐩傚紑鍙戜漢鍛樺彲浠ラ夋嫨Hive銆丏rill鍜?Impala絳堿pache欏圭洰錛屼互鍙婇夋嫨Hadapt銆丠AWQ鍜孲plice Machine絳夊叕鍙哥殑涓撴湁鎶鏈?/span>

2. 灝界濡傛 SQL榪橀潰涓存寫鎴?/span>

SQL闇瑕佹暟鎹粨鏋勩傝岄泦涓殑緇撴瀯鍖栨暟鎹彲寮曡搗寤惰繜騫朵笖闇瑕佷漢宸ョ鐞嗐係QL榪橀檺鍒跺垎鏋愮被鍨嬨傝繃鍒嗗己璋僑QL灝嗗歡榪熸満鏋勫叏闈㈠埄鐢ㄥ叾鏁版嵁浠峰肩殑鍔姏鍜屽歡榪熷弽搴斻?/span>

3. 韜喚璇嗗埆鏄富瑕佺殑鏁版嵁瀹夊叏闂

闅忕潃Hadoop錛堝垎甯冨紡璁$畻錛変腑鎻愪緵鐨勬帴鍏ユ帶鍒惰兘鍔涚殑鐚涚儓鏀誨嚮錛屾満鏋勮繀閫熻璇嗗埌綰胯礬綰ц韓浠借瘑鍒槸蹇呰鐨勫熀紜銆傛病鏈夊厖鍒嗙殑韜喚璇嗗埆錛屼換浣曟洿楂樼駭鐨勬帶鍒墮兘寰堝鏄撹緇曡繃錛屽Θ紕嶉瀹氱殑瀹夊叏璁″垝銆?/span>

4. 鏁版嵁閿欒鍙樻垚瀛︿範(fàn)鏈轟細(xì)

2014騫存満鏋勫皢鍑虹幇璁稿鏁版嵁閿欒銆傛暟鎹敊璇皢琛ㄦ槑鍩虹鐨勬潵婧愮郴緇熺殑闂鍚楋紵鏁版嵁閿欒鏄湪涓嬫父鍒嗘瀽涓嚭鐜板亸宸鑷寸殑鏁版嵁鎻愬彇闂鍚楋紵鏁版嵁閿欒灝嗚〃鏄庡畾涔夊樊寮傛垨鑰呯己灝戣法閮ㄩ棬鍜屼笟鍔¢儴闂ㄧ殑涓鑷存у悧錛?014騫村皢鐪嬪埌瑙e喅鏁版嵁寮傚父闂銆?/span>

5. 鍑虹幇鍙繍琛岀殑Hadoop

2014騫村皢鐪嬪埌Hadoop鍦ㄥ悇涓涓氫腑鐨勭敓浜ч儴緗叉樉钁楀鍔犮傝繖灝嗘樉紺哄嚭Hadoop鍦ㄨ繍钀ヤ腑鐨勫疄鍔涖傚湪閭i噷錛岀敓浜у簲鐢ㄤ笌鍒嗘瀽緇撳悎鍦ㄤ竴璧瘋兘澶熸彁渚涘彲浠ヨ 閲忕殑鍟嗕笟浼樺娍錛屽鍦ㄥ鎴峰寲闆跺敭寤鴻銆佽瘓楠楁嫻嬪拰璇曢獙浼犳劅鍣ㄦ暟鎹繘琛岃鑼冪殑緇存姢絳夊簲鐢ㄤ腑鎻愪緵榪欎簺浼樺娍銆?/span>

6. 鏇村鐨勬暟鎹粨搴撳皢閮ㄧ講浼佷笟鏁版嵁涓績

鏁版嵁涓績鎶婃暟鎹彁鍙栧鐞嗗拰鏁版嵁浠庝紒涓氭暟鎹粨搴撳嵏杞藉埌Hadoop銆備綔涓轟竴涓牳蹇冪殑涓績浼佷笟涓績錛屾暟鎹腑蹇冭渚垮疁10鍊嶏紝鑳藉瀵歸澶栫殑澶勭悊鎴栬呮柊鐨勫簲鐢ㄨ繘琛屾洿澶氱殑鍒嗘瀽銆?/span>

7. 鏂扮殑浠ユ暟鎹負(fù)涓績鐨勫簲鐢ㄥ皢鎴愪負(fù)寮哄埗鎬х殑

鍒╃敤澶ф暟鎹殑鑳藉姏灝嗗湪2014騫存垚涓虹珵浜夌殑姝﹀櫒銆傛洿澶氱殑鍏徃灝嗕嬌鐢ㄥぇ鏁版嵁鍜孒adoop鍑嗙‘鍦伴拡瀵逛釜浜烘秷璐硅呯殑鍋忕埍榪介愯禋閽辯殑榪藉姞閿鍞拰浜ゅ弶閿鍞殑鏈轟細(xì)錛屾洿濂藉湴緙撹В椋庨櫓浠ュ強鍑忓皯鐢熶駭鍜屽紑閿鎴愭湰銆?/span>

8. 鏁版嵁鎴愪負(fù)鏁版嵁涓績鐨勬牳蹇?/span>

鏈烘瀯灝嗕粠寮鍙戣呰繃娓″埌澶ф暟鎹鍒掍腑銆?/span>IT閮ㄩ棬灝嗚秺鏉ヨ秺澶氬湴鎷呰礋瀹氫箟鏀寔澶氱搴旂敤鐨勬暟鎹熀紜璁炬柦鐨勪換鍔★紝鎶婇噸鐐歸泦涓湪閮ㄧ講銆佸鐞嗗拰淇濇姢涓涓満鏋勭殑鏍稿績璧勪駭鎵闇瑕佺殑鍩虹璁炬柦鏂歸潰銆?/span>

9. 鎼滅儲灝嗘垚涓洪潪緇撴瀯鍖栫殑鏌ヨ璇█

2013騫存湁澶ч噺鐨勭敤浜嶩adoop鐨凷QL璁″垝銆?014騫村皢鏄繖縐嶉潪緇撴瀯鍖栨煡璇㈣璦鎴愪負(fù)閲嶇偣鐨勪竴騫淬傛妸鎼滅儲闆嗘垚鍒癏adoop灝嗕負(fù)鏌ユ壘閲嶈淇℃伅鐨勪紒涓氱敤鎴鋒彁渚涗竴縐嶇畝鍗曞拰鐩磋鐨勬柟娉曘傛悳绱㈠紩鎿庤繕鏄寘鎷帹鑽愬紩鎿庡湪鍐呯殑璁稿鍙戠幇鍜屽垎鏋愬簲鐢ㄧ殑鏍稿績銆?/span>

10. Hadoop灝嗚幏寰楀湴浣?/span>

Hadoop灝嗙戶緇彇浠e叾瀹僆T寮鏀紝棰犺浼佷笟鏁版嵁浠撳簱鍜屼紒涓氬瓨鍌ㄣ備緥濡傦紝鐢查鏂囩殑涓昏钀ユ敹鐩爣鍦ㄨ繃鍘葷殑10涓搴﹂噷鏈?涓搴︽病鏈夊疄鐜般俆eradata鍦ㄨ繃鍘葷殑5涓搴︽湁4涓搴︽病鏈夊疄鐜拌惀鏀跺拰鍒╂鼎鐩爣銆?/span>

11. Hadoop浠嶉渶瑕佸府鍔╂墠鑳芥垚涓轟富嫻佸簲鐢?/span>

鏇村鐨勬満鏋勮璇嗗埌Apache Hadoop鏈韓榪樻病鏈夊噯澶囧ソ鍦ㄤ紒涓氬簲鐢ㄣ侫pache Hadoop涓嶆槸涓虹郴緇熺鐞嗘垨鑰呯伨闅炬仮澶嶇瓑緇熶竴浼佷笟IT嫻佺▼璁捐鐨勩備紒涓氬皢緇х畫鎺ㄨ繘娣峰悎鐨勮В鍐蟲柟妗堬紝鎶婃灦鏋勬妧鏈垱鏂頒笌Apache Hadoop鐨勫紑婧愯蔣浠剁粨鍚堝湪涓璧楓?/span>

鑻辨枃http://www.cio.com.au/slideshow/534054/pictures_12_big_data_predictions_2014/?image=3

璇戞枃http://www.csdn.net/article/2013-12-25/2817926-pictures-12-big-data-predictions-2014
2014鐨?2涓ぇ鏁版嵁瓚嬪娍錛欻adoop緇х畫鍗囨俯錛孯灝嗚繘鍏ヤ富嫻?/div>

褰撲笅錛?/span>澶ф暟鎹?/span>宸叉垚涓?/span>2013騫存渶鐏殑鎶鏈瘝姹囦箣涓錛涜屽湪榪囧幓涓騫達(dá)紝榪欎釜甯傚満鐨勫閫熷拰鏀瑰彉涔熶笉鍙皳涓嶅ぇ銆傚悓鏃訛紝鎴戜滑榪樼湅鍒頒簡Hadoop鍙婂叾鐢熸佺郴緇熺殑浣跨敤闂ㄦ浠庨《灝栨妧鏈漢鎵嶅埌鏁版嵁縐戝瀹剁殑鏀瑰彉銆傝秺鏉ヨ秺澶氱殑浼佷笟鎷ユ姳澶ф暟鎹妧鏈紝騫跺皢鍏惰繍鐢ㄥ埌鐢熶駭鐜涓傞偅涔堬紝鍦?/span>2014騫村ぇ鏁版嵁鐨勫彂灞曡秼鍔垮張浼?xì)濡備綍锛寴q欓噷涓嶅Θ鐪嬩竴涓嬫潵鑷?/span>CIO鐨?/span>12欏歸嫻嬶細(xì)

1. 浜轟滑涓嶅啀姝㈡浜庡ぇ鏁版嵁鐨勮皥璁?/span> 

2014騫達(dá)紝澶ф暟鎹浜庤鐨勬儏鍐靛皢鍙戠敓鏀瑰彉錛屼漢浠皢鑷村姏浜庝粠涓幏鐩婏紝鎵鏈夊ぇ鏁版嵁鐨勭倰浣滀篃灝?/span>鐑熸秷浜戞暎銆備粠Gainsight浜嗚В鍒幫紝澶ф暟鎹湰韜篃灝嗘垚涓烘闈笂鐨勭鐮侊紝Gainsight鍦ㄥ叾IaaS騫沖彴涓埄鐢ㄥぇ鏁版嵁鍒嗘瀽琚叾縐頒箣涓?/span>“customer success management”鐨勬湇鍔°?/span>Gainsight璁や負(fù)錛屽湪2014騫達(dá)紝姣忓浜戝簲鐢ㄧ▼搴忔彁渚涘晢閮藉皢浼?xì)璁╁叾鍚庣鍩杭媭璁炬柦鏀寔澶ф暟鎹?/span>


2. Hadoop
灝嗘垚涓轟紒涓氱殑鍏抽敭緇勪歡
Hadoop
灝嗘櫘鍙婏紝澶ф暟鎹篃涓嶄細(xì)鍐嶇戶緇姝ヤ簬浜戞湇鍔°?/span>Alteryx璁や負(fù)錛?/span>2014騫達(dá)紝Hadoop鐨勯傜敤鍦烘櫙灝嗚秴瓚婃壒澶勭悊鍜屽瓨鍌紝灝嗘垚涓轟紒涓氭暟鎹灦鏋勪腑閫氱敤鐨勬牳蹇冪粍浠訛紝榪欐剰鍛崇潃鏁版嵁鍒嗘瀽灝嗙戶緇垚涓哄ぇ鏁版嵁鐨勯瑕佺敤渚嬨?/span>


3.
浼佷笟灝嗘洿鍔犻挓鎯呬簬鐢ㄦ埛鏁版嵁
浠?/span>Gainsight浜嗚В鍒幫紝鍚勪釜鏈烘瀯灝嗗鐢ㄦ埛鏁版嵁鍏呮弧鐑儏錛屼紒涓氬皢鍏呭垎鍒╃敤瀹㈡埛涓庡叾鍦ㄧ嚎浜у搧鎴栨湇鍔′氦浜掍駭鐢熺殑鏁版嵁錛屽茍浠庝腑鑾峰彇浠峰箋備負(fù)浜嗗疄鐜拌繖鐐癸紝鏁版嵁鍒嗘瀽鑳藉姏灝嗘瘮BI鍥㈤槦鏇村彈閲嶈錛屼負(fù)浼佷笟鎻愪緵鏇村鐨勪環(huán)鍊箋?/span>


4.
澶ф暟鎹帺杞競鍦哄喅絳?/span>
Alteryx
璁や負(fù)錛屽湪2014騫達(dá)紝澶ф暟鎹皢棣栨姝e紡鐧婚檰甯傚満钀ラ攢錛岀敤浜庡競鍦鴻惀閿鐨勫ぇ鏁版嵁鎶鏈皢鍦ㄨ繖涓騫存壆婕旈噸瑕佽鑹?/span>——褰卞搷鐫騫垮憡銆佷駭鍝佹帹閿鍜屾秷璐硅呰涓猴紝World Cup鍙?/span>Winter Olympics灝嗘槸鍏舵渶澶х殑鑸炲彴銆?/span>


5.
嫻烽噺鐨勬暟鎹皢瓚呰秺鏁版嵁縐戝瀹剁殑鎰忚瘑
lteryx
璁や負(fù)錛屾柊鍨嬬殑鏁版嵁鍒嗘瀽闇姹傚皢瓚呰秺浜哄姏鍙負(fù)錛屾湁浜涙儏鍐典笅澶ф暟鎹妧鏈皢鍫瘮鎴愬崈涓婁竾鐨勬暟鎹瀛﹀銆傝鍏徃棰勬祴錛岃繖灝嗕細(xì)姣棤鐤戦棶鐨勬媺浣庢暟鎹瀛﹀钖叕銆?/span>


6.
鐗╄仈緗戝皢榪涘啗緗戠粶
IEEE
鐨勪笓涓氬崗浼?xì)璁や负锛?/span>2014騫達(dá)紝鍙瘑鍒簨鐗╁皢鏃犵紳鐨勮繛鎺ュ埌淇℃伅緗戠粶錛屽疄鐜扮湡姝f剰涔変笂鐨?/span>Web of Things銆?/span>The Web of Things灝嗕細(xì)鍏呭垎鍒╃敤縐誨姩璁懼鍜屼紶鎰熷櫒鐨勭洃鎺ц兘鍔涳紝澧炲己鐜板疄涓栫晫涓殑鐗╀綋涓?/span>Web鍓湰涔嬮棿鐨勫崗鍚屾с?/span>

The Web of Things灝嗕細(xì)鐢熸垚澶ч噺涓庣幇瀹炰笘鐣岀浉鍏崇殑鏁版嵁錛屽洜鑰屼細(xì)闇姹傛櫤鑳藉寲鐨勮В鍐蟲柟妗堝湪鐜板疄涓栫晫涓庣浉瀵瑰簲鐨勬暟瀛椾笘鐣岃祫婧愪箣闂磋祴浜堣繛鎺ユс佺綉闄呬簰榪炲拰鐩稿叧鎬с?/span>


7.
浠庡ぇ鏁版嵁鍒版搗閲忔暟鎹?/span>
鏁版嵁鐨勪綋縐侀熷害鍜岀被鍨嬶紙volume銆?/span>velocity鍜?/span>variety錛夊湪2014騫村皢浼?xì)鐟艟l憟鎸囨暟綰у闀匡紝鍥犳闇瑕佹洿綆鍗曠殑鍒嗘瀽宸ュ叿鏉ラ┚椹繖浜?/span>鏁版嵁媧祦銆?/span>

IEEE
縐幫紝涓嶆鏄?/span>3涓?/span>V璁╁ぇ鏁版嵁鎴愪簡闈炲父闅句互鍒舵湇鐨勮佽檸錛屾暟鎹瀛﹀鍙婅涓氭墍闇綆鍗曞伐鍏蜂篃鏄釜闅鵑錛岃澶氳涓氬皻鏃犵嫭绔嬫彁鍙栨暟鎹環(huán)鍊肩殑鑳藉姏銆傚綋鍓嶅凡鍑虹幇鐨勬搗閲忔暟鎹椂浠f洿闇姹傛暟鎹鐞嗗拰鍒嗘瀽涓婃柊鐨勮寖寮忓拰瀹炶返銆?/span>2014騫達(dá)紝榪欎釜棰嗗煙灝嗕笂婕旂兢闆勪簤闇搞?/span>


8. R
璇█灝嗗彇浠d紶緇?/span>SAS瑙e喅鏂規(guī)
Alteryx
璁や負(fù)錛屽熀浜?/span>R緙栫▼璇█鐨勫垎鏋愬皢鏁版嵁縐戝瀹?/span>寰$敤妯″紡錛岃繖縐嶅垎鏋愬湪2014騫村皢鎴愪負(fù)涓繪祦錛屽皢鏇夸唬浼犵粺鐨?/span>SAS鍙?/span>SPSS妯″紡銆?/span>Alteryx璇撮亾錛?/span>瓚呰繃200涓囩敤鎴峰拰300涓囩殑鍒嗘瀽甯堥兘鍦ㄥ鎵炬洿濂界殑瑙e喅鏂規(guī)錛?/span>R鎭伴㈠叾鏃躲?/span>


9. Hadoop
灝嗗鍔犲疄鏃剁壒鎬?/span>
SQL-on-Hadoop
渚涘簲鍟?/span>Splice Machine鍏卞悓鍒涘浜哄吋CEO Monte Zweben鎸囧嚭錛屾湭鏉?/span>1騫村緩绔嬪湪Hadoop騫沖彴涓婄殑浜や簰寮忓簲鐢ㄧ▼搴忓皢鍛堢垎鍙戝紡澧為暱錛屽叾涓寘鎷?/span>Web搴旂敤銆佺Щ鍔ㄥ簲鐢ㄥ拰紺句氦搴旂敤錛屼漢浠彲浠ヤ笌涔嬭繘琛屽疄鏃剁殑浜や簰銆?/span>

Zweben璇撮亾錛?/span>“2014灝嗗甫鏉ュ疄鏃跺ぇ鏁版嵁搴旂敤紼嬪簭騫沖彴錛屼紒涓氬皢涓嶄細(xì)鍙兘鍍忓綋涓嬩竴鏍峰垎鏋愬巻鍙叉暟鎹紝浣犲皢鏈夎兘鍔涘垎鏋?/span>5鍒嗛挓錛岀敋鑷蟲槸1鍒嗛挓涔嬪唴鐨勬暟鎹紱浼佷笟灝嗘嫢鏈変氦浜掑紡搴旂敤紼嬪簭錛屼互渚垮疄鏃剁殑鍒跺畾鍐崇瓥銆?/span>


10. Hadoop
灝嗗緱鍒頒紒涓氱駭寮哄寲
Splice Machine
鐨?/span>Zweben璇達(dá)細(xì)姣嬪焊緗枒錛?/span>Hadoop鏄釜浜嗕笉璧風(fēng)殑騫沖彴錛屼絾鏄粛鐒舵湁璁稿宸ヤ綔瑕佸仛銆?/span>

浠栬涓猴紝鍦?/span>2014錛屼綘灝嗙湅鍒?/span>Hadoop鍚戝畨鍏ㄣ佽繍钀ョ鐞嗐佽祫婧愮鐞嗗強澶氱珯鐐瑰搷搴旀柟鍚戝彂灞曘?/span>Zweben琛ュ厖閬擄細(xì)浣犲皢鐪嬪埌鎵鏈夌殑浼佷笟綰ч渶姹傦紝鎴戣涓鴻繖浜涘皢鏄湭鏉ヤ富瑕佺殑鐒︾偣銆?/span>


11.  2014
騫村簳錛岃嚦灝戞湁涓瀹?/span>NoSQL IPO
澶ф暟鎹強浜戠幆澧冨畨鍏ㄨВ鍐蟲柟妗?/span>Gazzang钁d簨闀垮吋CEO Larry Warnock棰勬祴錛屽湪2014錛岃嚦灝戞湁涓瀹?/span>Hadoop鎴栬?/span>NoSQL渚涘簲鍟嗕細(xì)IPO錛岃繖鏍囧織鐫澶ф暟鎹鉤鍙板凡琚箍娉涜鍙?/span>

Warnock璇撮亾錛?/span>鎴戜笉浼?xì)鍘婚娴嬪摢瀹朵?/span>IPO錛屼絾鏄嚦灝戜細(xì)鏈変竴瀹?/span>Hadoop鎴?/span>NoSQL渚涘簲鍟?/span>IPO銆傞氳繃Wikibon浜嗚В鍒幫紝鍦?/span>2012騫達(dá)紝NoSQL杞歡鍜屾湇鍔″垱閫犱簡2.86浜跨編鍏冪殑紼庢敹錛岃屽湪2017騫達(dá)紝榪欎釜鏁版嵁琚嫻嬩負(fù)18.25浜褲傚晢鍦鴻涓嶆柇澧為暱鐨勪紒涓氶渶姹傛帹鍔紝浠栦滑闇瑕佺伒媧匯佸彲鎵╁睍鍙婅礋鎷呭緱璧風(fēng)殑鏁版嵁綆$悊瑙e喅鏂規(guī)錛屼負(fù)鏂版椂浠g殑浜戝強澶ф暟鎹璁°?/span>


12.
涓涓柊鐨勫垎鏋愬爢鏍堝皢璇炵敓
Alteryx
棰勬祴錛?/span>2014騫達(dá)紝灝嗗嚭鐜頒竴涓柊鐨勬暟鎹強鍒嗘瀽鍫嗘爤錛屼負(fù)鏁版嵁搴撱佸垎鏋愩佸彲瑙嗗寲鎻愪緵鏂扮殑瑙e喅鏂規(guī)錛岃繖灝嗙洿鎺ュ▉鑳佸埌浼犵粺鐨勪緵搴斿晢宸ㄥご錛岃岃繖浜涗緵搴斿晢涔熶細(xì)鍦ㄥ寙蹇欎腑鎺ㄥ嚭鏂扮殑瑙e喅鏂規(guī)銆?/span>

 



crazycy 2014-01-18 21:51 鍙戣〃璇勮
]]>NoSQL瀛︿範(fàn)錛堜簲錛塁assandra vs MongoDB vs CouchDB vs Redis vs Riak vs HBase vs Couchbase vs Neo4j vs Hypertable vs ElasticSearch vs Accumulo vs VoltDB vs Scalaris comparisonhttp://m.tkk7.com/crazycy/archive/2014/01/14/408883.htmlcrazycycrazycyMon, 13 Jan 2014 17:34:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/14/408883.htmlhttp://m.tkk7.com/crazycy/comments/408883.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/14/408883.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/408883.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/408883.html闃呰鍏ㄦ枃

crazycy 2014-01-14 01:34 鍙戣〃璇勮
]]>
NoSQL闈炲叧緋誨瀷鏁版嵁搴撳涔?fàn)锛堝洓锛墭q欐牱瀵規(guī)瘮涓婬Base, Memcached, MongoDB, Redis鍜孲olrhttp://m.tkk7.com/crazycy/archive/2014/01/14/408880.htmlcrazycycrazycyMon, 13 Jan 2014 16:27:00 GMThttp://m.tkk7.com/crazycy/archive/2014/01/14/408880.htmlhttp://m.tkk7.com/crazycy/comments/408880.htmlhttp://m.tkk7.com/crazycy/archive/2014/01/14/408880.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/408880.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/408880.html闃呰鍏ㄦ枃

crazycy 2014-01-14 00:27 鍙戣〃璇勮
]]>
NoSQL闈炲叧緋誨瀷鏁版嵁搴撳涔?fàn)锛堜笁锛塏oSQL涓嶳DBMS錛氫綍鏃朵嬌鐢紝浣曟椂涓嶄嬌鐢?/title><link>http://m.tkk7.com/crazycy/archive/2014/01/13/408845.html</link><dc:creator>crazycy</dc:creator><author>crazycy</author><pubDate>Mon, 13 Jan 2014 04:12:00 GMT</pubDate><guid>http://m.tkk7.com/crazycy/archive/2014/01/13/408845.html</guid><wfw:comment>http://m.tkk7.com/crazycy/comments/408845.html</wfw:comment><comments>http://m.tkk7.com/crazycy/archive/2014/01/13/408845.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/crazycy/comments/commentRss/408845.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/crazycy/services/trackbacks/408845.html</trackback:ping><description><![CDATA[     鎽樿: NoSQL鏁版嵁搴撻潰涓寸殑鎸戞垬NoSQL vs RDBMS: Why and why not to use NoSQL over RDBMS?  Code highlighting produced by Actipro CodeHighlighter (freeware)http://www.CodeHighlighter.com/-->Naresh Kumar3 J...  <a href='http://m.tkk7.com/crazycy/archive/2014/01/13/408845.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/crazycy/aggbug/408845.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/crazycy/" target="_blank">crazycy</a> 2014-01-13 12:12 <a href="http://m.tkk7.com/crazycy/archive/2014/01/13/408845.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>NoSQL闈炲叧緋誨瀷鏁版嵁搴撳涔?fàn)锛堜簩锛?/title><link>http://m.tkk7.com/crazycy/archive/2014/01/13/408844.html</link><dc:creator>crazycy</dc:creator><author>crazycy</author><pubDate>Mon, 13 Jan 2014 04:03:00 GMT</pubDate><guid>http://m.tkk7.com/crazycy/archive/2014/01/13/408844.html</guid><wfw:comment>http://m.tkk7.com/crazycy/comments/408844.html</wfw:comment><comments>http://m.tkk7.com/crazycy/archive/2014/01/13/408844.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/crazycy/comments/commentRss/408844.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/crazycy/services/trackbacks/408844.html</trackback:ping><description><![CDATA[<p style="margin:0in;margin-bottom:.0001pt;line-height:18.75pt;background:white"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">Gartner</span><span style="font-size:11.0pt;font-family:瀹嬩綋;Times New Roman";">鍒嗘瀽甯?/span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">Merv Adrian</span><span style="font-size:11.0pt;font-family:瀹嬩綋;Times New Roman";">鍦?/span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">Twitter</span><span style="font-size:11.0pt;font-family:瀹嬩綋;Times New Roman";">涓?/span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">RT</span><span style="font-size: 11.0pt;font-family:瀹嬩綋;Times New Roman";">浜嗕竴鏉″叧浜?/span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">NoSQL</span><span style="font-size: 11.0pt;font-family:瀹嬩綋;Times New Roman";">鏁版嵁搴撹瘎閫夌殑娑堟伅錛屼粬璁や負(fù)榪欏氨鍍忔槸鍦ㄥ姣斾綘鏇村枩嬈㈣嫻鏋溿侀浮灝鵑厭榪樻槸瑗垮叞鑺憋紝瀹冧滑閮芥湁涓嶅悓鐨勫簲鐢ㄥ満鏅紝瀵規(guī)瘮</span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">NoSQL</span><span style="font-size: 11.0pt;font-family:瀹嬩綋;Times New Roman";">浜у搧鏄病鏈夋剰涔夌殑銆傛瘮濡?/span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">MongoDB</span><span style="font-size:11.0pt;font-family:瀹嬩綋;Times New Roman";">鍜?/span><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">Cassandra</span><span style="font-size:11.0pt;font-family:瀹嬩綋;Times New Roman";">灝辨病鏈変粈涔堝彲姣旀э紝<strong>瀹冧滑鐨勫叡鍚岀偣鍙槸閮藉彨鍋?/strong></span><strong><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";Times New Roman";">NoSQL</span></strong><strong><span style="font-size:11.0pt;font-family:瀹嬩綋;Times New Roman";">鏁版嵁搴撹屽凡錛屽畠浠殑搴旂敤鍦烘櫙闈炲父涓嶅悓銆?/span></strong><strong></strong></p> <p style="margin:0in;margin-bottom:.0001pt;line-height:18.75pt;background:white"><strong> </strong></p> <p><span style="font-family:瀹嬩綋;">涓嬮潰榪樻槸鏍規(guī)嵁瀛︿範(fàn)錛屽鐜板湪姣旇緝鐑棬鐨凪angoDB鍜孧emcached浠ュ強Redis鍋氫釜綆鍗曠殑瀛︿範(fàn)錛?/span></p> <p><strong>MangoDB<span style="font-family:瀹嬩綋;">鏄?/span>(document database, <span style="font-family:瀹嬩綋;">紜洏鍨?/span>)</strong><br /> a. <span style="font-family:瀹嬩綋;">鍩轟簬紓佺洏鐨勬暟鎹簱錛屽彧鏄紦瀛樼儹鐐規(guī)暟鎹湪鍐呭瓨涓?/span><br /> b. <span style="font-family:瀹嬩綋;">鏂囨。鍨嬬殑闈炲叧緋誨瀷鏁版嵁搴擄紝</span><br />     <span style="font-family: 瀹嬩綋;">浼樺娍鏄煡璇㈠姛鑳藉己澶э紝鍙瓨鍌ㄦ搗閲忔暟鎹?/span><br /> c. <span style="font-family:瀹嬩綋;">鍙浛鎹?/span>MySQL<span style="font-family:瀹嬩綋;">絳夊叧緋誨瀷鏁版嵁搴?/span>; <br />     <span style="font-family: 瀹嬩綋;">鍦ㄥ唴瀛樿凍澶熺殑鎯呭喌涓嬶紝璇誨啓鎬ц兘涓嶉敊錛屽彲鐪佸幓</span>Cache<span style="font-family:瀹嬩綋;">榪欎竴灞?br /><br /></span></p> <p><strong>Memcached<span style="font-family:瀹嬩綋;">鍜?/span>Redis<span style="font-family:瀹嬩綋;">鏄?/span>(key value store, <span style="font-family:瀹嬩綋;">鍐呭瓨鍨?/span>)</strong><br /> a.<span style="font-family:瀹嬩綋;">鍐呭瓨鍨嬫暟鎹簱錛屾暟鎹繚瀛樺湪鍐呭瓨涓紝閫氳繃</span>TCP<span style="font-family:瀹嬩綋;">鐩存帴瀛樺彇錛?/span> <span style="font-family:瀹嬩綋;">鎴栬呰鏄叏鍐呭瓨</span>Cache<span style="font-family:瀹嬩綋;">銆?/span><br />    <span style="font-family: 瀹嬩綋;">浼樺娍鏄熷害蹇紝騫跺彂楂橈紝緙虹偣鏄暟鎹被鍨嬫湁闄愶紝鏌ヨ鍔熻兘涓嶅己錛屼竴鑸仛緙撳瓨銆?/span><br /> b. Key Value Store<br /> c. 鍏ㄥ唴瀛?br /><br /></p> <p><strong>Memcached vs Redis</strong><br /> a. 閮芥槸Key Vale, Memory Cache<br /> b. Memecahced鏄?multiple-thread; <span style="font-family:瀹嬩綋;">閫傚悎澶氭牳</span>CPU<span style="font-family:瀹嬩綋;">鐨勫簲鐢ㄣ?/span><br />     Redis鏄?single-thread.<br />     <span style="font-family: 瀹嬩綋;">濡傛灉鍐嶅鏁版嵁緇撴瀯鍩虹涓婃敮鎸佸綰跨▼錛屽姞閿佸彲鑳芥槸涓棶棰?/span><span style="font-family: 瀹嬩綋; color: red;"><strong>錛堝緟娣卞叆瀛︿範(fàn)楠岃瘉錛?/strong></span>銆?br /> c. Redis<span style="font-family:瀹嬩綋;">鍏鋒湁鎸佷箙鍖栨満鍒訛紝鍙互瀹氭湡灝嗗唴瀛樼殑鏁版嵁鎸佷箙鍖栧埌紜洏涓?/span> <br /> d. Redis<span style="font-family:瀹嬩綋;">鏀寔鐨勬暟鎹被鍨嬫洿澶?/span><br /> e. Redis <span style="font-family:瀹嬩綋;">鍏峰</span>binlog<span style="font-family:瀹嬩綋;">鍔熻兘錛屽皢鎵鏈夋搷浣滃啓鍏ユ棩蹇楋紝浠ヤ究</span>redis<span style="font-family:瀹嬩綋;">鍑虹幇鏁呴殰鏃訛紝鍙氳繃</span>binlog<span style="font-family:瀹嬩綋;">榪涜鎭㈠銆?/span><br /> f. Redis<span style="font-family:瀹嬩綋;">鏀寔</span>Virtual Memory<span style="font-family:瀹嬩綋;">錛屽彲闄愬畾鍐呭瓨澶у皬錛屽綋鏁版嵁瓚呭嚭闃鍊鹼紝灝遍氳繃綾諱技</span>LRU<span style="font-family:瀹嬩綋;">鐨勭畻娉曞皢鏈涓嶅父鐢ㄧ殑鏁版嵁淇濆瓨鍒扮‖鐩樼殑欏甸潰闂涓?/span></p> <p style="margin:0in;margin-bottom:.0001pt;line-height:18.75pt;background:white"> </p><img src ="http://m.tkk7.com/crazycy/aggbug/408844.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/crazycy/" target="_blank">crazycy</a> 2014-01-13 12:03 <a href="http://m.tkk7.com/crazycy/archive/2014/01/13/408844.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>NoSQL闈炲叧緋誨瀷鏁版嵁搴撳涔?fàn)锛堜竴錛?/title><link>http://m.tkk7.com/crazycy/archive/2014/01/13/408842.html</link><dc:creator>crazycy</dc:creator><author>crazycy</author><pubDate>Mon, 13 Jan 2014 03:53:00 GMT</pubDate><guid>http://m.tkk7.com/crazycy/archive/2014/01/13/408842.html</guid><wfw:comment>http://m.tkk7.com/crazycy/comments/408842.html</wfw:comment><comments>http://m.tkk7.com/crazycy/archive/2014/01/13/408842.html#Feedback</comments><slash:comments>1</slash:comments><wfw:commentRss>http://m.tkk7.com/crazycy/comments/commentRss/408842.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/crazycy/services/trackbacks/408842.html</trackback:ping><description><![CDATA[     鎽樿: 鍦?008騫寸殑鏃跺欙紝鎴戣繕鏄彧鐭ラ亾DB2, Oracle, MS SQLServer, Sybase, MySQL, PostgreSQL,  Firebird絳変富嫻佸晢涓氭垨鑰呭紑婧愭暟鎹簱銆傚綋姹插彇鐭ヨ瘑浜庣綉緇滀箣闄咃紝紿佺劧鍙戠幇寰堝鏂扮殑鍚嶈瘝楸艱穬鑰屽嚭錛屼粈涔?SQLite, Memcached,  FastDB, MongoDB, Solr, Redis, HBase,  Cass...  <a href='http://m.tkk7.com/crazycy/archive/2014/01/13/408842.html'>闃呰鍏ㄦ枃</a><img src ="http://m.tkk7.com/crazycy/aggbug/408842.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/crazycy/" target="_blank">crazycy</a> 2014-01-13 11:53 <a href="http://m.tkk7.com/crazycy/archive/2014/01/13/408842.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>sqlserver: Invalid use of a side-effecting operator within a function (Print/Raiserror)http://m.tkk7.com/crazycy/archive/2013/10/25/405643.htmlcrazycycrazycyFri, 25 Oct 2013 10:24:00 GMThttp://m.tkk7.com/crazycy/archive/2013/10/25/405643.htmlhttp://m.tkk7.com/crazycy/comments/405643.htmlhttp://m.tkk7.com/crazycy/archive/2013/10/25/405643.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/405643.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/405643.html
浣跨敤
raiserror('enter this line', 16, -1) with log
print('enter this line')

鍒嗗埆閬囧埌浜?br />Invalid use of a side-effecting operator 'Print' within a function
Invalid use of a side-effecting operator 'Raiserror' within a function

鍘熸潵錛屽湪鍑芥暟涓嬌鐢―ML榪樼湡涓嶈兘澶殢鎰忥紝SELECT鍙互錛沀PDATE/DELTE/INSERT榪樼湡涓嶅彲浠ャ?br />緗戜笂google浜嗕笅錛岃繕鐪熸槸涓嶅皯綾諱技鐨勬渚?br />1. Functions are used to return data: scalar-value or table-value.
2. 
Invalid use of side-effecting or time-dependent operator in ‘newid’ within a function.
It states that the use of side-effecting and time-dependent operators is not allowed within a function. 


Side-Effecting Operators
A side-effecting operator is basically what it says.  
It is an operator that affects anything outside the function.  
This could be seen when trying to create an object or insert or update a table.  

Functions should be self-contained.  
They can use data from the database, but should not affect data in the database.  
In other words, functions should be read-only.

There is a list of side-effecting operators, which include INSERT, CREATE, UPDATE, OPEN, CLOSE, DELETE, SELECT … INTO, and more.  
You cannot use these inside a function.  
If you do, you will receive a slightly different message.  The message will not mention time-dependent operators.  It will look like this.
Msg 443, Level 16, State 15, Procedure FN_TEST, Line 9
Invalid use of a side-effecting operator ‘INSERT’ within a function. 

To get around some of the side-effecting operator rules shown by Msg 443, we can use a table variable.  
Below is an example on a table valued function.  It returns a table variable.  
In the function we insert, update, and delete from the table variable.  
You cannot create a temp table, but table variables are OK.

CREATE FUNCTION FN_TEST()
RETURNS @table TABLE (
 i int,
 j int)
AS
BEGIN
 
 INSERT INTO @table
 SELECT 1, 0
 UNION ALL
 SELECT 2, 2
  
 UPDATE @table
 SET j = 1
  
 DELETE @table
 WHERE i = 1
  
 RETURN
  
END

If you try this function yourself, you will see that it compiles and executes with no problem. 
Operators used on table variables are not considered side-effecting operators.

Time-Dependent Operators
You will also receive Msg 443 if you use time-dependent operators in a function.  
Time-dependent operators are those which return a value based on the time.  
This include, but are not limited to GETDATE(), SYSDATETIME(), NEWID(), and RAND().  
This is because functions should to return the same value when provided with the same set of inputs.  
Since these functions return a different value each time, they are not allowed. 
There is one solution to part of this problem.  If you wish to use a date or an id, you can provide it to the function.  
You could pass NEWID() or GETDATE() as the value of a parameter sent to the function.  
If you need to use time-dependent operators multiple times, you can’t use a function.


crazycy 2013-10-25 18:24 鍙戣〃璇勮
]]>
The database principal owns a schema in the database, and cannot be droppedhttp://m.tkk7.com/crazycy/archive/2013/07/11/401471.htmlcrazycycrazycyThu, 11 Jul 2013 09:34:00 GMThttp://m.tkk7.com/crazycy/archive/2013/07/11/401471.htmlhttp://m.tkk7.com/crazycy/comments/401471.htmlhttp://m.tkk7.com/crazycy/archive/2013/07/11/401471.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/401471.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/401471.htmlwhile delete this user, an error encounter like this: The database principal owns a schema in the database, and cannot be dropped. (Microsoft SQL Server, Error: 15138)
 
but use the below script, I successfully removed;
SELECT s.name
FROM sys.schemas s
WHERE s.principal_id = USER_ID('YourUserID');

find all the schemas to be removed
ALTER AUTHORIZATION ON SCHEMA::YourSchemaName TO dbo;


crazycy 2013-07-11 17:34 鍙戣〃璇勮
]]>
SQLServer Create Login/Create User/Grant Privildges to a userNamehttp://m.tkk7.com/crazycy/archive/2013/07/11/401448.htmlcrazycycrazycyThu, 11 Jul 2013 04:52:00 GMThttp://m.tkk7.com/crazycy/archive/2013/07/11/401448.htmlhttp://m.tkk7.com/crazycy/comments/401448.htmlhttp://m.tkk7.com/crazycy/archive/2013/07/11/401448.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/401448.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/401448.htmlabove refer to uri

If you want to give your user all read permissions, you could use:

EXEC sp_addrolemember N'db_datareader', N'your-user-name'

That adds the default db_datareader role (read permission on all tables) to that user.

There's also a db_datawriter role - which gives your user all WRITE permissions (INSERT, UPDATE, DELETE) on all tables:

EXEC sp_addrolemember N'db_datawriter', N'your-user-name'

 

If you need to be more granular, you can use the GRANT command:

GRANT SELECT, INSERT, UPDATE ON dbo.YourTable TO YourUserName
GRANT SELECT, INSERT ON dbo.YourTable2 TO YourUserName
GRANT SELECT, DELETE ON dbo.YourTable3 TO YourUserName

and so forth - you can granularly give SELECT, INSERT, UPDATE, DELETE permission on specific tables. 



by me:

If you want to give your user permissions to execute a procedure, you could use:

GRANT EXECUTE ON OBJECT::dbo.your_procedure_name TO N'your-user-name';

below is a full step to create a user db_user, and give him permissions to execute a procedure to a table db_tableABC and a procedureproc_get_price_data; assuming the user's loginName is your_user_login_name

--add a db engine login

IF NOT EXISTS(SELECT name FROM sys.server_principals WHERE name='{your_domain\}your_user_login_name')
CREATE LOGIN [{your_domain\}your_user_login_name] WITH PASSWORD='your_user_password'
, DEFAULT_DATABASE = TestDB;

--add a user to current database
use TestDB;
IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name='db_user')
CREATE USER [db_user] FOR LOGIN [{your_domain\}your_user_login_name];

--grant
GRANT INSERT, UPDATE, SELECT, DELETE ON dbo.db_tableABC TO your_user;
GRANT EXECUTE ON OBJECT::dbo.proc_get_price_data TO your_user;

e.g.
assuming a user named domain123\admin1 can access a database;

IF EXISTS(SELECT name FROM sys.server_principals WHERE name = '[domain123\admin1]')
BEGIN   
   IF NOT EXISTS (SELECT * FROM sys.database_principals WHERE name = 'admin1')        
   BEGIN             
        CREATE USER [admin1] FOR LOGIN [domain123\admin1];                   
   END
   GRANT INSERT, UPDATE, SELECT, DELETE ON dbo.
db_tableABC TO admin1;  
   GRANT EXECUTE ON OBJECT::dbo.GET_PRICE_DATA TO admin1;
END



crazycy 2013-07-11 12:52 鍙戣〃璇勮
]]>
SQL2008R2: A network error occurred while attempting to read from the file C:..\..\sqlncli.msihttp://m.tkk7.com/crazycy/archive/2013/06/19/400752.htmlcrazycycrazycyWed, 19 Jun 2013 14:24:00 GMThttp://m.tkk7.com/crazycy/archive/2013/06/19/400752.htmlhttp://m.tkk7.com/crazycy/comments/400752.htmlhttp://m.tkk7.com/crazycy/archive/2013/06/19/400752.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/400752.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/400752.html
紿佺劧閬亣浜嗕粠鏉ユ病鏈夌殑闂錛?span style="font-size: 14px;">A network error occurred while attempting to read from the file C:..\..\sqlncli.msi  濡傚浘銆?br />
鍥犱負(fù)璺濈涓嬬彮鏃墮棿寰堣繎浜嗭紝寰堢潃鎬ヤ篃寰堟伡鐏紝鎹i紦鏉ユ崳榧撳幓錛屾渶鍚庢墦寮浜嗘帶鍒墮潰鏉匡紝涓鐪嬶紝濡堝憖濂藉SQL Server鐨勪笢涓滐紝鎸ㄧ潃鍒犻櫎鍚с傘傘傚眳鐒跺氨鍙互瀹夎浜嗕簡銆傘傘傘?br />
鏈緇堝彂鐜板鏋滀換浣?SQLNCLI鎴栬匩ative Client瀛樺湪浜嗭紝灝變細(xì)鍑虹幇榪欎釜闂銆?br />Microsoft澶у摜灞呯劧寮勪簡榪欎箞榛戠殑涓鎷涖傘傘?br />
鍚屾椂鐪嬪埌鏈変漢閬亣浜嗙被浼肩殑鎮(zhèn)插墽錛?br />
Finally got the Client Tools and Mangement Studio installed. What I did was remove Microsoft SQL Server 2008 Native Client in Add or Remove Programs (before I was just trying to uninstall Microsoft SQL Server 2008 and it failed). After Native Client was removed, I reinstalled client tools and mangement studio from a dvd (was mounting the iso before). Everything installed perfectly.

榪欎釜浜鴻В閲婄殑鏇村錛?br />
The cause of the error
I wondered what was different between my clean test-VM and my server that I was now attempting to install SQL-SERVER 2008 R2 Client Tools and SSMS onto.  Both were 64-Bit OS's and same setup, etc., but one was a clean VM.  This got me thinking

I had PREVIOUSLY installed JUST the SQLNCLI (SQL-Server Native Client) for SQL 2008 R2 onto my physical system, in order to test application connectivity to a SQL2008R2 database.  So, could that be it!?  YES!  After uninstalling any previously installed SQLNCLI applications, and re-running the SQL-Server installer, amazingly my "network errors" were gone and the installation was fixed!  

Microsoft: GIVE MEANINGFUL ERROR MESSAGES!  All the installer had to do was say that "previous installations of SQLNCLI / native client exist and must be removed before installing" in fact, the PREREQUISITES-CHECK SHOULD HAVE TESTED FOR THIS if it can cause a total failure to install!  


crazycy 2013-06-19 22:24 鍙戣〃璇勮
]]>
鏁版嵁搴撹Е鍙戝櫒Trigger鎴栬呭瓨鍌ㄨ繃紼婸rocedure鐨勮皟璇曟妧宸?/title><link>http://m.tkk7.com/crazycy/archive/2013/04/10/397659.html</link><dc:creator>crazycy</dc:creator><author>crazycy</author><pubDate>Wed, 10 Apr 2013 12:05:00 GMT</pubDate><guid>http://m.tkk7.com/crazycy/archive/2013/04/10/397659.html</guid><wfw:comment>http://m.tkk7.com/crazycy/comments/397659.html</wfw:comment><comments>http://m.tkk7.com/crazycy/archive/2013/04/10/397659.html#Feedback</comments><slash:comments>0</slash:comments><wfw:commentRss>http://m.tkk7.com/crazycy/comments/commentRss/397659.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/crazycy/services/trackbacks/397659.html</trackback:ping><description><![CDATA[use Print<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">PRINT</span> <span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">testing----</span><span style="color: #FF0000; ">'</span> <span style="color: #0000FF; ">WAITFOR</span> DELAY <span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">00:00:05</span><span style="color: #FF0000; ">'</span>;</div>紼嬪簭涓皟鐢ㄨ繖涓猵rocedure鎴栬呰Е鍙戣繖涓猼rigger錛宩ava鎺у埗鍙版牴鏈病鏈夎繖涓緭鍑猴紱<br />寰堢敓姘旓紝鍚庢灉寰堜弗閲嶇殑璁╂椂闂撮閫濄?br /><br />緗戜笂浼楀澶ф嬁鎺ㄨ崘浣跨敤Raiserror錛屼簬鏄?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--><span style="color: #0000FF; ">raiserror</span> (<span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">test raiserror 1---</span><span style="color: #FF0000; ">'</span>, <span style="color: #800000; font-weight: bold; ">10</span>, <span style="color: #808080; ">-</span><span style="color: #800000; font-weight: bold; ">1</span>) <span style="color: #0000FF; ">with</span> <span style="color: #ff00ff;">log</span><br /><br /><span style="color: #0000FF; ">raiserror</span> (<span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">test raiserror 2---</span><span style="color: #FF0000; ">'</span>, <span style="color: #800000; font-weight: bold; ">10</span>, <span style="color: #800000; font-weight: bold; ">1</span>) <span style="color: #0000FF; ">with</span> nowait</div>紼嬪簭涓皟鐢ㄨ繖涓猵rocedure鎴栬呰Е鍙戣繖涓猼rigger錛宩ava鎺у埗鍙版牴鏈病鏈夎繖涓緭鍑猴紱<br />寰堢敓姘旓紝鍚庢灉寰堜弗閲嶇殑璁╂椂闂撮閫濄?br /><br />浜庢槸錛屽緢鏃犺鑳′貢鐨勬祴璇曪細(xì)<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><span style="color: #0000FF; ">raiserror</span> (<span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">test raiserror 3---</span><span style="color: #FF0000; ">'</span>, <span style="color: #800000; font-weight: bold; ">16</span>,<span style="color: #808080; ">-</span><span style="color: #800000; font-weight: bold; ">1</span>) <span style="color: #0000FF; ">with</span> <span style="color: #FF00FF; ">log</span>;<br /><span style="color: #0000FF; ">raiserror</span> (<span style="color: #FF0000; ">'</span><span style="color: #FF0000; ">test raiserror 4---</span><span style="color: #FF0000; ">'</span>, <span style="color: #800000; font-weight: bold; ">16</span>,<span style="color: #808080; ">-</span><span style="color: #800000; font-weight: bold; ">1</span>) <span style="color: #0000FF; ">with</span> nowait;</div>浠諱綍涓鏉¢兘杈撳嚭騫朵笖璁╃▼搴忓洖婊氾紝寰堝ソ寰堝ソ<br /><br />鎴戝緱鎵懼埌榪欎釜鍘熷洜錛?br />緲葷炕<a >MSDN</a>鍚э細(xì)<br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />--> A <span style="color: #0000FF; ">RAISERROR</span> severity <span style="color: #0000FF; ">of</span> <span style="color: #800000; font-weight: bold; ">11</span> <span style="color: #0000FF; ">to</span> <span style="color: #800000; font-weight: bold; ">19</span> executed <span style="color: #808080; ">in</span> the TRY block <span style="color: #0000FF; ">of</span> a TRY…CATCH construct causes control <span style="color: #0000FF; ">to</span> transfer <span style="color: #0000FF; ">to</span> the associated CATCH block. Specify a severity <span style="color: #0000FF; ">of</span> <span style="color: #800000; font-weight: bold; ">10</span> <span style="color: #808080; ">or</span> <span style="color: #FF00FF; ">lower</span> <span style="color: #0000FF; ">to</span> <span style="color: #0000FF; ">return</span> messages using <span style="color: #0000FF; ">RAISERROR</span> without invoking a CATCH block. <span style="color: #0000FF; ">PRINT</span> does <span style="color: #808080; ">not</span> transfer control <span style="color: #0000FF; ">to</span> a CATCH block.</div>濂藉惂錛?0浠ヤ笂鐨勬暟瀛楁墠浼?xì)寮簶q畠宸ヤ綔銆?br /><br />浣嗘槸鍛紝涓轟簡涓嶆姏閿欒錛屾垜浠彲浠ュ仛浠ヤ笅2縐嶆柟妗堬細(xì)<br />鏂規(guī)涓錛?br /><div style="background-color:#eeeeee;font-size:13px;border:1px solid #CCCCCC;padding-right: 5px;padding-bottom: 4px;padding-left: 4px;padding-top: 4px;width: 98%;word-break:break-all"><!--<br /><br />Code highlighting produced by Actipro CodeHighlighter (freeware)<br />http://www.CodeHighlighter.com/<br /><br />-->寤虹珛tmp琛紝鍒╃敤insert淇濆瓨浣犺鐨勭粨鏋?/div>鏂規(guī)浜岋細(xì)<br />涓嶇煡閬搕ry catch鏄笉鏄兘甯笂蹇欙紝灝辯暀鍦ㄤ笅鍥炴祴璇曞惂銆?br /><br />f<div></div><img src ="http://m.tkk7.com/crazycy/aggbug/397659.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/crazycy/" target="_blank">crazycy</a> 2013-04-10 20:05 <a href="http://m.tkk7.com/crazycy/archive/2013/04/10/397659.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>SQL Server: SYSOBJECTShttp://m.tkk7.com/crazycy/archive/2012/12/31/393651.htmlcrazycycrazycyMon, 31 Dec 2012 05:04:00 GMThttp://m.tkk7.com/crazycy/archive/2012/12/31/393651.htmlhttp://m.tkk7.com/crazycy/comments/393651.htmlhttp://m.tkk7.com/crazycy/archive/2012/12/31/393651.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/393651.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/393651.htmlUse OBJECTPROPERTY To Generate A List Of Object Types
How do you query the sysobjects system table and get the object type back for every single object
You can use the type and xtype columns, these contain the following data

xtype
Object type. Can be one of these object types:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
L = Log
FN = Scalar function
IF = Inlined table-function
P = Stored procedure
PK = PRIMARY KEY constraint (type is K)
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
UQ = UNIQUE constraint (type is K)
V = View
X = Extended stored procedure


type
Object type. Can be one of these values:
C = CHECK constraint
D = Default or DEFAULT constraint
F = FOREIGN KEY constraint
FN = Scalar function
IF = Inlined table-function
K = PRIMARY KEY or UNIQUE constraint
L = Log
P = Stored procedure
R = Rule
RF = Replication filter stored procedure
S = System table
TF = Table function
TR = Trigger
U = User table
V = View
X = Extended stored procedure

Or you can use OBJECTPROPERTY. OBJECTPROPERTY is better in my opinion because you can see right away what you are looking for
For example OBJECTPROPERTY ( id , 'IsUserTable' ) is much easier to understand than type = 'u'

Bu using CASE with OBJECTPROPERTY we can generate a nice report

SELECT name,CASE
WHEN OBJECTPROPERTY ( id , 'IsSystemTable' ) =1 THEN 'System Table'
WHEN OBJECTPROPERTY ( id , 'IsProcedure' ) =1 THEN 'Procedure' 
WHEN OBJECTPROPERTY ( id , 'IsPrimaryKey' ) =1 THEN 'Primary Key' 
WHEN OBJECTPROPERTY ( id , 'IsDefault' ) =1 THEN 'Default'
WHEN OBJECTPROPERTY ( id , 'IsForeignKey' ) =1 THEN 'Foreign Key'
WHEN OBJECTPROPERTY ( id , 'IsCheckCnst' ) =1 THEN 'Check Constraint'
WHEN OBJECTPROPERTY ( id , 'IsView' ) =1 THEN 'View'
WHEN OBJECTPROPERTY ( id , 'IsConstraint' ) =1 THEN 'Constraint'
WHEN OBJECTPROPERTY ( id , 'IsTrigger' ) =1 THEN 'Trigger'
WHEN OBJECTPROPERTY ( id , 'IsScalarFunction' ) =1 THEN 'Scalar Function'
WHEN OBJECTPROPERTY ( id , 'IsTableFunction' ) =1 THEN 'Table Valued Function'
WHEN OBJECTPROPERTY ( id , 'IsRule' ) =1 THEN 'Rule'
WHEN OBJECTPROPERTY ( id , 'IsExtendedProc' ) =1 THEN 'Extended Stored Procedure'
WHEN OBJECTPROPERTY ( id , 'IsUserTable' ) =1 THEN 'User Table'
END ObjectType, *
FROM sysobjects

And of course there are a bunch of INFORMATION_SCHEMA views that you can use to get some of the same information back

SELECT * FROM INFORMATION_SCHEMA.CHECK_CONSTRAINTS
SELECT * FROM INFORMATION_SCHEMA.CONSTRAINT_TABLE_USAGE
SELECT * FROM INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS
SELECT * FROM INFORMATION_SCHEMA.TABLES
SELECT * FROM INFORMATION_SCHEMA.VIEWS
SELECT * FROM INFORMATION_SCHEMA.COLUMNS


for example, want to find a procedure and drop it.
if exists (select * from dbo.sysobjects 
             where id = object_id('dbo.PROC_HELLOWORLD') 
                       and OBJECTPROPERTY(id, 'IsProcedure') = 1)
drop procedure dbo.PROC_HELLOWORLD;

another a bit difficult example, want to find a UDF and drop it.
if exists (select * from dbo.sysobjects
             where id = object_id('dbo.FUN_HELLOWORLD)
                      and type in ('FN', 'IF', 'TF', 'FS', 'FT'))
DROP FUNCTION dbo.FUN_HELLOWORLD



crazycy 2012-12-31 13:04 鍙戣〃璇勮
]]>
SQLSERVER: ROWS TO COLUMNS 琛岃漿鍒?錛堜簩錛?http://m.tkk7.com/crazycy/archive/2012/10/04/389004.htmlcrazycycrazycyWed, 03 Oct 2012 17:33:00 GMThttp://m.tkk7.com/crazycy/archive/2012/10/04/389004.htmlhttp://m.tkk7.com/crazycy/comments/389004.htmlhttp://m.tkk7.com/crazycy/archive/2012/10/04/389004.html#Feedback1http://m.tkk7.com/crazycy/comments/commentRss/389004.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/389004.htmlCREATE TA...  闃呰鍏ㄦ枃

crazycy 2012-10-04 01:33 鍙戣〃璇勮
]]>
闈炲父鏈夋剰鎬濈殑sql鎺掗敊http://m.tkk7.com/crazycy/archive/2008/04/08/191534.htmlcrazycycrazycyTue, 08 Apr 2008 10:30:00 GMThttp://m.tkk7.com/crazycy/archive/2008/04/08/191534.htmlhttp://m.tkk7.com/crazycy/comments/191534.htmlhttp://m.tkk7.com/crazycy/archive/2008/04/08/191534.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/191534.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/191534.html1)  浣犵湅鍑哄尯鍒湪鍝噷浜嗕箞錛?緇撴灉浼?xì)涓鏍蜂箞錛?br /> SELECT
(select first 
1 longname from ivctrallocpurch a join jcivloc l  on a.ivlocid=l.ivlocid and a.ctrid=A.ctrid) as mill
FROM CTR A
JOIN CTRSMRY CS ON (A.CTRID
=CS.CTRID)
WHERE A.CTRID
=3161
鍜?br />
SELECT
(select first 
1 longname from ivctrallocpurch a join jcivloc l  on a.ivlocid=l.ivlocid and a.ctrid=3161) as mill
FROM CTR A
JOIN CTRSMRY CS ON (A.CTRID
=CS.CTRID)
WHERE A.CTRID
=3161
緇撴灉涓轟粈涔堜笉涓鏍峰憿錛?br />

2錛?Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.
select sum(rcpt.artothome * rate) as amt
from cashreceipt rcpt
join homerate rate on rcpt.currencyid=rate.currencyid
鍒嗘瀽錛?br />
artothome @ arheader  is : numeric(18,4)
rate @ ..  is : numeric(
10,10)
鏀硅繘1 (not work)
select sum(cast(rcpt.artothome * rate as numeric(18,4))) as amt
from cashreceipt rcpt
join homerate rate on rcpt.currencyid
=rate.currencyid
鏀硅繘2 (works)
select sum(cast(cast(rcpt.artothome as numeric(18,4)) * cast(rate as numeric(18,4)) as numeric(18,4))) as amt
from cashreceipt rcpt
join homerate rate on rcpt.currencyid
=rate.currencyid
reason, forward from http://www.firebirdfaq.org/faq207/
Integer overflow. The result of an integer operation caused the most significant bit of the result to carry.

Short explanation:
If you use fixed precision datatypes (smallint, integer, bigint, decimal and numeric), it is possible that the result of calculation doesn
't fit the datatype. Try casting the values in complex expressions as double precision and see whether the error goes away. If it works and you don't care about being too precise, you can leave it at that. Otherwise you need to check every operation and calculate the result.

Details:
Here
's an example: if you multiply 9.12 with 8.11 (both numeric(18,2)) you would get 73.9632. If Firebird would store that into numeric(18,2) datatype, we would lose 0.0032. Doesn't look much, but when you have complex calculations, you can easily loose thousands (dollars or euros). Therefore, the result is stored in numeric(18,4).

Problems are rarely seen with such low precision as 
2. Let's use some bigger precision. For example, numeric(18,6) times numeric(18,6) yields numeric(18,12) result, meaning that maximal value it can store is 9223372.036854775807. If (for example) you wish to keep only 6 digits of precision, you could use something like:

cast(value1 as numeric(
18,3)) * cast(value2 as numeric(18,3))

which would yield numeric(
18,6) result, but it is quite possible that you would get more accurate result by casting to double:

cast(cast(value1 as 
double precision) * cast(value2 as double precision) as numeric(18,6))

Also, 
if you have mixed multiplications and divisions it helps to change the order of operations, so that the overflow doesn't happen.


String sql = "select mbrid from jcmbr where reference4=?";
鍋囧娌℃湁璁板綍
DynaBean aBean 
= CxcDataModule.getInstance().getRow(sql, new Object[]{reference4});
濡傛灉鐩存帴鐢╝Bean.get("
reference4") 鍑洪敊錛?br /> 閿欒鐨勫師鍥犳槸aBean  涓簄ull

Object obj 
= {spring jdbctemplate}.queryForObject(sql, new Object[]{reference4}, Integer.class);
if (obj instanceof Integer)
         System.out.println(
"(Integer)obj>>>>>>>>>>" + (Integer)obj);
else if (obj instanceof Map)
            System.out.println(
"(Integer)obj>>>>>>>>>>" + ((Map)obj).get("REFERENCE4"));
鐪熸槸鐨勬祦紼嬫槸 if 鍒嗘敮
濡傛灉鏈夋暟鎹紝榪欐槸瀵圭殑
濡傛灉娌℃湁鏁版嵁錛岀洿鎺ュ嚭閿欙紝鍥犱負(fù)鏈変釜鍋囧畾鏈塈nteger鍊煎瓨鍦?br />
int value = JcDataModuleUtils.getJdbcTemplate().queryForInt(sql, new Object[]{reference4});
鍑洪敊鍘熷洜鏄亣瀹氫竴瀹氫細(xì)鏈変竴涓猧nt鍊艱繑鍥?/span>
15:09:00,438 ERROR [STDERR] Caused by: org.springframework.dao.IncorrectResultSizeDataAccessException: Incorrect result size:
 expected 1, actual 0
15:09:00,438 ERROR [STDERR]     at org.springframework.dao.support.DataAccessUtils.requiredUniqueResult(DataAccessUtils.java:
66)
15:09:00,469 ERROR [STDERR]     at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:620)
15:09:00,469 ERROR [STDERR]     at org.springframework.jdbc.core.JdbcTemplate.queryForObject(JdbcTemplate.java:629)
15:09:00,469 ERROR [STDERR]     at org.springframework.jdbc.core.JdbcTemplate.queryForInt(JdbcTemplate.java:656)






crazycy 2008-04-08 18:30 鍙戣〃璇勮
]]>
mysql涔辯爜緙栫爜鐨勮В鍐充箣閬?涓嶅惈鍒嗘瀽) http://m.tkk7.com/crazycy/archive/2007/12/23/169827.htmlcrazycycrazycySun, 23 Dec 2007 10:07:00 GMThttp://m.tkk7.com/crazycy/archive/2007/12/23/169827.htmlhttp://m.tkk7.com/crazycy/comments/169827.htmlhttp://m.tkk7.com/crazycy/archive/2007/12/23/169827.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/169827.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/169827.html 浠ysql鐨勪袱涓浉鍚岀粨鏋勭殑琛ㄩ棿榪涜鏁版嵁榪佺Щ涓轟緥錛屽仛浜嗕笁縐嶆儏鍐電殑嫻嬭瘯錛屽茍鎻愬嚭瑙e喅涔辯爜鐨勮В鍐蟲柟娉曞涓?

Migration between MySQLs

1)      Migration between character set : utf8

Amend my.ini (2 positions)

default-character-set=latin1

=>

default-character-set=utf8

2)      Migration between character set : origin is utf8 ==> the destination is latin1

Alter destination:

  • alter database [db_name] default character set utf8;
  • alter table [table_name] default character set utf8;
  •  alter table [table_name] change [field_name] [field_name] [filed type] varchar(45) character set utf8;
    • example

users(id, user_name)

alter table users  change user_name user_name varchar(45) character set utf8;

 

3)      Migration between character set : origin is latin1 ==> the destination is utf8

If the origin is latin1, cannot insert Chinese Character.

 




crazycy 2007-12-23 18:07 鍙戣〃璇勮
]]>
firebird鎶宸у拰閿欒鍒嗘瀽涓庢葷粨http://m.tkk7.com/crazycy/archive/2007/11/03/157940.htmlcrazycycrazycySat, 03 Nov 2007 09:06:00 GMThttp://m.tkk7.com/crazycy/archive/2007/11/03/157940.htmlhttp://m.tkk7.com/crazycy/comments/157940.htmlhttp://m.tkk7.com/crazycy/archive/2007/11/03/157940.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/157940.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/157940.html Cmd >> isql localhost/3050:path/cxcdata.fdb -user sysdba -pass masterkey
Error >>
Statement failed, SQLCODE = -902

Unable to complete network request to host "localhost".
-Failed to establish a connection.
-No connection could be made because the target machine actively refused it.

Use CONNECT or CREATE DATABASE to specify a database
Solution>>
check whether service or application of firebird start or not

2)
Scenario>>Using EMS Data Export for Interbase/Firebird
Error>>

Solution>>windows\system32\drivers\etc鐩綍涓嬬殑services鏂囦歡涓坊鍔?br />                 gds_db 3050/tcp

3) windows涓媐irebird瀵筪b璺緞瑕佹眰錛氫笌firebird鐩存帴浜や簰鐨刦db鏂囦歡蹇呴』澧炲姞鍓嶇紑錛歭ocalhost/3050:[driver]/{[path]/}[.fdb file]
    鏃犺鏄痠sql 榪樻槸 gbak
    姣斿 test.fdb 鍦╠:\dbfile\firebird\test.fdb
    connect db: cmd>> isql localhost/3050:d:/dbfile/firebird/test.fdb -user [username] -pass [userpass]
    backup db: cmd>> gbak -B localhost/3050:d:/dbfile/firebird/test.fdb test.fbk -user [username] -pass [userpass]
    restore db: cmd>> gbak -C test.fbk localhost/3050:d:/dbfile/firebird/test.fdb -user [username] -pass [userpass]
    NOTE: only the fdb file should add the localhost constraint
   
   
4) db installed in d:/dbfile/firebird/test.fdb
    connect way 1>>  isql localhost/3050:d:/dbfile/firebird/test.fdb -user [username] -pass [userpass]
    connect way 2>> isql localhost/3050:db -user [username] -pass [userpass]
                               add this line : db = d:/dbfile/firebird/test.fdb  in aliases.conf, no need restart firebird service

5錛塧bout amention of db's path for different customer
we offten configure db path in apps using jdbc:firebird:localhost:[path]/[db file]   like jdbc:firebird:localhost: d:/dbfile/firebird/test.fdb
As you know, in most time we install db in different folder for different customers; so we must keep re-compile apps or modify war/jar/ear every time.

So basis on this issue,  we can change to configure db using firebird self file called aliases.conf
like this form (basis my local configuration):
test.fdb = d:/dbfile/firebird/test.fdb

so now using this form jdbc:firebird:localhost:test.fdb  in  apps
I tried both windows and linux, it works;



crazycy 2007-11-03 17:06 鍙戣〃璇勮
]]>
寰楀埌PrepareStatement鏈緇堟墽琛岀殑sql璇彞鐨勬柟娉?/title><link>http://m.tkk7.com/crazycy/archive/2006/07/22/59581.html</link><dc:creator>crazycy</dc:creator><author>crazycy</author><pubDate>Sat, 22 Jul 2006 13:53:00 GMT</pubDate><guid>http://m.tkk7.com/crazycy/archive/2006/07/22/59581.html</guid><wfw:comment>http://m.tkk7.com/crazycy/comments/59581.html</wfw:comment><comments>http://m.tkk7.com/crazycy/archive/2006/07/22/59581.html#Feedback</comments><slash:comments>15</slash:comments><wfw:commentRss>http://m.tkk7.com/crazycy/comments/commentRss/59581.html</wfw:commentRss><trackback:ping>http://m.tkk7.com/crazycy/services/trackbacks/59581.html</trackback:ping><description><![CDATA[鍦–SDN鐨凧AVA鍩虹鐗?甯稿父鏈変漢闂強濡備綍寰楀埌PreparedStatement鏈緇堟墽琛岀殑SQL璇彞;鎴栬呭浣曞湪鎺у埗鍙拌緭鍑哄崰浣嶇鐨勭湡瀹炲?....<br /><br />鍘熷洜灝辨槸PreparedStatement鎵ц鐨剆ql璇彞鏈夊ぇ閲忕殑鍗犱綅絎?....<br /><br />闂璇稿JDBC涓?<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">濡備綍寰楀埌聽conn.prepareStatement聽鏈緇堟墽琛岀殑sql璇彞銆?br />sql</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">update聽table1聽set聽a=?,b=?</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);"><br />stmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽con.prepareStatement(sql);<br />stmt.setObjec聽t(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">a</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />stmt.setObjec聽t(</span><span style="color: rgb(0, 0, 0);">2</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">b</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /><br />甯屾湜鍙互閫氳繃stmt鎴栬卌onn聽寰楀埌錛?br />update聽table1聽set聽a</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">'</span><span style="color: rgb(0, 0, 0);">a</span><span style="color: rgb(0, 0, 0);">'</span><span style="color: rgb(0, 0, 0);">,b</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">'</span><span style="color: rgb(0, 0, 0);">b</span><span style="color: rgb(0, 0, 0);">'</span></div><br />浜︽垨Hibernate涓?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 0, 0);">濡傛垜鎵ц錛歠ind(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">select聽*聽from聽t_table聽where聽id聽=聽?</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">,</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽Integer(</span><span style="color: rgb(0, 0, 0);">5</span><span style="color: rgb(0, 0, 0);">));<br />鍦ㄦ帶鍒跺彴鏄劇ずSQL鏃跺彧鏄劇ず錛歴elect聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">聽from聽t_table聽where聽id聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">?</span><span style="color: rgb(0, 0, 0);"><br />濡備綍鎵嶈兘鍋氬埌灝嗘帶鍒跺彴鏄劇ず鐨勫崰浣嶇鐢ㄥ叾鐪熷疄鐨勫兼潵鏇挎崲錛?br />鍗蟲帶鍒跺彴杈撳嚭鏃舵樉紺猴細(xì)select聽</span><span style="color: rgb(0, 0, 0);">*</span><span style="color: rgb(0, 0, 0);">聽from聽t_table聽where聽id聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">5</span><span style="color: rgb(0, 0, 0);"><br /></span></div><br />鏃犲畠錛屾棤璁篔DBC榪樻槸Hiberante閮戒笉鎻愪緵榛樿瑙e喅鏂規(guī)錛屼絾鏄弬鏁版槸璁劇疆榪涘幓鐨勶紝鎴戜滑鍦ㄨ緗殑榪囩▼涓彲浠ユ湁鍏呭垎鐨勭悊鐢辨潵鎴彇騫惰幏寰楄嚜宸辨兂瑕佺殑涓滆タ錛岀被浼間簬AOP鐞嗚銆?br /><br />鍏變韓鎴戝湪宸ョ▼涓殑浣跨敤鏂規(guī)硶錛?br />鎻掑叆鎿嶄綔錛?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />聽聽聽聽聽*聽鎵ц鎻掑叆鏁版嵁搴撶殑璇彞<br />聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽sql<br />聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽params<br />聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);">聽榪斿洖鐢熸垚鐨勪富閿?br />聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽executeInsert(String聽sql,聽Object[]聽params)聽{<br />聽聽聽聽聽聽聽聽Connection聽conn聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽PreparedStatement聽pstmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽ResultSet聽rs聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);">聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">1聽鑾峰緱榪炴帴</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽MyDBConnection.getInstance().getConnection();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">2聽璁劇疆鎻愪氦鏂瑰紡涓虹▼搴忔帶鍒?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn.setAutoCommit(</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">3聽鑾峰緱璇彞瀵硅薄</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽pstmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽conn.prepareStatement(sql,聽Statement.RETURN_GENERATED_KEYS);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">4聽璁劇疆SQL璇彞鐨勫弬鏁?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽params聽</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽params.length)聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽setParams(pstmt,聽params);<br />聽聽聽聽聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">5聽鎵撳嵃SQL璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(MyDBConstants.showSQL)聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽getPreparedSQL(sql,聽params);<br />聽聽聽聽聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">6聽鎵ц璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽pstmt.executeUpdate();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">7聽紼嬪簭鎻愪氦</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn.commit();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">8聽榪斿洖鐢熸垚鐨勪富閿?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽rs聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽pstmt.getGeneratedKeys();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽generatedKey聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(rs.next())聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽generatedKey聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽rs.getInt(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">);<br />聽聽聽聽聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽generatedKey)<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">throw</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽MySQLException(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">鎻掑叆璁板綍鏃跺嚭閿?/span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽generatedKey;<br />聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);">聽(SQLException聽e)聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍥炴粴</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽MyDBUtil.rollBack(conn);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">throw</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽MySQLException(e);<br />聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">finally</span><span style="color: rgb(0, 0, 0);">聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍏抽棴鎵撳紑鐨勬搷浣?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽MyDBUtil.close(conn,聽pstmt,聽rs);<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽}</span></div><br /><br />鏇存柊鏌ユ壘鎿嶄綔錛?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br />聽聽聽聽聽*聽鎵ц鏇存柊鎴栬呭垹闄ゆ暟鎹簱鐨勮鍙?br />聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽sql<br />聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽params<br />聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);">聽榪斿洖鎵ц鎴愬姛涓庡惁<br />聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br />聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);">聽executeUpdateDel(String聽sql,聽Object[]聽params)聽{<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">boolean</span><span style="color: rgb(0, 0, 0);">聽isSuccess聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽Connection聽conn聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽PreparedStatement聽pstmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);">聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">1聽鑾峰緱榪炴帴</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽MyDBConnection.getInstance().getConnection();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">2聽璁劇疆鎻愪氦鏂瑰紡涓虹▼搴忔帶鍒?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn.setAutoCommit(</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">3聽鑾峰緱璇彞瀵硅薄</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽pstmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽conn.prepareStatement(sql);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">4聽璁劇疆SQL璇彞鐨勫弬鏁?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽params聽</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽params.length)聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽setParams(pstmt,聽params);<br />聽聽聽聽聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">5聽鎵撳嵃SQL璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(MyDBConstants.showSQL)聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽getPreparedSQL(sql,聽params);<br />聽聽聽聽聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">6聽鎵ц璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽pstmt.executeUpdate();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">7聽紼嬪簭鎻愪氦</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn.commit();<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">8聽璁劇疆璇彞鎵ц鐨勬爣璁?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽isSuccess聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">true</span><span style="color: rgb(0, 0, 0);">;<br />聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);">聽(SQLException聽e)聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍥炴粴</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽MyDBUtil.rollBack(conn);<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">throw</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽MySQLException(e);<br />聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">finally</span><span style="color: rgb(0, 0, 0);">聽{<br />聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍏抽棴鎵撳紑鐨勬搷浣?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽MyDBUtil.close(conn,聽pstmt);<br />聽聽聽聽聽聽聽聽}<br />聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽isSuccess;<br />聽聽聽聽}</span></div><br />鎵ц鏌ヨ<br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽鎵ц鏌ヨ鏁版嵁搴撶殑璇彞;</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*<br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">12</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">public</span><span style="color: rgb(0, 0, 0);">聽Object聽executeQuery(String聽sql,聽Object[]聽params)聽{<br /></span><span style="color: rgb(0, 128, 128);">13</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽Connection聽conn聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">14</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽PreparedStatement聽pstmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">15</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽ResultSet聽rs聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">16</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);">聽{<br /></span><span style="color: rgb(0, 128, 128);">17</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">1聽鑾峰緱榪炴帴</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">18</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽MyDBConnection.getInstance().getConnection();<br /></span><span style="color: rgb(0, 128, 128);">19</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">2聽璁劇疆鎻愪氦鏂瑰紡涓虹▼搴忔帶鍒?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">20</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn.setAutoCommit(</span><span style="color: rgb(0, 0, 255);">false</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">21</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">3聽鑾峰緱璇彞瀵硅薄</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">22</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽pstmt聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽conn.prepareStatement(sql,聽ResultSet.TYPE_SCROLL_SENSITIVE,聽ResultSet.CONCUR_UPDATABLE);<br /></span><span style="color: rgb(0, 128, 128);">23</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">4聽璁劇疆SQL璇彞鐨勫弬鏁?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">24</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽params聽</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽params.length)聽{<br /></span><span style="color: rgb(0, 128, 128);">25</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽setParams(pstmt,聽params);<br /></span><span style="color: rgb(0, 128, 128);">26</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">27</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">5聽鎵撳嵃SQL璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">28</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(MyDBConstants.showSQL)聽{<br /></span><span style="color: rgb(0, 128, 128);">29</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽getPreparedSQL(sql,聽params);<br /></span><span style="color: rgb(0, 128, 128);">30</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">31</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">6聽鎵ц璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">32</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽rs聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽pstmt.executeQuery();<br /></span><span style="color: rgb(0, 128, 128);">33</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">34</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">9聽紼嬪簭鎻愪氦</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">35</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽conn.commit();<br /></span><span style="color: rgb(0, 128, 128);">36</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">37</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">10聽鑾峰緱璁板綍</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">38</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽Object聽vo聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽Object();<br /></span><span style="color: rgb(0, 128, 128);">39</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽rs聽</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);">聽rs.next())聽{<br /></span><span style="color: rgb(0, 128, 128);">40</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽vo聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽rs2vo(rs);<br /></span><span style="color: rgb(0, 128, 128);">41</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">42</span>聽<span style="color: rgb(0, 0, 0);"></span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">聽聽聽聽聽聽聽聽聽聽聽聽return聽results;</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">43</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽vo;<br /></span><span style="color: rgb(0, 128, 128);">44</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);">聽(SQLException聽e)聽{<br /></span><span style="color: rgb(0, 128, 128);">45</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍥炴粴</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">46</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽MyDBUtil.rollBack(conn);<br /></span><span style="color: rgb(0, 128, 128);">47</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">throw</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽MySQLException(e);<br /></span><span style="color: rgb(0, 128, 128);">48</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">finally</span><span style="color: rgb(0, 0, 0);">聽{<br /></span><span style="color: rgb(0, 128, 128);">49</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">鍏抽棴鎵撳紑鐨勬搷浣?/span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">50</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽MyDBUtil.close(conn,聽pstmt,聽rs);<br /></span><span style="color: rgb(0, 128, 128);">51</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">52</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}</span></div><br />鐪嬪埌<span style="color: rgb(0, 0, 0);">getPreparedSQL(sql,聽params)浜嗕箞錛?榪欎釜鍦版柟灝辨槸瑕佸疄鐜版垜浠鏈熸晥鏋滅殑鍦版柟錛?br /><div style="border: 1px solid rgb(204, 204, 204); padding: 4px 5px 4px 4px; background-color: rgb(238, 238, 238); font-size: 13px; width: 98%;"><img id="Code_Closed_Image_215212" onclick="this.style.display='none'; Code_Closed_Text_215212.style.display='none'; Code_Open_Image_215212.style.display='inline'; Code_Open_Text_215212.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ContractedBlock.gif" align="top" height="16" width="11" /><img id="Code_Open_Image_215212" style="display: none;" onclick="this.style.display='none'; Code_Open_Text_215212.style.display='none'; Code_Closed_Image_215212.style.display='inline'; Code_Closed_Text_215212.style.display='inline';" src="http://m.tkk7.com/images/OutliningIndicators/ExpandedBlockStart.gif" align="top" height="16" width="11" /><span id="Code_Closed_Text_215212" style="border: 1px solid rgb(128, 128, 128); background-color: rgb(255, 255, 255);">寰楀埌PrepareStatement鏈緇堟墽琛岀殑sql璇彞鐨勬柟娉?/span><span id="Code_Open_Text_215212" style="display: none;"><br /><!--<br><br>Code highlighting produced by Actipro CodeHighlighter (freeware)<br>http://www.CodeHighlighter.com/<br><br>--><span style="color: rgb(0, 128, 128);">聽1</span>聽<span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽2</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽鑾峰緱PreparedStatement鍚戞暟鎹簱鎻愪氦鐨凷QL璇彞<br /></span><span style="color: rgb(0, 128, 128);">聽3</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽sql<br /></span><span style="color: rgb(0, 128, 128);">聽4</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽params<br /></span><span style="color: rgb(0, 128, 128);">聽5</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@return</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽6</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽7</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">聽String聽getPreparedSQL(String聽sql,聽Object[]聽params)聽{<br /></span><span style="color: rgb(0, 128, 128);">聽8</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">1聽濡傛灉娌℃湁鍙傛暟錛岃鏄庢槸涓嶆槸鍔ㄦ丼QL璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">聽9</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽paramNum聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;<br /></span><span style="color: rgb(0, 128, 128);">10</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽params)聽聽paramNum聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽params.length;<br /></span><span style="color: rgb(0, 128, 128);">11</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽paramNum)聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽sql;<br /></span><span style="color: rgb(0, 128, 128);">12</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">//</span><span style="color: rgb(0, 128, 0);">2聽濡傛灉鏈夊弬鏁幫紝鍒欐槸鍔ㄦ丼QL璇彞</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">13</span>聽<span style="color: rgb(0, 128, 0);"></span><span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽StringBuffer聽returnSQL聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽StringBuffer();<br /></span><span style="color: rgb(0, 128, 128);">14</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽String[]聽subSQL聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽sql.split(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">\\?</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">15</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽paramNum;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">16</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(params[i]聽</span><span style="color: rgb(0, 0, 255);">instanceof</span><span style="color: rgb(0, 0, 0);">聽Date)聽{<br /></span><span style="color: rgb(0, 128, 128);">17</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽returnSQL.append(subSQL[i]).append(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">聽'</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).append(MyDateUtil.dateUtil2SQL((java.util.Date)params[i])).append(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">'聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">18</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);">聽{<br /></span><span style="color: rgb(0, 128, 128);">19</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽returnSQL.append(subSQL[i]).append(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">聽'</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">).append(params[i]).append(</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">'聽</span><span style="color: rgb(0, 0, 0);">"</span><span style="color: rgb(0, 0, 0);">);<br /></span><span style="color: rgb(0, 128, 128);">20</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">21</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">22</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">23</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(subSQL.length聽</span><span style="color: rgb(0, 0, 0);">></span><span style="color: rgb(0, 0, 0);">聽params.length)聽{<br /></span><span style="color: rgb(0, 128, 128);">24</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽returnSQL.append(subSQL[subSQL.length聽</span><span style="color: rgb(0, 0, 0);">-</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">]);<br /></span><span style="color: rgb(0, 128, 128);">25</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">26</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">return</span><span style="color: rgb(0, 0, 0);">聽returnSQL.toString();<br /></span><span style="color: rgb(0, 128, 128);">27</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">28</span>聽<span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">29</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 128, 0);">/**</span><span style="color: rgb(0, 128, 0);"><br /></span><span style="color: rgb(0, 128, 128);">30</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽涓篜reparedStatement棰勭紪璇戠殑SQL璇彞璁劇疆鍙傛暟<br /></span><span style="color: rgb(0, 128, 128);">31</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽pstmt<br /></span><span style="color: rgb(0, 128, 128);">32</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽*聽</span><span style="color: rgb(128, 128, 128);">@param</span><span style="color: rgb(0, 128, 0);">聽params<br /></span><span style="color: rgb(0, 128, 128);">33</span>聽<span style="color: rgb(0, 128, 0);">聽聽聽聽聽</span><span style="color: rgb(0, 128, 0);">*/</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">34</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽</span><span style="color: rgb(0, 0, 255);">private</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">void</span><span style="color: rgb(0, 0, 0);">聽setParams(PreparedStatement聽pstmt,聽Object[]聽params)聽{<br /></span><span style="color: rgb(0, 128, 128);">35</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽params)聽{<br /></span><span style="color: rgb(0, 128, 128);">36</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">for</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">int</span><span style="color: rgb(0, 0, 0);">聽i聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">0</span><span style="color: rgb(0, 0, 0);">,聽paramNum聽</span><span style="color: rgb(0, 0, 0);">=</span><span style="color: rgb(0, 0, 0);">聽params.length;聽i聽</span><span style="color: rgb(0, 0, 0);"><</span><span style="color: rgb(0, 0, 0);">聽paramNum;聽i</span><span style="color: rgb(0, 0, 0);">++</span><span style="color: rgb(0, 0, 0);">)聽{<br /></span><span style="color: rgb(0, 128, 128);">37</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">try</span><span style="color: rgb(0, 0, 0);">聽{<br /></span><span style="color: rgb(0, 128, 128);">38</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">if</span><span style="color: rgb(0, 0, 0);">聽(</span><span style="color: rgb(0, 0, 255);">null</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">!=</span><span style="color: rgb(0, 0, 0);">聽params[i]聽</span><span style="color: rgb(0, 0, 0);">&&</span><span style="color: rgb(0, 0, 0);"><br /></span><span style="color: rgb(0, 128, 128);">39</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽params[i]聽</span><span style="color: rgb(0, 0, 255);">instanceof</span><span style="color: rgb(0, 0, 0);">聽java.util.Date)聽{<br /></span><span style="color: rgb(0, 128, 128);">40</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽pstmt.setDate(i聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">,聽MyDateUtil.dateUtil2SQL(<br /></span><span style="color: rgb(0, 128, 128);">41</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽(java.util.Date)聽params[i]));<br /></span><span style="color: rgb(0, 128, 128);">42</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">else</span><span style="color: rgb(0, 0, 0);">聽{<br /></span><span style="color: rgb(0, 128, 128);">43</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽pstmt.setObject(i聽</span><span style="color: rgb(0, 0, 0);">+</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 0);">1</span><span style="color: rgb(0, 0, 0);">,聽params[i]);<br /></span><span style="color: rgb(0, 128, 128);">44</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">45</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}聽</span><span style="color: rgb(0, 0, 255);">catch</span><span style="color: rgb(0, 0, 0);">聽(SQLException聽e)聽{<br /></span><span style="color: rgb(0, 128, 128);">46</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽</span><span style="color: rgb(0, 0, 255);">throw</span><span style="color: rgb(0, 0, 0);">聽</span><span style="color: rgb(0, 0, 255);">new</span><span style="color: rgb(0, 0, 0);">聽MySQLException(e);<br /></span><span style="color: rgb(0, 128, 128);">47</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">48</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">49</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽聽聽聽聽聽聽聽聽}<br /></span><span style="color: rgb(0, 128, 128);">50</span>聽<span style="color: rgb(0, 0, 0);">聽聽聽聽}</span></span></div><br />鐒跺悗杞繪澗鏍稿疄浣犵殑鎺у埗鍙版垨鑰呮棩蹇楁枃浠跺惂......<br /></span><img src ="http://m.tkk7.com/crazycy/aggbug/59581.html" width = "1" height = "1" /><br><br><div align=right><a style="text-decoration:none;" href="http://m.tkk7.com/crazycy/" target="_blank">crazycy</a> 2006-07-22 21:53 <a href="http://m.tkk7.com/crazycy/archive/2006/07/22/59581.html#Feedback" target="_blank" style="text-decoration:none;">鍙戣〃璇勮</a></div>]]></description></item><item><title>An internal error occurred during: "Generating Artifacts" http://m.tkk7.com/crazycy/archive/2006/06/22/54502.htmlcrazycycrazycyThu, 22 Jun 2006 07:41:00 GMThttp://m.tkk7.com/crazycy/archive/2006/06/22/54502.htmlhttp://m.tkk7.com/crazycy/comments/54502.htmlhttp://m.tkk7.com/crazycy/archive/2006/06/22/54502.html#Feedback0http://m.tkk7.com/crazycy/comments/commentRss/54502.htmlhttp://m.tkk7.com/crazycy/services/trackbacks/54502.html
聽聽聽 google浜嗕竴鎶婏紝鐪嬪埌Blog錛堣蔣閬擄紝url錛歨ttp://blog.csdn.net/langtaojin/archive/2006/03/28/641722.aspx錛変粙緇嶅涓嬶細(xì)
浠婂ぉ鍦ㄤ嬌鐢╩yEclipse 鐨勩Database Explorer 瑙嗗浘涓瑿reate Hibernate Mapping鏃訛紝鍑虹幇浜嗏淎n internal error occurred during: "Generating Artifacts".鈥濋敊璇彁紺恒傝垂浜嗗ソ澶у姴錛岀粓浜庤В鍐充簡銆傛嵁myEclipse瀹樻柟緗戠珯涓婄殑浠嬬粛錛屽彂鐢熻閿欒涓昏鏈変袱縐嶆儏鍐碉紝涓鏄綘eclipse涓婂畨瑁呬簡jboss鍏徃鐨刪ibernate tools plugin for eclipse,榪欎簺鎻掍歡涓巑yEclipse鍙戠敓鍐茬獊錛岃В鍐蟲柟娉曟槸鍒犻櫎榪欎簺鎻掍歡銆備簩鏄綘鍦ㄦ病鏈夊嵏杞戒互鍓峬yEclipse鐗堟湰鐨勬儏鍐典笅瀹夎浜嗘柊鐨?myEclipse鐗堟湰錛岃В鍐蟲柟娉曟槸鎶妋yEclipse鍗歌澆鍚庨噸鏂板畨瑁咃紝鎴戦亣鍒扮殑鎯呭喌灝卞睘浜庢瘡浜岀鎯呭喌錛岄噸瑁卪yEclipse鍚庨棶棰樿В鍐充簡銆?br />
聽聽聽 絎竴涓棶棰樹笉瀛樺湪錛岀劧鍚庡挘鍜g殑鍗歌澆銆佸畨瑁呬簡MyEclipse4.1.1銆傞棶棰樹緷鐒躲?br />
聽聽聽 鎵嬪伐寤虹珛嫻嬭瘯琛紝鍗存病鏈夎繖涓棶棰樸傜獊鐒舵兂鍒頒簡鍙兘鏄暟鎹〃寤虹珛鐨勬牸寮忔湁闂錛氭垜鐢≒D鐩存帴鎶婄墿鐞嗗疄浣撴ā鍨嬪鍏ュ埌Mysql涓傚氨瀹冧簡銆傞氳繃MyCC錛堝綋鐒朵篃鍙互閫氳繃鍛戒護(hù)琛?mysql -h localhost -u root -p錛夋妸PD鐢熸垚鐨凷QL璇彞閲嶆柊榪愯錛孫K錛岄棶棰樿В鍐熾?br />
聽聽聽 緇撳悎涓婇潰鐨刡log錛屽彲浠ョ湅鍑哄嚭鐜拌繖涓棶棰樺叿鏈変笁縐嶆儏鍐典簡銆?br />
聽聽聽 褰撶劧鎴栬浣犵敤Oracle錛屼篃鍙兘閬囧埌榪欎釜闂錛屽鏋滀互涓婁笁縐嶆儏鍐甸兘娌℃湁瑙e喅浜咥n internal error occurred during: "Generating Artifacts" 榪欎釜閿欒銆備綘娉ㄦ剰涓ょ偣錛?PLSQL宸ュ叿鐨勯棶棰橈紝寤鴻鐩存帴鍛戒護(hù)琛屻?Orcle鐨刢lass12椹卞姩鐨勭増鏈紝寤鴻鎹㈡柊鐗堟湰銆?br />



crazycy 2006-06-22 15:41 鍙戣〃璇勮
]]>
主站蜘蛛池模板: 亚洲片国产一区一级在线观看 | 最近最好最新2019中文字幕免费| 精品国产sm捆绑最大网免费站| 永久黄网站色视频免费观看| 夜夜春亚洲嫩草影院| 亚洲大香伊人蕉在人依线| 特色特黄a毛片高清免费观看| 亚洲免费精彩视频在线观看| 国产成人免费a在线资源| 亚洲AV日韩精品久久久久| jizzjizz亚洲日本少妇| 鲁大师在线影院免费观看| 免费人成在线观看播放国产 | 亚洲国产高清在线| 在线观看亚洲免费| 16女性下面无遮挡免费| 亚洲精品无码久久久久AV麻豆| 亚洲一线产区二线产区精华| 国产区在线免费观看| 国内一级一级毛片a免费| 久久精品亚洲综合| 免费人成再在线观看网站| 日本zzzzwww大片免费| 亚洲综合伊人久久大杳蕉| 亚洲日韩AV无码一区二区三区人| 日本视频免费高清一本18| 亚洲精品成人网久久久久久| 亚洲精品123区在线观看| 毛片在线全部免费观看| 亚洲国产一级在线观看| 亚洲另类无码专区丝袜| 18级成人毛片免费观看| 国产亚洲A∨片在线观看| 国产精品亚洲专区无码唯爱网| 精品国产无限资源免费观看| 亚洲精品无码专区久久久| 免费一区二区无码视频在线播放 | 一区二区在线免费观看| 亚洲熟女乱综合一区二区| 亚洲成a人片在线观看天堂无码| 1000部拍拍拍18勿入免费凤凰福利|