欢迎来到天天文库
浏览记录
ID:49614706
大小:27.66 KB
页数:7页
时间:2020-03-02
《(一)数据库对象.doc》由会员上传分享,免费在线阅读,更多相关内容在行业资料-天天文库。
1、GPDB管理员笔记(一)数据库对象分类:Greenplum2014-03-1013:251363人阅读评论(0)收藏举报数据库databasegreenplum数据库对象管理1、创建数据库createdatabasenew_dbname; createdb-hlocalhost-p5432mydb2、克隆数据库 3、查看数据libo=#l Listofdatabases Name
2、 Owner
3、Encoding
4、 Accessprivileges -----------+---------+----------+---------
5、------------libo
6、gpadmin
7、UTF8
8、postgres
9、gpadmin
10、UTF8
11、template0
12、gpadmin
13、UTF8
14、=c/gpadmin :gpadmin=CTc/gpadmintemplate1
15、gpadmin
16、UTF8
17、=c/gpadmin :gpadmin=CTc/gpadmin(4rows)select*frompg_database;4、
18、数据库属性变更libo=#alterdatabaseliboownertolibo;ALTERDATABASElibo=#l Listofdatabases Name
19、 Owner
20、Encoding
21、 Accessprivileges -----------+---------+----------+---------------------libo
22、libo
23、UTF8
24、postgres
25、gpadmin
26、UTF8
27、template0
28、gpadmin
29、UTF8
30、=c/gpadmin
31、 :gpadmin=CTc/gpadmintemplate1
32、gpadmin
33、UTF8
34、=c/gpadmin :gpadmin=CTc/gpadmin(4rows)5、使用gpfilespace创建文件系统[gpadmin@mdw~]$ gpfilespace-ogpfilespace_config20140303:10:43:03:012223gpfilespace:mdw:gpadmin-[INFO]:-Atablespace
35、requiresafilesystemlocationtostoreitsdatabasefiles.AfilespaceisacollectionoffilesystemlocationsforallcomponentsinaGreenplumsystem(primarysegment,mirrorsegmentandmasterinstances).Onceafilespaceiscreated,itcanbeusedbyoneormoretablespaces.20140303:10:43:03:012223gpfilespace:mdw:gpadmin-[INFO]:-
36、gettingconfigEnteranameforthisfilespace>libodiskCheckingyourconfiguration:Yoursystemhas2hostswith2primaryand2mirrorsegmentsperhost.Yoursystemhas1hostswith0primaryand0mirrorsegmentsperhost.Configuringhosts:[sdw2,sdw1]Pleasespecify2locationsfortheprimarysegments,oneperline:primarylocation1>/ho
37、me/gpadmin/GPDB/data/d1[Error]sdw2:/home/gpadmin/GPDB/data/d1/gpseg2-Directoryconflictswithexistingdatadirprimarylocation1>/home/gpadmin/GPDB/data/d1[Error]sdw2:/home/gpadmin/GPDB/data/d1/gpseg2-Directoryconflictswithexistingdatadirprimarylocation1
此文档下载收益归作者所有