You are viewing apoorvs

Previous 10

Sep. 2nd, 2009

with battery, child, sleepy, childhood

The accidental DBA

Posted via email from apoorvs's posterous

with battery, child, sleepy, childhood

FriendFeed IM down

Posted via email from apoorvs's posterous

Aug. 31st, 2009

with battery, child, sleepy, childhood

Truck parked partly on pavement

I captured this en-route to work a few weeks ago

Posted via email from apoorvs's posterous

Sep. 15th, 2008

with battery, child, sleepy, childhood

Cool tip: finding all FKs to disable them for a bulk load

SELECT

C,C,KCU,C2,C2,C2,KCU2,RC,RC,C,C2

C.TABLE_CATALOG [PKTABLE_QUALIFIER], .TABLE_SCHEMA [PKTABLE_OWNER], .TABLE_NAME [PKTABLE_NAME], .COLUMN_NAME [PKCOLUMN_NAME], .TABLE_CATALOG [FKTABLE_QUALIFIER], .TABLE_SCHEMA [FKTABLE_OWNER], .TABLE_NAME [FKTABLE_NAME], .COLUMN_NAME [FKCOLUMN_NAME], .UPDATE_RULE, .DELETE_RULE, .CONSTRAINT_NAME [FK_NAME], .CONSTRAINT_NAME [PK_NAME], CAST(7 AS SMALLINT) [DEFERRABILITY]

FROM

 INFORMATION_SCHEMA

.TABLE_CONSTRAINTS C INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU ON C.CONSTRAINT_SCHEMA = KCU.CONSTRAINT_SCHEMA AND C.CONSTRAINT_NAME = KCU.CONSTRAINT_NAME INNER JOIN INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS RC ON C.CONSTRAINT_SCHEMA = RC.CONSTRAINT_SCHEMA AND C.CONSTRAINT_NAME = RC.CONSTRAINT_NAME INNER JOIN INFORMATION_SCHEMA.TABLE_CONSTRAINTS C2 ON RC.UNIQUE_CONSTRAINT_SCHEMA = C2.CONSTRAINT_SCHEMA AND RC.UNIQUE_CONSTRAINT_NAME = C2.CONSTRAINT_NAME INNER JOIN INFORMATION_SCHEMA.KEY_COLUMN_USAGE KCU2 ON C2.CONSTRAINT_SCHEMA = KCU2.CONSTRAINT_SCHEMA AND C2.CONSTRAINT_NAME = KCU2.CONSTRAINT_NAME AND KCU.ORDINAL_POSITION = KCU2.ORDINAL_POSITION

WHERE

C.CONSTRAINT_TYPE = 'FOREIGN KEY'

from: http://www.mssqltips.com/tip.asp?tip=1151
with battery, child, sleepy, childhood

No schema compare!





Also, https://connect.microsoft.com/VisualStudio/feedback/ViewFeedback.aspx?FeedbackID=365718

Oct. 20th, 2007

with battery, child, sleepy, childhood

Trying CouchDB: Day 1

http://localhost:8888/$utils/peek.html

Create DB: A database must be named with all lowercase characters (a-z), digits (0-9), or any of these characters `_$()+-/` and must end with a slash in the URL.

1> [info] [<0.152.0>] HTTP Request: PUT /try1/ HTTP/1.1
Header:[{"cache-control","no-cache"},
        {"connection","Keep-Alive"},
        {"content-length","0"},
        {"host","localhost:8888"},
        {"user-agent",
         "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0
.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; MS-RTC LM 8)"},
        {"accept-encoding","gzip, deflate"},
        {"ua-cpu","x86"},
        {"referer","http://localhost:8888/$utils/peek.html"},
        {"accept-language","en-us"},
        {"accept","*/*"}]
1> [info] [<0.152.0>] HTTP Response Code:201

Create document:

1> [info] [<0.165.0>] HTTP Request: POST /try1/ HTTP/1.1
Header:[{"cache-control","no-cache"},
        {"connection","Keep-Alive"},
        {"content-length","142"},
        {"host","localhost:8888"},
        {"user-agent",
         "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0
.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; MS-RTC LM 8)"},
        {"accept-encoding","gzip, deflate"},
        {"ua-cpu","x86"},
        {"content-type","text/xml; charset=UTF-8"},
        {"referer","http://localhost:8888/$utils/peek.html"},
        {"accept-language","en-us"},
        {"accept","*/*"}]
1> [info] [<0.165.0>] HTTP Response Code:201

  <?xml version="1.0" ?>
- <doc id="60CF2C862F0EB074646574E28DD71919" rev="D4BA5040" xmlns="http://couchdb.org/doc">
- <field name="FirstName">
  <text>Apoorv</text>
  </field>
- <field name="LastName">
  <text>Shrivastava</text>
  </field>
  </doc>

Create table:

/* Tables are just special documents, but don't forget to give them unique names! */

* Set the table statement. You can use the fabric language for that.
     * Note that every field has to start with $table_ !
     */
select statement: select *

Oops!

  <?xml version="1.0" ?>
- <doc id="1" rev="F2CD1E07" xmlns="http://couchdb.org/doc">
- <field name="$table_$table_1">
  <text>select *</text>
  </field>
  </doc>

now:

Table id : 60CF2C862F0EB074646574E28DD71919
Table name : keeda_tablewithidsameasanotherexistingdocument
Select Statement : select *

1> [info] [<0.214.0>] HTTP Request: POST /try1/ HTTP/1.1
Header:[{"cache-control","no-cache"},
        {"connection","Keep-Alive"},
        {"content-length","171"},
        {"host","localhost:8888"},
        {"user-agent",
         "Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 6.0; SLCC1; .NET CLR 2.0
.50727; .NET CLR 3.0.04506; .NET CLR 1.1.4322; MS-RTC LM 8)"},
        {"accept-encoding","gzip, deflate"},
        {"ua-cpu","x86"},
        {"content-type","text/xml; charset=UTF-8"},
        {"referer","http://localhost:8888/$utils/peek.html"},
        {"accept-language","en-us"},
        {"accept","*/*"}]
1> [info] [<0.214.0>] -HTTP Error-
        Response Code: 409.
        Error id: conflict
        Error message: conflict
1> [info] [<0.214.0>] HTTP Response Code:409

Oct. 1st, 2007

with battery, child, sleepy, childhood

Haiku Operating System

 

Haiku Operating System rocks! Absolutely!!

Always wanted to try the BeOS ... read a lot, couldn't touch it. Great work!

with battery, child, sleepy, childhood

Interesting timeline

 

Share This : Timeline — Google, Yahoo!, Microsoft, & Amazon

Sep. 20th, 2007

with battery, child, sleepy, childhood

Orkut's new limit on album size

OrkutNewAlbumSize 

Orkut has increase the maximum number of photos in an album from 12 to 25.

Sep. 10th, 2007

with battery, child, sleepy, childhood

Looks like Mariners can only win over the Tigers!

Mariners score 13 runs in first 4 innings against Tigers and cruise to 14-7 win

Previous 10

with battery, child, sleepy, childhood

September 2009

S M T W T F S
  12345
6789101112
13141516171819
20212223242526
27282930   

Syndicate

RSS Atom
Powered by LiveJournal.com