Wednesday, February 27, 2013

create new user in oracle with separate datafiles and tablespace




create tablespace myatpl datafile 'D:\app\Administrator\oradata\vxmldb\myatpl01.dbf '
size 200m autoextend on next 100m maxsize unlimited;

create user myatpl identified by myatpl123 default tablespace myatpl;

grant resource,connect to myatpl

ALTER USER myatpl QUOTA unlimited ON myatpl;

Data warehouse



one example which could make this term clear, suppose a engineering student collects notes from
various sources like libaray books ,class notes, friends notes etc
and then make a perfect copy of it from which he could get the whole concept,
which will help him making the understanding of concept .

here the integration of all the notes from various sources can be thought of as data warehouse

#############################################################################################


The storage area for processed and integrated data across different sources
which can be operational data or external data
A data ware house allows its users to extract required data,for business analysis
and strategic decision making


conceptualy:A data warehouse is a home for 'second hand' data that originates
in either other corporate applications,or some data source externa;
to your comany

Formaly:A data ware house is a stand alone repositoy of information,integrated from several,
possibaly heterogeneous operational databases.



definition by Ralph Kimball :
A warehouse is a copy of transaction data specifically
structured for query and analyisis.
#######################################################################################
Chatrasal's def
dataware house is data collected from different source databases,data marts, reports,etc.
which are summarized and maintained in multidimensional form .

Saturday, February 16, 2013

mysql clustering basics





#ndbcluseter engine is coming with mysql server inside mysql cluster


#pushes data to n/w to processes called datanodes and not stores anything on mysql servers

# create table........ENGINE=NDBCluster;

# Engine NDBCluster ...does it in your n/w

# mysqlserver ------->TCP/Ip-------->Datanodes(data lives here)$$$$most imp part of mysql-cluster

# innodb tables data and myisam data is still going to mysql server

# datanodes are ndbd processes-------like mysqd processes ----one m/c can have more than one datanode i.e more than one ndbd processes

#how records of table going to be store

#new entry-----> application---->mysql server(use ndbcluster engine)----->data nodes

#magic happens in data nodes supose we having two datanodes
*************data stores redundantly
*************stores two time to make sure data is available if somethngs happens n1....>>>>>>.....<<<<<<....n2

#datanodes tell mysql server that thesese are ready

# ndbcluster engine is transactional

#many mysql servers can access the data from data nodes at same time.

#how datanodes are storing the data>>>>?????

partionaing and replicas

######################################################################################
##
#1#-----------partition 1---------->>>>>> Datanode 1(id-1)-------->>>>make replica of partion 1 to Datanode 2(id-2)
#2#
#3#
#4#
as whole it is node gooup
###
#5#-----------partition 2------->>>>>>>>>>> Datanode 2(id-2)--------->>>make replica of partion 2 to Datanode 1(id-1)
#2#
#7#
#8#
no of partions = no of datanodes
hashing mechanism
#################################################################################

if we have more than one node group remember that each gp has have data that is half of one gp and half in other

#if one partener in gp goes down other takes it responsibilty


# cluster confgiguration contains ipadress


# load is eqaly divided amongst datanodes

#when one gp goes down clustering ends




#######################$$$

NODE TYPES


1 sqlnodes ======== MYSQL SERVER

2 data nodes

3 management node ----------------holds configuration-----every other node on cluster needs it-------1st thing to be started
--------------------monitoring logs
4 API------sql nodes are API nodes but otherwise is not mandatory

Wednesday, July 11, 2012

mysql replication


#steps to do replicatio in mysql

replication of master server on slave server

step 1
configure master
must enable binary logging and also configure a unique server ID.
this can be done by setting follwing parameters in my.cnf file

[mysqld]
server-id=2
log-bin=mysql-bin

take backup of the databases or tables of which you want to set replication

create user with following command (this will be used by slave ,so rember the password and username :) )

CREATE USER 'repl'@'%' IDENTIFIED BY 'slavepass';
GRANT REPLICATION SLAVE ON *.* TO 'repl'@'%';


restart mysql by followig commmand

service mysql restart

mysql>FLUSH TABLES WITH READ LOCK;
take the follwing and write them down somewhere (you will need them later)

mysql>SHOW MASTER STATUS;

+------------------+----------+--------------+------------------+
| File | Position | Binlog_Do_DB | Binlog_Ignore_DB |
+------------------+----------+--------------+------------------+
| mysql-bin.000001 | 333 | | |
+------------------+----------+--------------+------------------+

step 2

configure slave

put following enteries in my.cnf


[mysqld]
server-id=2


export the backup which you have taken on master


restart the mysql services

on mysql prompt run following command

mysql>CHANGE MASTER TO
MASTER_HOST='192.168.163.130', ##ip of master
MASTER_USER='repl',
MASTER_PASSWORD='slavepass',
MASTER_LOG_FILE='mysql-bin.000007',
MASTER_LOG_POS=333;

mysql>start slave



its done..:)



if u want to replicate a spesific table add following in the server my.cnf

replicate-do-table=mani.abc

Sunday, July 1, 2012

mysql Installation on linux

Manualy create a text file named my.cnf with following cotents and place this in /etc


[mysqld]
datadir=/var/lib/mysql
socket=/var/lib/mysql/mysql.sock
user=mysql
# Default to using old password format for compatibility with mysql 3.x
# clients (those using the mysqlclient10 compatibility package).
old_passwords=1

[mysqld_safe]
log-error=/var/log/mysqld.log
pid-file=/var/run/mysqld/mysqld.pid


#########useradd -G {group-name} username if gp is not createed



if mysql is already install as default with centos installation then remove it

cd /var/lib/mysql
rm -rf *
rpm -qa | grep -i mysql
rpm -e





cd /var/run/

mkdir -p mysqld

chown -R mysql:mysql mysqld/

cd /tmp

chmod 777 *.rpm

rpm -Uvh *.rpm

cd /var/lib/mysql

mysql_install_db (this is require to to get the default databases with mysql i.e test and mysql)

/usr/bin/mysqld_safe & (this is required as to up the server)


tail -100f /var/log/mysqld.log (to make sure that mysqld works corectly)


service mysql status
service mysql stop

ps -ef | grep -i mysql
kill -9

ps -ef | grep -i mysql (to see the id of mysql)

service mysql restart

rpm -qa |grep -i mysql (to sse all the installed rpms)

Monday, May 24, 2010

Saturday, December 5, 2009

HAPPY BIRTHDAY ANGEL



Angel ! Today is your birthday

Wishing you a happy happy birthday,
U Always remains happy!
that is my heartily pray .

I m thankful to your mother ,
Who gave you the birth,
I m grateful to the lord,
who send you to the earth.

Balloons of happiness,
with the air of smiles,
proceed towards your destination,
with hyper linked miles.

Flowers of ambitions ,
with fragrance of nub,
spread it all around ,
with the sprinkling hub.

Gifts of friendship,
with the company of God,
fulfil your desires ,
with a travel on caching road.

Blessings of parents ,
with the spring of relations,
live for your wisdom,
with a make of fragmented fusions.

Cake of success,
with the sweetness of nature,
Add a delicious taste ,
with a open source future.

Decorations of the day,
with the friendly hope,
A wish from “Mani ” for “Khushi”,
that her glory may always stays on the top.

HAPPY BIRTHDAY ANGEL !