Showing posts with label database. Show all posts
Showing posts with label database. Show all posts

Wednesday, September 24, 2008

SQL Server 2005 Express: Lost the sa password

Today's development requires most people to be able to connect to multiple SQL database. Changing database environment might become a hassle. Today I have to setup a new database environment running on SQLServer Express (a local development database) , while I already have another database running. Previously I already set the database to use Mixed Mode which means I could login through Windows Authentication (the default setting a more sophisticated and manageable approach) and through the old school username and password.
For development environment in your local machine, the old school approach seems to be more reasonable. You could have your environment setup in a script, wipe it out and recreate it again without disturbing the ActiveDirectory users etc.

Because I have not been using the sa (default administrator) user for long I have forgotten it. I search the Internet and find a way to recover the password.

C:\> osql -E -S .\SQLEXPRESS
1> exec sp_password @new='nupasswd', @loginame='sa'

2> go

3> exit

C:\>

Now try to login using the username 'sa' and the 'nupasswd'.

Wednesday, July 25, 2007

What is an XA driver?

XA is a set of distributed transaction protocols defined by Open Group.
XA provide interfaces that could be used for cross platform transactions. Currently, much of the famous databases provided XA-compliant drivers. XA-compliant driver means that the transaction manager could send XA command directly to the driver.
Oops, sorry, in the world of distributed transaction, there are transaction manager and resource managers. Transaction manager coordinate the transaction, orchestrating the two-phase commit for each of the resource manager.
In JEE point of view, and transaction manager could be a type 3 JDBC driver, and the resource managers could be an XA compliant JDBC drivers, or general type 4 JDBC driver in which the type 3 JDBC driver will emulate XA command using common JDBC transaction commands.
In WebLogic console, when we setup a connection pool, usually we will be asked whether we want to assign an XA driver or just ordinary driver. XA drivers will have a significant overhead imposed into it, so make sure you only use the XA drivers when really required. It is common to have an XA-compliant version of connection pool and non-XA-compliant connection pool, both connecting to the same database, to avoid performance penalty when we don't need two-phase commit.
In my former company, we have a clustered WebLogic server installation with each of the databases have two pairs of connection pools, a non-XA and XA-compliant driver. Due to clustered environment, database connection are using RMI through JNDI lookup. For read only data, always use non-XA connection pool to increase performance.

Wednesday, March 28, 2007

Oracle Acquired Tangosol

Last year it was TimesTen and SleepyCat (BerkeleyDB).
This year it is Tangosol.
Who will be the next?

This database giant acquired Tangosol (vendor of Coherence data cache which has been used in many large financials), adding to its "Extreme Transaction Processing" initiative.

http://go.techtarget.com/r/1194471/5981609
http://www.oracle.com/tangosol/index.html