Ò׽ؽØͼÈí¼þ¡¢µ¥Îļþ¡¢Ãâ°²×°¡¢´¿ÂÌÉ«¡¢½ö160KB

ͨ¹ýSAS fastload Mysql table µ½ Teradata

/*clear fastload tables*/
%let gdw_dir =( user="XXXXX" password="XXXXX" database="XXXXX" tdpid="XXXXX");
proc sql;
connect to teradata as TD &gdw_dir;
execute (drop table STG_MYSQL_lkp_verticals)
by TD;
execute (commit) by TD;
disconnect from TD;
quit;
proc sql;
connect to teradata as TD &gdw_dir;
execute (drop table append_err1)
by TD;
execute (commit) by TD;
disconnect from TD;
quit;
proc sql;
connect to teradata as TD &gdw_dir;
execute (drop table append_err2)
by TD;
execute (commit) by TD;
disconnect from TD;
quit;
proc sql;
connect to teradata as TD &gdw_dir;
execute
(
create table STG_MYSQL_lkp_verticals
(
vertical varchar(10),
category_id integer,
category_name varchar(70),
short_name varchar(70)
)primary index(vertical,category_id)
)
by TD;
execute (commit) by TD;
disconnect from TD;
quit;
/*create source data table*/
libname bu_data mysql user='XXXXX' password='XXXXX' database='XXXXX' server='XXXXX' port=XXXX;
proc sql;
create table work.lkp_verticals as
select vertical, category_id, category_name, short_name
from bu_data.lkp_verticals
;
quit;
libname TDPET teradata databASe=XXXXX user="XXXXX" pASsword="XXXXX" TDPID="XXXXX";
proc append data=work.lkp_verticals base=TDPET.STG_MYSQL_lkp_verticals
(bulkload=yes bl_log=append_err);
run;


Ïà¹ØÎĵµ£º

Ò»¸ö mysql server ÉϵÄС¼¼ÇÉ

ת×Ôhttp://www.linuxbyte.org/yi-ge-mysql-server-shang-de-xiao-ji-qiao.html
ÔÚmy.cnf µÄ mysql ¶Ë Ìí¼ÓÈçÏÂÉèÖÃ
[mysql]
#no-auto-rehash # faster start of mysql but no tab completition
prompt="(\u:mysql1@linuxbyte.org \R:\m)[\d]: "
»á²úÉúÈçÏÂЧ¹û:
root@ubuntu:/home/hew# mysql -u hew -p
Enter pass ......

php mysql_connect Óëmysql_pconnectº¯ÊýÓëʵÀý½Ì³Ì

php½Ì³Ì mysql½Ì³Ì_connect Óëmysql_pconnectº¯ÊýÓëʵÀý½Ì³Ì
mysql_connect
 mysql_connect($this->root,$this->user,$this->pass)
/*
mysql_connect ,µ¥¸ö·´ÎÊÓû§²»»áƵ·±µÄµ÷ÓÃÊý¾Ý¿â½Ì³Ì£¬Ã»±ØÒª±£³ÖÁ¬½Ó£¬¶øÇÒmysqlµÄÁ¬½ÓÊýÒ²ÊÇÓÐÏÞÖƵģ¬ ʹÓà ¼°Ê±·ÃÎʱȽÏƵ·±£¬Ò²×îºÃʹÓÃmysql_connect£¬ÕâÑùÊ¹Ó ......

MySQL´î½¨


Ò»¡¢MySQL°²×°£º
Ìí¼ÓϵͳÓû§£º
groupadd mysql (/usr/sbin/groupadd)
useradd -g mysql mysql
°²×°²½Ö裺
tar zxfv mysql-*.tar.gz(mysql-5.0.51a)
./configure --prefix=/usr/local/mysql
make
make install
cp support-files/my-medium.cnf /etc/my.cnf
cd /usr/local/mysql
bin/mysql_install_db --user ......

OracleºÍMySQLÊý¾Ý¿âµÄһЩ¼òµ¥ÃüÁî¶Ô±È

ÒÔÏÂΪOracleºÍMySQLÊý¾Ý¿âµÄһЩ¼òµ¥ÃüÁî¶Ô±È£¬¿´¿´ËüÃÇÖ®¼ä´æÔÚÄÄЩ²îÒì
¡¡¡¡SQL> select to_char(sysdate,'yyyy-mm-dd') from dual;
¡¡¡¡SQL> select to_char(sysdate,'hh24-mi-ss') from dual;
¡¡¡¡mysql> select date_format(now(),'%Y-%m-%d');
¡¡¡¡mysql> select time_format(now(),'%H-%i-%S');
¡¡¡¡ÈÕÆÚº ......

mysqlµÄжÔØÎÊÌ⣡

   ×î½üÔÚѧϰtomcat+mysql¿ª·¢web£¬ÔÚ°²×°ºÍжÔØmysqlµÄ¹ý³ÌÖÐÓöµ½ÁËһЩÎÊÌ⣬ÕÛÌÚÁËÎҺü¸Ìì¡£ÔÚÕâÀï¸ø´ó¼Ò½ÌÒ»ÏÂÍêÕûµÄжÔØmysqlµÄ¹ý³Ì¡£
    ÓÐʱºò֮ǰ°²×°¹ýmysqlжÔغóÓÖÖØа²×°µÄ¹ý³ÌÖУ¬°²×°ºÃµÄmysql½ø²»È¥£¬ÈÃÈ˾õµÃºÜÐÄ·³£¬×Ô¼ºÒѾ­Ð¶ÔØÁË£¬ÖØÐÂ×°Á˺óΪʲô½ø²»È¥ÄØ¡·£¿£¿ Ô­ÒòÊÇ ......
© 2009 ej38.com All Rights Reserved. ¹ØÓÚE½¡ÍøÁªÏµÎÒÃÇ | Õ¾µãµØͼ | ¸ÓICP±¸09004571ºÅ