1.建立数据库连接

  1. create public database link ytlink
  2. connect to hightop identified by hightop
  3. using '(DESCRIPTION=
  4. (ADDRESS=(PROTOCOL=TCP)(HOST=192.168.2.137)(PORT=1521))
  5. (CONNECT_DATA=
  6. (SERVER = DEDICATED)(SERVICE_NAME = orcl))
  7. )';

2.跨库查询

  1. select * from police@ytlink

3.创建临时表空间

  1. create temporary tablespace POLICE_TEMP --创建临时表空间
  2. tempfile 'E:\app\Administrator\product\POLICE_TEMP.dbf'
  3. size 50m
  4. autoextend on
  5. next 50m maxsize 20480m
  6. extent management local;

4.删除表空间

  1. drop tablespace POLICE_TEMP including contents and datafiles;--删除表空间

5.创建表空间

  1. create tablespace POLICE --创建表空间
  2. logging
  3. datafile 'E:\app\Administrator\product\POLICE.dbf'
  4. size 500m
  5. autoextend on
  6. next 500m maxsize 20480m
  7. extent management local;

6.创建用户

  1. create user hightop identified by "hightop" --创建用户并制定表空间
  2. default tablespace POLICE
  3. temporary tablespace POLICE_TEMP;

7.删除用户

  1. drop user hightop cascade;--删除用户

8.用户授权

  1. grant all privileges to hightop;--给用户授予权限

9.shp上传oracle

  1. 1.shp2sdo shp文件名 表名 -i id -s 4326 -d(在shp2sdo所在路径下执行)
  2. 2.SQL> @J:\DY\表名.sql(在plsqlsql命令行执行或sqlplus下执行)
  3. 3.sqlldr 用户名/密码@实例名 表名(在安装oracle机器的dos执行)
  4. 4.SQL> execute sdo_migrate.to_current('表名','geometry字段名');
  5. 5.SQL> CREATE INDEX 索引名 ON 表名(geometry字段名) INDEXTYPE IS MDSYS.SPATIAL_INDEX;

10.空间关系计算

  1. select c.id,s.id from tlmap_village c,cameragps s where sdo_geom.relate(s.geom,'Anyinteract',c.geom,0.000001)='TRUE' --计算点在面内

11.向mdsys.cs_srs中插入crs(以3857为例):

  1. insert into mdsys.cs_srs (cs_name, srid, auth_srid, wktext, wktext3d)
  2. values (
  3. 'WGS_1984_Web_Mercator_Auxiliary_Sphere',
  4. 3857,
  5. 3857,
  6. 'PROJCS["WGS_1984_Web_Mercator_Auxiliary_Sphere",GEOGCS["GCS_WGS_1984",DATUM["D_WGS_1984",SPHEROID["WGS_1984",6378137.0,298.257223563]],PRIMEM["Greenwich",0.0],UNIT["Degree",0.0174532925199433]],PROJECTION["Mercator_Auxiliary_Sphere"],PARAMETER["False_Easting",0.0],PARAMETER["False_Northing",0.0],PARAMETER["Central_Meridian",0.0],PARAMETER["Standard_Parallel_1",0.0],PARAMETER["Auxiliary_Sphere_Type",0.0],UNIT["Meter",1.0]]',
  7. ''
  8. );

12.SDO_SRID不为NULL时,SDO_SRID必须在MDSYS.CS_SRS 表中的 SRID 列有对应的值,而且它的值必须插入USER_SDO_GEOM_METADATA视图中。

Oralce Spatial的更多相关文章

  1. oralce 10g 官方认证的操作系统版本

    oralce 10g 官方认证的操作系统版本 Operating system x86              Red Hat Enterprise Linux AS/ES 3 (Update 4 ...

  2. oracle遇到的锁异常,oralce record is locked by another user

    由于我在前不久的一次项目调试的时候,将一条数据的ID与另一条数据的ID相同了,但不知为什么没有报错,当在页面发现问题时,删除这条数据时就报错了,oralce record is locked by a ...

  3. [转]ArcIMS 中地图坐标参考设置(ArcGIS Unknown Spatial Reference)

    "ArcGIS Unknown Spatial Reference"问题: shp文件在Arcgis打开后经常因为原有坐标系无法识别而丢失信息,出现以下提示信息: "Un ...

  4. fMRI: spatial smoothing

    Source: Brain voyager support Theoretical Background Spatial smoothing means that data points are av ...

  5. AE开发实现Spatial Join Analysis

    总体网上资料不多,包括esri帮助文档都写的很简单,没有各个string参数如match_option之类的可以输入的string限制,导致在摸索中gp.Execute时报错n回. 结合网上搜集资料及 ...

  6. csc.rsp Nuget MVC/WebAPI、SignalR、Rx、Json、EntityFramework、OAuth、Spatial

    # This file contains command-line options that the C# # command line compiler (CSC) will process as ...

  7. csc.rsp Nuget MVC/WebAPI 5.0、SignalR 2.0、Rx、Json、Azure、EntityFramework、OAuth、Spatial

    # This file contains command-line options that the C# # command line compiler (CSC) will process as ...

  8. Spatial Transformer Networks(空间变换神经网络)

    Reference:Spatial Transformer Networks [Google.DeepMind]Reference:[Theano源码,基于Lasagne] 闲扯:大数据不如小数据 这 ...

  9. 【Duke-Image】Week_3 Spatial processing

    Chapter_3 Intensity Transsformations and Spatial Filtering 灰度变换与空间滤波 Intensity transformation functi ...

随机推荐

  1. 开发系统级应用不被Kill

    一.设置方法 (1) 在AndroidManifest中application根节点下,添加如下代码: android:persistent="true" (2) 将应用程序pus ...

  2. [mysql][【优化集合】mysql数据库优化集合

    三个层面: 1.系统层面 2.mysql配置参数 3.sql语句优化 =========================================================== 一.系统层 ...

  3. DOM通过ID或NAME获取值

    DOM通过ID或NAME获取值 <!DOCTYPE html> <html xmlns="http://www.w3.org/1999/xhtml"> &l ...

  4. linux环境下,接着lnmp,安装redis

    linux环境下,安装redis   操作记录: 回到家目录 cd ~查看   ls进入   lump cd lnmp1.3-fullls??? sudo  ./addons.sh //---进入后选 ...

  5. sublime 常用插件 感觉比较全了 够用了

    插件介绍 Package Control 功能:安装包管理 简介:sublime插件控制台,提供添加.删除.禁用.查找插件等功能 使用:https://sublime.wbond.net/instal ...

  6. 11.nginx upload module + python django 后台 实现视频上传与切片

    1.需求:支持视频上传并切片,支持通过m3u8文件播放 2.视频切片的上一节已经谈过,这一节主要是视频上传的处理 第一步:upload-module模块安装 -----------首先下载upload ...

  7. [USACO06NOV] Roadblocks

    https://www.luogu.org/problem/show?pid=2865 题目描述 Bessie has moved to a small farm and sometimes enjo ...

  8. 关于ng-if的理论性知识你了解多少?

    ng-if简介: ● 使用ng-if指令可以完全根据表达式的值在DOM中生成或移除一个元素.如果赋值给ng-if 的表达式的值是false,那对应的元素将会从DOM中移除,否则对应元素的一个克隆将被重 ...

  9. 【网络爬虫入门01】应用Requests和BeautifulSoup联手打造的第一条网络爬虫

    [网络爬虫入门01]应用Requests和BeautifulSoup联手打造的第一条网络爬虫 广东职业技术学院 欧浩源 2017-10-14  1.引言 在数据量爆发式增长的大数据时代,网络与用户的沟 ...

  10. MSSQL数据库 事务隔离级别

    数据库事务的隔离级别有4个,由低到高依次为Read uncommitted .Read committed .Repeatable read .Serializable ,这四个级别可以逐个解 脏读 ...