Trust yourself. You know more than you think you do. -- BENJAMIN SPOCK
Saturday, February 27, 2010
Friday, February 26, 2010
Connection strings for Oracle
.NET Framework Data Provider for Oracle
Type: .NET Framework Class Library
Usage: System.Data.OracleClient.OracleConnection
Usage: System.Data.OracleClient.OracleConnection
Manufacturer: Microsoft
More info about this class library »
More info about this class library »
Data Source=MyOracleDB;Integrated Security=yes;
This one works only with Oracle 8i release 3 or later
Specifying username and password
Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;Integrated Security=no;
This one works only with Oracle 8i release 3 or later
Omiting tnsnames.ora
This is another type of Oracle connection string that doesn't rely on you to have a DSN for the connection. You create a connection string based on the format used in the tnsnames.ora file without the need to actually have one of these files on the client pc.
SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));uid=myUsername;pwd=myPassword;
Some reported problems with the one above and Visual Studio. Use the next one if you've encountered problems.
Data Source=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP)(HOST=MyHost)(PORT=MyPort))(CONNECT_DATA=(SERVICE_NAME=MyOracleSID)));User Id=myUsername;Password=myPassword;
Using Connection Pooling
The connection pooling service will create a new pool if it can't find any existing pool that exactly match the new connections connection string properties. If there is a matching pool a connection will be recycled from that pool.
Data Source=myOracleDB;User Id=myUsername;Password=myPassword;Min Pool Size=10;Connection Lifetime=120;Connection Timeout=60;Incr Pool Size=5;Decr Pool Size=2;
The first connection opened creates the connection pool. The service initially creates the number of connections defined by the Min Pool Size parameter.
The Incr Pool Size attribute defines the number of new connections to be created by the connection pooling service when more connections are needed.
When a connection is closed, the connection pooling service determines whether the connection lifetime has exceeded the value of the Connection Lifetime attribute. If so, the connection is closed; otherwise, the connection goes back to the connection pool.
The connection pooling service closes unused connections every 3 minutes. The Decr Pool Size attribute specifies the maximum number of connections that can be closed every 3 minutes.
The Incr Pool Size attribute defines the number of new connections to be created by the connection pooling service when more connections are needed.
When a connection is closed, the connection pooling service determines whether the connection lifetime has exceeded the value of the Connection Lifetime attribute. If so, the connection is closed; otherwise, the connection goes back to the connection pool.
The connection pooling service closes unused connections every 3 minutes. The Decr Pool Size attribute specifies the maximum number of connections that can be closed every 3 minutes.
Windows Authentication
Data Source=myOracleDB;User Id=/;
Privileged Connection
With SYSDBA privileges
Data Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSDBA;
Privileged Connection
With SYSOPER privileges
Data Source=myOracleDB;User Id=SYS;Password=SYS;DBA Privilege=SYSOPER;
Utilizing the Password Expiration functionality
First open a connection with a connection string. When the connection is opened, an error is raised because the password have expired. Catch the error and execute the OpenWithNewPassword command supplying the new password.
Data Source=myOracleDB;User Id=myUsername;Password=myPassword;
oConn.OpenWithNewPassword(sTheNewPassword);
oConn.OpenWithNewPassword(sTheNewPassword);
Proxy Authentication
Data Source=myOracleDB;User Id=myUsername;Password=myPassword;Proxy User Id=pUserId;Proxy Password=pPassword;
dotConnect for Oracle
Type: .NET Framework Class Library
Usage: Devart.Data.Oracle.OracleConnection
Usage: Devart.Data.Oracle.OracleConnection
Manufacturer: Devart
More info about this class library »
More info about this class library »
Standard
User ID=myUsername;Password=myPassword;Host=ora;Pooling=true;Min Pool Size=0;Max Pool Size=100;Connection Lifetime=0;
Microsoft OLE DB Provider for Oracle
Type: OLE DB Provider
Usage: Provider=msdaora
Usage: Provider=msdaora
Manufacturer: Microsoft
More info about this provider »
More info about this provider »
Standard security
This connection string uses a provider from Microsoft.
Provider=msdaora;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
Trusted connection
Provider=msdaora;Data Source=MyOracleDB;Persist Security Info=False;Integrated Security=Yes;
Oracle Provider for OLE DB
Type: OLE DB Provider
Usage: Provider=OraOLEDB.Oracle
Usage: Provider=OraOLEDB.Oracle
Manufacturer: Oracle
More info about this provider »
More info about this provider »
Standard Security
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;
Trusted Connection
This one specifies OS authentication to be used when connecting to an Oracle database.
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;OSAuthent=1;
Oracle XE, VB6 ADO
Provider=OraOLEDB.Oracle;dbq=localhost:1521/XE;Database=myDataBase;User Id=myUsername;Password=myPassword;
Oracle XE, C++ ADO
Provider=OraOLEDB.Oracle;Data Source=localhost:1521/XE;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;
TNS-less connection string
Provider=OraOLEDB.Oracle;Data Source=(DESCRIPTION=(CID=GTU_APP)(ADDRESS_LIST=(ADDRESS=(PROTOCOL=TCP)(HOST=myHost)(PORT=myPort)))(CONNECT_DATA=(SID=MyOracleSID)(SERVER=DEDICATED)));User Id=myUsername;Password=myPassword;
Controling rowset cache mechanism
Specifies the type of caching used by the provider to store rowset data. OraOLEDB provides two caching mechanisms; File and Memory.
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;CacheType=File;
Memory is the default value. All the rowset data is stored in-memory which provides better performance at the expense of higher memory utilization.
File = All the rowset data is stored on disk. This caching mechanism limits the memory consumption at the expense of performance.
File = All the rowset data is stored on disk. This caching mechanism limits the memory consumption at the expense of performance.
Controling the fetchsize
This one specifies the number of rows the provider will fetch at a time (fetch array).
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;FetchSize=200;
The FetchSize value must be set appropriately depending on the data size and the response time of the network. If the value is set too high, this could result in more wait time during the execution of the query. If the value is set too low, this could result in many more round trips to the database. Valid values are 1 to 429,496,296. The default is 100.
Controling the chunksize
This one specifies the size, in bytes, of the data in LONG and LONG RAW columns fetched and stored in the provider cache.
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;ChunkSize=200;
Providing a high value for this attribute improves performance, but requires more memory to store the data in the rowset. Valid values are 1 to 65535. The default is 100.
Using with Microsofts OLE DB .NET Data Provider
The Microsoft OLE DB .NET Data Provider can utilize OraOLEDB as the OLE DB Provider for accessing Oracle. However this must be enabled in the connection string.
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;OLEDB.NET=True;
The OLEDB.NET connection string attribute must not be used in ADO applications.
Using OraOLEDB Custom Properties with Microsofts OLE DB .NET Data Provider
The SPPrmsLOB and NDatatype properties can only be set as connection string attributes when OraOLEDB is used by OLE DB .NET Data Provider.
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;OLEDB.NET=True;SPPrmsLOB=False;NDatatype=False;SPPrmsLOB=False;
Using ADO, these properties would have been set as a property on the command. This is not possible if using the Microsofts OLE DB .NET Data Provider. So the properties are specified in the connection string instead.
PLSQLRSet: If the stored procedure, provided by the consumer, returns a rowset, PLSQLRSet must be set to TRUE (enabled).
NDatatype: This property allows the consumers to specify whether any of the parameters bound to the command are of Oracle's N datatypes (NCHAR, NVARCHAR or NCLOB). This information is required by OraOLEDB to detect and bind the parameters appropriately. This property should not be set for commands executing SELECT statements. However, this property must be set for all other SQLs such as INSERT, UPDATE, and DELETE.
SPPrmsLOB: This property allows the consumer to specify whether one or more of the parameters bound to the stored procedures are of Oracle's LOB datatype (CLOB, BLOB, or NCLOB). OraOLEDB requires this property to be set to TRUE, in order to fetch the parameter list of the stored procedure prior to execution. The use of this property limits the processing overhead to stored procedures having one or more LOB datatype parameters.
PLSQLRSet: If the stored procedure, provided by the consumer, returns a rowset, PLSQLRSet must be set to TRUE (enabled).
NDatatype: This property allows the consumers to specify whether any of the parameters bound to the command are of Oracle's N datatypes (NCHAR, NVARCHAR or NCLOB). This information is required by OraOLEDB to detect and bind the parameters appropriately. This property should not be set for commands executing SELECT statements. However, this property must be set for all other SQLs such as INSERT, UPDATE, and DELETE.
SPPrmsLOB: This property allows the consumer to specify whether one or more of the parameters bound to the stored procedures are of Oracle's LOB datatype (CLOB, BLOB, or NCLOB). OraOLEDB requires this property to be set to TRUE, in order to fetch the parameter list of the stored procedure prior to execution. The use of this property limits the processing overhead to stored procedures having one or more LOB datatype parameters.
Using distributed transactions
This one specifies sessions to enlist in distributed transactions. This is the default behaviour.
Provider=OraOLEDB.Oracle;Data Source=MyOracleDB;User Id=myUsername;Password=myPassword;DistribTX=1;
Valid values are 0 (disabled) and 1 (enabled).
Thursday, February 25, 2010
I'd like to bat another full 50 overs - Tendulkar
I'd like to bat another full 50 overs - तेंदुलकर
source Cricinfo staff
February 24, 2010
| ||
Sachin Tendulkar, who broke the record for the highest individual ODI score, overtaking Saeed Anwar and Charles Coventry on his way to the format's first double-hundred, has said his ability to bat the entire 50 overs was a testament to his fitness after having played the game for more than 20 years.
"It feels good that I lasted for 50 overs, a good test of my fitness. I'd like to bat another 50 overs at some stage and see that the fitness level doesn't drop," Tendulkar said after his effort helped India take a unassailable 2-0 lead in the series. "The ball was coming onto the bat and I was striking the ball well. So when everything falls into its place, it feels nice. It was one of the innings where I felt I was moving well. Since I was timing the ball well, I could be more aggressive and put pressure on the bowlers."
Tendulkar, while dedicating his feat to the people of India, credited coach Gary Kirsten for the team's success in both forms of the game after the debacle in the World Cup in the Caribbean. "I've enjoyed various challenges; after the 2007 World Cup things have looked different and I'm enjoying the game," he said. "The credit also goes to Gary [Kirsten], he has really held the team beautifully. It's about togetherness and playing for each other. You see during the practice sessions that Gary himself trains as hard as anyone else, or probably harder than anyone else as he's the one giving us practice all the time."
Tendulkar said he sensed an opportunity to break the record and reach a double-century when he had gone past 175 in the 42nd over. The record eventually came in the 46th over, and the 200 in the 50th. "When I was near 175-180, I thought I could get a 200 as there were quite a few overs left," he said. He added that he would prefer his achievement to be upstaged by an Indian. "I don't play for records, I play for enjoyment and play with lots of passion. That's how cricket started. I didn't start playing cricket to break all the records; it's happened along the way. The dream was to play for India and do my best.
"I don't think any record is unbreakable. Records are made to be broken. I hope that if this record is broken, it's done by an Indian."
Wednesday, February 24, 2010
Sachin Tendulkar - Quotes
Sachin Tendulkar QUOTES / QUOTATIONS |
---|
source :: http://www.icelebz.com/quotes/sachin_tendulkar/ And that is the reason why this victory is great, because different players have made contributions to the win. Quotation of Sachin Tendulkar |
At least with me, the match starts much, much earlier than the actual match. Quotation of Sachin Tendulkar |
Beating Pakistan is always special because they are a tough team and we have a bit if a history regarding Pakistan. Quotation of Sachin Tendulkar |
Before coming here I had a minor back problem and I thought whenever I play Pakistan I get a back problem. Quotation of Sachin Tendulkar |
But eventually it is a game of cricket. Quotation of Sachin Tendulkar |
But it is not fair to blame a particular individual in a team comprising 11 members. Quotation of Sachin Tendulkar |
Every individual has his own style, his own way of presenting himself on and off the field. Quotation of Sachin Tendulkar |
From the spinners, Anil and I have been together for a long time and I respect him a lot. Quotation of Sachin Tendulkar |
I always had a dream to play for India but I never let it put pressure on me. Quotation of Sachin Tendulkar |
I am not thinking too far ahead, just want to take it one thing at a time. Quotation of Sachin Tendulkar |
I believe every era has its significance and the same holds true for players and coaches. Quotation of Sachin Tendulkar |
I didn't want to prove a point, cause bowlers always want to make a statement and my job is to go out and score runs for India. Quotation of Sachin Tendulkar |
I feel when somebody has been playing cricket for a long time, he creates a separate identity for himself. Quotation of Sachin Tendulkar |
I find it difficult to sleep even after all these years because my mind is constantly working and that is the way I have always prepared. Quotation of Sachin Tendulkar |
I hate losing and cricket being my first love, once I enter the ground it's a different zone altogether and that hunger for winning is always there. Quotation of Sachin Tendulkar |
I have never believed in comparisons, whether they are about different eras, players or coaches. Quotation of Sachin Tendulkar |
I have never thought where I will go, or forced any targets on myself. Quotation of Sachin Tendulkar |
I have never tried to compare myself to anyone else. Quotation of Sachin Tendulkar |
I have played for 15 years and it has been a dream. Quotation of Sachin Tendulkar |
I just keep it simple. Watch the ball and play it on merit. Quotation of Sachin Tendulkar |
I just want to continue the way I am going. Quotation of Sachin Tendulkar |
I myself want to learn to play the guitar because I just love music and I want to learn to play at least one good musical instrument. Quotation of Sachin Tendulkar |
I never played with a runner in my entire life, even in schools, because only I know where the ball is going and how hard, when I hit the ball, something my runner will never know about. Quotation of Sachin Tendulkar |
I want to give my six hours of serious cricket on the ground and then take whatever the result. Quotation of Sachin Tendulkar |
If one man is representing India in cricket, then yes, blame that person when things go wrong. Quotation of Sachin Tendulkar |
Imran Khan did not become Imran Khan overnight. He worked hard to become a legend. Quotation of Sachin Tendulkar |
Isn't cricket supposed to be a team sport? I feel people should decide first whether cricket is a team game or an individual sport. Quotation of Sachin Tendulkar |
It doesn't always happen according to the way you have planned things out but I feel if you have covered most of the aspects, it does help out there in the middle. Quotation of Sachin Tendulkar |
It has been very good here, but the World Cup game was different. It had a different significance to it. Quotation of Sachin Tendulkar |
It is my job to make runs for the country and win. That is the job I have to do. Quotation of Sachin Tendulkar |
Lara's done very well recently and I never had any doubts about the abilities of Lara or Waugh. Quotation of Sachin Tendulkar |
Moment there is contact your sub conscious mind knows whether it's a single or more. It's that fraction of contact that matters. Quotation of Sachin Tendulkar |
My first strategy was not to give any wickets in first five to six overs because first 10 overs were important. Quotation of Sachin Tendulkar |
My point of view is that when I am playing cricket I cannot think that this game is less or more important. Quotation of Sachin Tendulkar |
New Zealand's Daniel Vettori is a very good bowler. Quotation of Sachin Tendulkar |
Obviously after such a long gap, one itches to get back to the game and score big runs. Quotation of Sachin Tendulkar |
Shoaib Akhtar has been playing for 5, 6 years and is an experienced bowler. Quotation of Sachin Tendulkar |
The Australian tour was good for us; it was ideal preparation for us. Quotation of Sachin Tendulkar |
There are a few players who don't like to think about the game. Quotation of Sachin Tendulkar |
Wasim and Waqar were amazing bowlers. I would put them right up there with the best in the world. Quotation of Sachin Tendulkar |
When I was 15, I started playing first class cricket and always dreamt of being a Test cricketer, wanted to do something for the country, married in 1995, have 2 kids it's been great. Quotation of Sachin Tendulkar |
When there is time to think about cricket, I think but when there is time to be with family, I try to do justice to that aspect of my life as well. Quotation of Sachin Tendulkar |
Subscribe to:
Posts (Atom)