centos 共享文件夹及oracle的表变量

1.centos 无密码共享文件夹

(1) 安装samba

yum -y install samba samba-client

(2)修改配置文件

vim  /etc/samba/smb.conf

 

# See smb.conf.example for a more detailed config file or
# read the smb.conf manpage.
# Run 'testparm' to verify the config is correct after
# you modified it.

[global]
	workgroup = SAMBA
	security = user
	passdb backend = tdbsam
    map to guest = Bad User
	printing = cups
	printcap name = cups
	load printers = yes
	cups options = raw
[homes]
	comment = Home Directories
	valid users = %S, %D%w%S
	browseable = No
	read only = No
	inherit acls = Yes

[printers]
	comment = All Printers
	path = /var/tmp
	printable = Yes
	create mask = 0600
	browseable = No

[print$]
	comment = Printer Drivers
	path = /var/lib/samba/drivers
	write list = @printadmin root
	force group = @printadmin
	create mask = 0664
	directory mask = 0775
[rpt]
   path = /rpt_data
   comment = temp Directories
   writable = yes
   browseable = yes
   guest ok = yes

rpt是我添加的要共享的配置信息,samba v4.1.1版本不支持share和server,当security设置为
user后需要加一行map to guest = Bad User才能允许无密码访问。

(3)开放端口

firewall-cmd --permanent --add-port=139/tcp
firewall-cmd --permanent --add-port=445/tcp
systemctl restart firewalld #(重启防火墙)

关闭SELinux  vi  /etc/selinux/config

将SELINUX=enforcing改为SELINUX=disabled

(4)重启服务

#重启smb和nmb服务
systemctl restart smb
systemctl restart nmb

在Windows系统上按下“win+r”键,输入"\\共享文件夹的IP地址"

2.oracle的表变量

表变量的定义

type temp_table is table of RPT_SALSES_FGS_DAILY_temp%rowtype
index by binary_integer;
temp_fgs temp_table;

 

表变量的赋值

select  *  bulk collect  into temp_fgs from  fgs_xc 

将表变量的值插入到RPT_SALSES_FGS_DAILY_temp表中,并且temp_fgs 字段与RPT_SALSES_FGS_DAILY_temp字段相对应

 for i in 1..temp_fgs.COUNT loop
      INSERT INTO RPT_SALSES_FGS_DAILY_temp VALUES temp_fgs (i);
   end loop;

 

 

 

  • 3
    点赞
  • 5
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值