Friday, August 12, 2011

Archivelog on RAC

So good I posted it again.
http://www.toadworld.com/Newsletter/TWPIPELINESept2008/PIPESept08Oracle/tabid/450/Default.aspx

Enabling Archive Logs in a RAC Environment - (Oracle11g)
by Jeff Hunter 

Whether a single instance or clustered database, Oracle tracks (logs) all changes to database blocks in online redolog files. In an Oracle RAC environment, each instance will have its own set of online redolog files known as a thread. Each Oracle instance will use its set (group) of online redologs in a circular manner. Once an online redolog fills, Oracle moves to the next one. If the database is in "Archive Log Mode", Oracle will make a copy of the online redo log before it gets reused. A thread must contain at least two online redologs (or online redolog groups). The same holds true for a single instance configuration. The single instance must contain at least two online redologs (or online redolog groups).

The size of an online redolog file is completely independent of another intances' redolog size. Although in most configurations the size is the same, it may be different depending on the workload and backup / recovery considerations for each node. It is also worth mentioning that each instance has exclusive write access to its own online redolog files. In a correctly configured RAC environment, however, each instance can read another instance's current online redolog file to perform instance recovery if that instance was terminated abnormally. It is therefore a requirement that online redo logs be located on a shared storage device (just like the database files).

As already mentioned, Oracle writes to its online redolog files in a circular manner. When the current online redolog fills, Oracle will switch to the next one. To facilitate media recovery, Oracle allows the DBA to put the database into "Archive Log Mode" which makes a copy of the online redolog after it fills (and before it gets reused). This is a process known as archiving.

The Database Creation Assistant (DBCA) allows users to configure a new database to be in archive log mode, however most DBA's opt to bypass this option. In cases like this where the database is in no archive log mode, it is a simple task to put the database into archive log mode. Note however that this will require a short database outage. From one of the nodes in the Oracle RAC 11g configuration, use the following tasks to put a RAC enabled database into archive log mode. For the purpose of this article, I will use the node linux1 which runs the orcl1 instance:

  1. Login to one of the nodes (i.e. linux1) and disable the cluster instance parameter by setting cluster_database to FALSE from the current instance:

    $ sqlplus "/ as sysdba"
    SQL> alter system set cluster_database=false scope=spfile sid='orcl1'
    ;
  2. Shutdown all instances accessing the clustered database: 

    $ srvctl stop database -d orcl
  3. Using the local instance, MOUNT the database: 

    $ sqlplus "/ as sysdba"
    SQL> startup mount
  4. Enable archiving: 

    SQL> alter database archivelog;
  5. Re-enable support for clustering by modifying the instance parameter cluster_database to TRUE from the current instance: 

    SQL> alter system set cluster_database=true scope=spfile sid='orcl1';
  6. Shutdown the local instance: 

    SQL> shutdown immediate 
  7. Bring all instance back up using srvctl: 

    $ srvctl start database -d orcl 
  8. (Optional) Bring any services (i.e. TAF) back up using srvctl: 

    $ srvctl start service -d orcl 
  9. Login to the local instance and verify Archive Log Mode is enabled: 

    $ sqlplus "/ as sysdba"
    SQL> archive log list
    Database log mode              Archive Mode
    Automatic archival             Enabled
    Archive destination            USE_DB_RECOVERY_FILE_DEST
    Oldest online log sequence     83
    Next log sequence to archive   84
    Current log sequence           84

After enabling Archive Log Mode, each instance in the RAC configuration can automatically archive redologs!


Jeffrey Hunter graduated from Stanislaus State University in Turlock, California, with a Bachelor's degree in Computer Science. Jeff is an Oracle Certified Professional, Java Development Certified Professional, Author, and currently works as a Senior Database Administrator for The DBA Zone, Inc. His work includes advanced performance tuning, Java programming, capacity planning, database security, and physical / logical database design in a UNIX, Linux, and Windows NT environment. Jeff's other interests include mathematical encryption theory, programming language processors (compilers and interpreters) in Java and C, LDAP, writing web-based database administration tools, and of course Linux. Jeff has been a Sr. Database Administrator and Software Engineer for over 14 years and maintains his own website site at: http://www.iDevelopment.info.

Wednesday, July 20, 2011

Obama on the Debt Limit

The fact that we are here today to debate raising America’s debt limit is a sign of leadership failure. It is a sign that the U.S. Government can’t pay its own bills. It is a sign that we now depend on ongoing financial assistance from fore...ign countries to finance our Government’s reckless fiscal policies.

Over the past 5 years, our federal debt has increased by $3.5 trillion to $8.6 trillion. That is “trillion” with a “T.” That is money that we have borrowed from the Social Security trust fund, borrowed from China and Japan, borrowed from American taxpayers. And over the next 5 years, between now and 2011, the President’s budget will increase the debt by almost another $3.5 trillion.

Numbers that large are sometimes hard to understand. Some people may wonder why they matter. Here is why: This year, the Federal Government will spend $220 billion on interest. That is more money to pay interest on our national debt than we’ll spend on Medicaid and the State Children’s Health Insurance Program. That is more money to pay interest on our debt this year than we will spend on education, homeland security, transportation, and veterans benefits combined. It is more money in one year than we are likely to spend to rebuild the devastated gulf coast in a way that honors the best of America.

And the cost of our debt is one of the fastest growing expenses in the Federal budget. This rising debt is a hidden domestic enemy, robbing our cities and States of critical investments in infrastructure like bridges, ports, and levees; robbing our families and our children of critical investments in education and health care reform; robbing our seniors of the retirement and health security they have counted on.

Every dollar we pay in interest is a dollar that is not going to investment in America’s priorities.

This speech was made on the senate floor in 2006 and I completely agree. I wish other politicians, even the one who gave this speech, agreed with it too.

I think Obama even voted against raising the debt limit when he had to vote on it. Of course, there was a republican in the White House at the time. Washington was right. Political Parties will destroy this nation.

Thursday, March 17, 2011

Using Oracle for gridview functions.

I use ODP.NET for my oracle access and I've had problems using it in my Visual Studio projects, and using the built in functions with the gridview object.

1. Create a connection in the server explorer using ODP.NET for the connection.

2. In the gridview, use that connection to connect to the database. Your table must have a primary key in order for the editing functions to kick in. The primary key must be listed in the gridview.

3. You can have the steps build the update, delete sqls. You need to edit them in the source view. You need to keep the """ in the source. You cannot substitute double quotes for the "&quote;". Replace the ? of the generated strings with ":CAPPEDNAME". That is how MS tools like to pass the data and it uses the internals of oracle. That should be it.

Monday, July 19, 2010

We are now in a dictatorship.

The president now controls 70% of the economy. He can appropriate money and doesn't have to go to congress for approval on 70% of the economy.

We have entered a dictatorship. The only power we have left is at the ballot box. Ask your congressman how he will restore our freedoms or advance our freedoms. I'll leave it to you to see what the response is.

Tuesday, June 22, 2010

Is U.S. Now On Slippery Slope To Tyranny?

Is U.S. Now On Slippery Slope To Tyranny?


By THOMAS SOWELL
Posted 06/21/2010 06:13 PM ET

When Adolf Hitler was building up the Nazi movement in the 1920s, leading up to his taking power in the 1930s, he deliberately sought to activate people who did not normally pay much attention to politics.

Such people were a valuable addition to his political base, since they were particularly susceptible to Hitler's rhetoric and had far less basis for questioning his assumptions or his conclusions.

"Useful idiots" was the term supposedly coined by V.I. Lenin to describe similarly unthinking supporters of his dictatorship in the Soviet Union.

Put differently, a democracy needs informed citizens if it is to thrive, or ultimately even survive.

In our times, American democracy is being dismantled, piece by piece, before our very eyes by the current administration in Washington, and few people seem to be concerned about it.

The president's poll numbers are going down because increasing numbers of people disagree with particular policies of his, but the damage being done to the fundamental structure of this nation goes far beyond particular counterproductive policies.

Just where in the Constitution of the United States does it say that a president has the authority to extract vast sums of money from a private enterprise and distribute it as he sees fit to whomever he deems worthy of compensation? Nowhere.

And yet that is precisely what is happening with a $20 billion fund to be provided by BP to compensate people harmed by their oil spill in the Gulf of Mexico.

Many among the public and in the media may think that the issue is simply whether BP's oil spill has damaged many people, who ought to be compensated.

But our government is supposed to be "a government of laws and not of men."

If our laws and our institutions determine that BP ought to pay $20 billion — or $50 billion or $100 billion — then so be it.

But the Constitution says that private property is not to be confiscated by the government without "due process of law."

Technically, it has not been confiscated by Barack Obama, but that is a distinction without a difference.

With vastly expanded powers of government available at the discretion of politicians and bureaucrats, private individuals and organizations can be forced into accepting the imposition of powers that were never granted to the government by the Constitution.

If you believe that the end justifies the means, then you don't believe in constitutional government.

And, without constitutional government, freedom cannot endure. There will always be a "crisis" — which, as the president's chief of staff has said, cannot be allowed to "go to waste" as an opportunity to expand the government's power.

That power will of course not be confined to BP or to the particular period of crisis that gave rise to the use of that power, much less to the particular issues.

When Franklin D. Roosevelt arbitrarily took the United States off the gold standard, he cited a law passed during the First World War to prevent trading with the country's wartime enemies. But there was no war when FDR ended the gold standard's restrictions on the printing of money.

At about the same time, during the worldwide Great Depression, the German Reichstag passed a law "for the relief of the German people."

That law gave Hitler dictatorial powers that were used for things going far beyond the relief of the German people — indeed, powers that ultimately brought a rain of destruction down on the German people and on others.

If the agreement with BP was an isolated event, perhaps we might hope that it would not be a precedent. But there is nothing isolated about it.

The man appointed by President Obama to dispense BP's money as the administration sees fit, to whomever it sees fit, is only the latest in a long line of presidentially appointed "czars" controlling different parts of the economy, without even having to be confirmed by the Senate, as Cabinet members are.

Those who cannot see beyond the immediate events to the issues of arbitrary power — vs. the rule of law and the preservation of freedom — are the "useful idiots" of our time. But useful to whom?

http://www.investors.com/NewsAndAnalysis/ArticlePrint.aspx?id=537967&p=2

Tuesday, June 8, 2010

Distinct in Array List

So simple...

Public

Function RemoveALDuplicates(ByRef alList As ArrayList) As ArrayList

Dim

ret As New ArrayList

Dim iCount As Integer

For iCount = 0 To alList.Count - 1

Dim sObj As String 'or whatever the object type is

sObj = alList(iCount)

If ret.Contains(sObj) = False Then

ret.Add(sObj)

End If

Next

Return ret

Return ret
End Function

Wednesday, November 18, 2009

Distinct in datatable

This is how to do a distinct in a datatable in Visual Basic. It is derived from http://support.microsoft.com/default.aspx?scid=kb;en-us;326176#1 and also look at this definition http://weblogs.asp.net/eporter/archive/2005/02/10/370548.aspx for multiple columns / fields.

Private

Function ColumnEqual(ByRef A As Object, ByRef B As Object) As Boolean

' Compares two values to see if they are equal. Also compares DBNULL.Value.
' Note: If your DataTable contains object fields, then you must extend this
' function to handle them in a meaningful way if you intend to group on them.

If IsDBNull(A) And IsDBNull(B) Then

Return True

End If

If IsDBNull(A) Or IsDBNull(B) Then

Return False

End If

If A = B Then

Return True

End If

End Function

Public Function SelectDistinct(ByVal TableName As String, ByRef SourceTable As DataTable, ByVal FieldName As String) As DataTable

Dim dt As New DataTable(TableName)

Dim dr As DataRow

dt.Columns.Add(FieldName, SourceTable.Columns(FieldName).DataType)

Dim LastValue As Object = DBNull.Value

For Each dr In SourceTable.Select("", FieldName)

If IsDBNull(LastValue) Or Not ColumnEqual(LastValue, dr(FieldName)) Then

LastValue = dr(FieldName)

dt.Rows.Add(LastValue)

End If

Next

Return dt

End Function

Monday, November 16, 2009

What really ticks me off..

is that I like some of the things on Al-Gore TV, otherwise known as current_tv. God help me.

http://current.com/sarah-haskins/

Actually, this is the only person that I follow...and she isn't for kids. Dang it, why do the political gods do this to me?

Friday, November 6, 2009

Tyranny Again

Pelosi Breaks Pledge to Put Final Health Care Bill Online for 72 Hours Before Vote

http://www.weeklystandard.com/weblogs/TWSFP/2009/11/pelosi_breaks_pledge_to_put_he.asp

Evidently, it is too much to submit the bill to the stupid american public before the house votes to end freedom as we know it. The health plan will put our LIVES into the hands of faceless bureaucrats that take our money at the threat of imprisonment and will eventually bankrupt our country. I though Social Security would eventually do that, but it seems that we are bound to destroy our country a lot faster than that.

I have gone from loving my country and principles to hating what we have done with it.

Friday, October 30, 2009

Net Neutrality

I listen to Glenn Beck and he recently is against "Net Neutrality". I have yet to understand why conservatives are against this. The only thing I can think of is that they don't want government intrusion, which I understand, but that isn't the thrust of the situation. This has to deal with corporations stopping other competing corporations. For example, I get Netflix and I stream movies to my computer. My cable company (internet provider) is also contemplating entering into the same market. What the Net Neutrality legislation is to correct is stopping my cable company "slowing down" Netflix or "Speeding Up" their service. If Netflix becomes so slow, I would switch to the cable company's offering. This is to stop anti-competative behavior. Most cable companies are monopolies and are already regulated. Net Neutrality is to force Internet Providers to not filter datastreams and showing favoritism for any reason, other than legal ones.
 
Am I missing something here? I don't want my cable company effectively limiting my choice of where I go on the internet. I don't want a faster stream to CNN than Fox News.

Wednesday, October 28, 2009

The Speech

Ronald Reagan.

http://video.google.com/videoplay?docid=-1777069922535499977

http://www.ronaldreagan.com/sp_23.html

This is the issue of this election. Whether we believe in our capacity for self-government or whether we abandon the American Revolution and confess that a little intellectual elite in a far-distant capital can plan our lives for us better than we can plan them ourselves.

Transformers - Revenge of the Fallen

Rating:
Category:Movies
Genre: Science Fiction & Fantasy
I've only watched 20 minutes of this horror and I couldn't take it anymore. I felt myself losing IQ points. So, the shard falls (one of them, I find) and creates little robots. All is cool. They start shooting up the place. Can't the cube create nice little robots like the autobots or are they all gung-ho to kill everything? Bumblebee comes it to save the day, and all Shia can do is berate him for leaving the garage? And that girl....what an aweful performance. The script is worse than Star Wars at times without any of the redeeming qualities.

I don't know if I'll ever watch the rest.

Saturday, September 5, 2009

Krauthammer's article

I thought this article was extremely insightful.

http://www.washingtonpost.com/wp-dyn/content/article/2009/09/03/AR2009090302859_pf.html

 

By Charles Krauthammer
Friday, September 4, 2009

What happened to President Obama? His wax wings having melted, he is the man who fell to earth. What happened to bring his popularity down further than that of any new president in polling history save Gerald Ford (post-Nixon pardon)?

The conventional wisdom is that Obama made a tactical mistake by farming out his agenda to Congress and allowing himself to be pulled left by the doctrinaire liberals of the Democratic congressional leadership. But the idea of Harry Reid and Nancy Pelosi pulling Obama left is quite ridiculous. Where do you think he came from, this friend of Chávista ex-terrorist William Ayers, of PLO apologist Rashid Khalidi, of racialist inciter Jeremiah Wright?

But forget the character witnesses. Just look at Obama's behavior as president, beginning with his first address to Congress. Unbidden, unforced and unpushed by the congressional leadership, Obama gave his most deeply felt vision of America, delivering the boldest social democratic manifesto ever issued by a U.S. president. In American politics, you can't get more left than that speech and still be on the playing field.

In a center-right country, that was problem enough. Obama then compounded it by vastly misreading his mandate. He assumed it was personal. This, after winning by a mere seven points in a year of true economic catastrophe, of an extraordinarily unpopular Republican incumbent, and of a politically weak and unsteady opponent. Nonetheless, Obama imagined that, as Fouad Ajami so brilliantly observed, he had won the kind of banana-republic plebiscite that grants caudillo-like authority to remake everything in one's own image.

Accordingly, Obama unveiled his plans for a grand makeover of the American system, animating that vision by enacting measure after measure that greatly enlarged state power, government spending and national debt. Not surprisingly, these measures engendered powerful popular skepticism that burst into tea-party town-hall resistance.

Obama's reaction to that resistance made things worse. Obama fancies himself tribune of the people, spokesman for the grass roots, harbinger of a new kind of politics from below that would upset the established lobbyist special-interest order of Washington. Yet faced with protests from a real grass-roots movement, his party and his supporters called it a mob -- misinformed, misled, irrational, angry, unhinged, bordering on racist. All this while the administration was cutting backroom deals with every manner of special interest -- from drug companies to auto unions to doctors -- in which favors worth billions were quietly and opaquely exchanged.

"Get out of the way" and "don't do a lot of talking," the great bipartisan scolded opponents whom he blamed for creating the "mess" from which he is merely trying to save us. If only they could see. So with boundless confidence in his own persuasiveness, Obama undertook a summer campaign to enlighten the masses by addressing substantive objections to his reforms.

Things got worse still. With answers so slippery and implausible and, well, fishy, he began jeopardizing the most fundamental asset of any new president -- trust. You can't say that the system is totally broken and in need of radical reconstruction, but nothing will change for you; that Medicare is bankrupting the country, but $500 billion in cuts will have no effect on care; that you will expand coverage while reducing deficits -- and not inspire incredulity and mistrust. When ordinary citizens understand they are being played for fools, they bristle.

After a disastrous summer -- mistaking his mandate, believing his press, centralizing power, governing left, disdaining citizens for (of all things) organizing -- Obama is in trouble.

Let's be clear: This is a fall, not a collapse. He's not been repudiated or even defeated. He will likely regroup and pass some version of health insurance reform that will restore some of his clout and popularity.

But what has occurred -- irreversibly -- is this: He's become ordinary. The spell is broken. The charismatic conjurer of 2008 has shed his magic. He's regressed to the mean, tellingly expressed in poll numbers hovering at 50 percent.

For a man who only recently bred a cult, ordinariness is a great burden, and for his acolytes, a crushing disappointment. Obama has become a politician like others. And like other flailing presidents, he will try to salvage a cherished reform -- and his own standing -- with yet another prime-time speech.

But for the first time since election night in Grant Park, he will appear in the most unfamiliar of guises -- mere mortal, a treacherous transformation to which a man of Obama's supreme self-regard may never adapt.

Saturday, August 22, 2009

HC Monstrosity revisited.

http://blog.flecksoflife.com/2009/07/19/the-hc-monstrosity/

Enjoy the read as much as I did. Incredible that anybody even printed this, let alone have it pass committee.

Post Turtle

While suturing a cut on the hand of a 75 year old rancher, who's hand
was caught in the gate while working cattle, the doctor struck up a
conversation with the old man.. Eventually the topic got around to
Obama.

The old rancher said, 'Well, ya know, Obama is a 'Post Turtle''.
Not being familiar with the term, the doctor asked him what a 'post turtle' was.
The old rancher said, 'When you’re driving down a country road and you
come across a fence post with a turtle balanced on top, that's a 'post
turtle'.

The old rancher saw the puzzled look on the doctor's face so he
continued to explain. ‘You know he didn't get up there by himself, he
doesn't belong up there, and he doesn't know what to do while he's up
there, and you just wonder what kind of dumb ass put him up there to
begin with.’

Wednesday, August 19, 2009

Obamanomics don't fly.

A great article on our president and health care.

http://www.bloomberg.com/apps/news?pid=20601039&sid=aJ01reSCujDQ

The proliferation of Obama’s gaffes and non sequiturs on health care has exceeded the allowable limit. He has failed repeatedly to explain how the government will provide more (health care) for less (money). He has failed to explain why increased demand for medical services without a concomitant increase in supply won’t lead to rationing by government bureaucrats as opposed to the market. And he has failed to explain why a Medicare-like model is desirable when Medicare itself is going broke.

The public is left with one of two unsettling conclusions: Either the president doesn’t understand the health-insurance reform plans working their way through Congress, or he understands both the plans and the implications and is being untruthful about the impact.

Neither option is good; ignorance is clearly preferable to the alternative.

Sunday, August 16, 2009

Harry Potter and the Half Blood Prince.

Rating:★★★
Category:Movies
Genre: Science Fiction & Fantasy
Yes, there were some portions that were left out for the movie. Overall though, I wasn't that impressed with this movie. I wasn't that impressed with this book, to be quite frank. I guess a weak book makes for a weak movie.