精华内容
下载资源
问答
  • External Tools

    2019-05-01 09:25:00
    Preferences偏好设置-External Tools External Tools: External Script Editor:外部脚本编辑器,通过此项可以切换您所擅用的脚本的编辑器 Editor Script Editor Args: MonoDevelop Solution Properties:unity...

    Preferences偏好设置-External Tools

    wps1

    External Tools:

        External Script Editor:外部脚本编辑器,通过此项可以切换您所擅用的脚本的编辑器

        Editor Script Editor Args:

        MonoDevelop Solution Properties:unity应该将 MonoDevelop写入至解决方案文件(.sln)中。

        Editor Attaching:unity是否允许调用外部编辑器进行调试。

        Image Application:unity打开图片文件的默认应用程序。

        Revision Control Diff/Merge(Pro版本功能):unity是否解决与资源服务器文件中的差异。

        Android SDK Location:设置安卓SDK的存放路径, 在unity5中安

        ISO Xcode 4.X support:是否支持IOS Xcode 4.X

    安卓SDK必须为5.1以上,否则发布运行游戏会出现错误。

    JDK Location:java的jdk存放路径,在unity5中jdk版本最好是1.8以上,否则发布安卓类游戏会报错。

    外部工具

    wps2

    设置

    属性

    外部脚本编辑器

    选择Unity应该用来打开脚本文件的应用程序。Unity自动将正确的参数传递给它内置支持的脚本编辑器。Unity内置支持MonoDevelop,Xamarin Studio,Visual Studio(Visual Express)和Visual Studio Code。

    外部脚本编辑器

    选择要传递给外部脚本编辑器的参数。

    $(File)被替换为正在打开的文件的路径。

    $(Line)被替换为编辑器应跳转到的行号。

    $(ProjectPath)被替换为打开项目的路径。

    如果不在macOS上设置,则使用打开文件的默认机制。否则,仅使用参数启动外部脚本编辑器,而不尝试使用默认机制打开脚本文件。

    请参阅下面的外部脚本编辑器参数的示例。

    将.unityproj添加到.sln

    选中此框将UnityScript(.unityproj)项目添加到生成的解决方案(.sln)文件。默认情况下,这是为MonoDevelop和Xamarin Studio启用的,并且默认情况下禁用Visual Studio(Express)和Visual Studio代码。

    编辑器附加

    选中此框允许在Unity Editor中调试脚本。如果禁用此选项,则无法将脚本调试器附加到Unity以调试脚本。

    图像应用程序

    选择要让Unity用来打开图像文件的应用程序。

    修订控制差异/合并

    选择您希望Unity使用哪个应用程序来解决与Asset服务器的文件差异。

    脚本编辑器参数的示例

    gvim中/ Vim的:--remote-tab-silent +$(Line) "$File"

    的Notepad2:-g $(Line) "$(File)"

    崇高文字2:"$(File)":$(Line)

    记事本+ +:-n$(Line) "$(File)"

    External Tools 外部工具

    wps3

    External Script Editor

    外部脚本编辑器

    Which application should Unity use to open script files?

    Unity应该使用哪个应用程序来打开脚本文件?

    Editor Attaching

    编辑器附加

    Should Unity allow debugging to be controlled from the external script editor?

    Unity应该允许从外部脚本编辑器来调试控制吗?

    Image Application

    图片应用程序

    Which application should Unity use to open image files?

    Unity应该使用哪个应用程序来打开图片文件?

    Asset Server Diff Tool

    资源服务器比较工具

    Which application should Unity use to resolve file differences with the asset server?

    Unity应该使用哪个应用程序来比较资源服务器的文件异同?

    Android SDK Location

    Android SDK 位置

    Where in the filesystem is the Android SDK folder located?

    Android SDK文件夹在系统的哪个地方?

    iOS Xcode 4.x support

    iOS Xcode 4.x 支持

    Should support for Xcode 4.x be enabled for iOS build targets?

    启用支持Xcode 4.x为iOS编译目标吗?

    wps4

    设置

    属性

    外部脚本编辑器

    选择Unity应该用来打开脚本文件的应用程序。 Unity自动将正确的参数传递给它内置支持的脚本编辑器。 Unity内置支持MonoDevelop,Xamarin Studio,Visual Studio(Visual Express)和Visual Studio Code。

    外部脚本编辑器

    选择要传递给外部脚本编辑器的参数。

    $(File)被替换为一个文件被打开的路径。

    $(Line)被替换为行号的编辑器应该跳转到。

    $(ProjectPath)被替换为路径打开的项目。

    如果不在macOS上设置,则使用打开文件的默认机制。 否则,仅使用参数启动外部脚本编辑器,而不尝试使用默认机制打开脚本文件。

    有关外部脚本编辑器参数的示例,请参见下文。

    将.unityproj添加到.sln

    选中此框将UnityScript(.unityproj)项目添加到生成的解决方案(.sln)文件。 默认情况下,这是为MonoDevelop和Xamarin Studio启用的,并且默认情况下禁用Visual Studio(Express)和Visual Studio代码。

    编辑器附加

    选中此框允许在Unity Editor中调试脚本。 如果禁用此选项,则无法将脚本调试器附加到Unity以调试脚本。

    图像应用程序

    选择要让Unity用来打开图像文件的应用程序。

    修订控制差异/合并

    选择您希望Unity使用哪个应用程序来解决与Asset服务器的文件差异。

    脚本编辑器参数的示例

    gvim中/ Vim:和 --remote-tab-silent +$(Line) "$File"

    的Notepad2: -g $(Line) "$(File)"

    崇高文字2: "$(File)":$(Line)

    记事本++: -n$(Line) "$(File)"

    转载于:https://www.cnblogs.com/kubll/p/10799153.html

    展开全文
  • External sorting

    2014-06-06 14:21:14
    External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory...

    External sorting is a term for a class of sorting algorithms that can handle massive amounts of data. External sorting is required when the data being sorted do not fit into the main memory of a computing device (usually RAM) and instead they must reside in the slower external memory (usually a hard drive). External sorting typically uses a hybrid sort-merge strategy. In the sorting phase, chunks of data small enough to fit in main memory are read, sorted, and written out to a temporary file. In the merge phase, the sorted subfiles are combined into a single larger file.

    External merge sort[edit]

    One example of external sorting is the external merge sort algorithm, which sorts chunks that each fit in RAM, then merges the sorted chunks together.[1][2] For example, for sorting 900 megabytes of data using only 100 megabytes of RAM:

    1. Read 100 MB of the data in main memory and sort by some conventional method, like quicksort.
    2. Write the sorted data to disk.
    3. Repeat steps 1 and 2 until all of the data is in sorted 100 MB chunks (there are 900MB / 100MB = 9 chunks), which now need to be merged into one single output file.
    4. Read the first 10 MB (= 100MB / (9 chunks + 1)) of each sorted chunk into input buffers in main memory and allocate the remaining 10 MB for an output buffer. (In practice, it might provide better performance to make the output buffer larger and the input buffers slightly smaller.)
    5. Perform a 9-way merge and store the result in the output buffer. Whenever the output buffer fills, write it to the final sorted file and empty it. Whenever any of the 9 input buffers empties, fill it with the next 10 MB of its associated 100 MB sorted chunk until no more data from the chunk is available. This is the key step that makes external merge sort work externally -- because the merge algorithm only makes one pass sequentially through each of the chunks, each chunk does not have to be loaded completely; rather, sequential parts of the chunk can be loaded as needed.

    Additional passes[edit]

    Above example shows a two-pass sort: a sort pass followed by a merge pass. Note that we had one merge pass that merged all the chunks at once, rather than in regular merge sort, where we merge two chunks at each step, and take \log n merge passes total. The reason for this is that every merge pass requires reading and writing every value in the array from and to disk once. Disk access is usually slow, and so reads and writes should be avoided as much as possible.

    However, there is a trade-off with using fewer merge passes. As the number of chunks increases, the amount of data we can read from each chunk at a time during the merge process decreases. For sorting, say, 50 GB in 100 MB of RAM, using a single merge pass isn't efficient: the disk seeks required to fill the input buffers with data from each of the 500 chunks (we read 100MB / 501 ~ 200KB from each chunk at a time) take up most of the sort time. Using two merge passes solves the problem. Then the sorting process might look like this:

    1. Run the initial chunk-sorting pass as before.
    2. Run a first merge pass combining 25 chunks at a time, resulting in 20 larger sorted chunks.
    3. Run a second merge pass to merge the 20 larger sorted chunks.

    Like in-memory sorts, efficient external sorts require O(n log n) time: exponential increases in data size require linear increases in the number of passes. If one makes liberal use of the gigabytes of RAM provided by modern computers, the logarithmic factor grows very slowly: under reasonable assumptions, one could sort at least 500 GB of data using 1 GB of main memory before a third pass became advantageous, and could sort many times that before a fourth pass became useful.[3]

    Doubling the memory dedicated to sorting both allows the same amount of data to be sorted using half as many chunks and allows the merge phase to do half as many buffer-filling reads during the merging phase, potentially reducing the number of seeks required by about three-quarters. So, dedicating more RAM to sorting can be an effective way to increase speed if it allows reducing the number of passes, or if disk seek time accounts for a substantial part of sorting time.

    Tuning performance[edit]

    The Sort Benchmark, created by computer scientist Jim Gray, compares external sorting algorithms implemented using finely tuned hardware and software. Winning implementations use several techniques:

    • Using parallelism
      • Multiple disk drives can be used in parallel in order to improve sequential read and write speed. This can be a very cost-efficient improvement: a Sort Benchmark winner in the cost-centric Penny Sort category uses six hard drives in an otherwise midrange machine.[4]
      • Sorting software can use multiple threads, to speed up the process on modern multicore computers.
      • Software can use asynchronous I/O so that one run of data can be sorted or merged while other runs are being read from or written to disk.
      • Multiple machines connected by fast network links can each sort part of a huge dataset in parallel.[5]
    • Increasing hardware speed
      • Using more RAM for sorting can reduce the number of disk seeks and avoid the need for more passes.
      • Fast external memory, like 15K RPM disks or solid-state drives, can speed sorts (but adds substantial costs proportional to the data size).
      • Many other factors can affect hardware's maximum sorting speed: CPU speed and number of cores, RAM access latency, input/output bandwidth, disk read/write speed, disk seek time, and others. "Balancing" the hardware to minimize bottlenecks is an important part of designing an efficient sorting system.
      • Cost-efficiency as well as absolute speed can be critical, especially in cluster environments where lower node costs allow purchasing more nodes.
    • Increasing software speed
      • Some Sort Benchmark entrants use a variation on radix sort for the first phase of sorting: they separate data into one of many "bins" based on the beginning of its value. Sort Benchmark data is random and especially well-suited to this optimization.
      • Compacting the input, intermediate files, and output can reduce time spent on I/O, but is not allowed in the Sort Benchmark.
      • Because the Sort Benchmark sorts long (100-byte) records using short (10-byte) keys, sorting software sometimes rearranges the keys separately from the values to reduce memory I/O volume.

    Other algorithms[edit]

    External merge sort is not the only external sorting algorithm; there are also distribution sorts, which work by partitioning the unsorted values into smaller "buckets" that can be sorted in main memory. Likemerge sort, external distribution sort also has a main-memory sibling; see bucket sort. There is a duality, or fundamental similarity, between merge- and distribution-based algorithms that can aid in thinking about sorting and other external memory algorithms.[6] There are in-place algorithms for external sort, which require no more disk space than the original data.

    References[edit]

    1. Jump up^ Donald KnuthThe Art of Computer Programming, Volume 3:Sorting and Searching, Second Edition. Addison-Wesley, 1998,ISBN 0-201-89685-0, Section 5.4: External Sorting, pp.248–379.
    2. Jump up^ Ellis Horowitz and Sartaj SahniFundamentals of Data Structures, H. Freeman & Co., ISBN 0-7167-8042-9.
    3. Jump up^ Assume a single disk with 200 MB/s transfer, 20 ms seek time, 1 GB of buffers, 500 GB to sort. The merging phase will have 500 buffers of 2M each, need to do 250K seeks and read then write 500 GB. It will spend 5,000 sec seeking and 5,000 sec transferring. Doing two passes as described above would nearly eliminate the seek time but add an additional 5,000 sec reading and writing, so this is approximately the break-even point between a two-pass and three-pass sort.
    4. Jump up^ Nikolas Askitis, OzSort 2.0: Sorting up to 252GB for a Penny
    5. Jump up^ Rasmussen et al., TritonSort
    6. Jump up^ J. S. VitterAlgorithms and Data Structures for External Memory, Series on Foundations and Trends in Theoretical Computer Science, now Publishers, Hanover, MA, 2008, ISBN 978-1-60198-106-6.

    External links[edit]

    展开全文
  • SVN external

    2014-03-13 19:57:31
    有以下场合图1.1 图 1.1 其中Test1和Test2为两个不同的项目,但Test2中用到了Test1项目中...这个时候该怎么办呢?这就用到了SVN的external属性,external属性设置一些代码为外部链接,假如在Test2中com.test为external


    有以下场合:


    图 1.1


    图1.1中Test1和Test2为两个不同的项目,但Test2中用到了Test1项目中com.test包下的所有代码,这两个项目同步进行,Test1项目中com.test包下的代码改变后又想在Test2中同步更新或者Test2中com.test包下代码改变后又想同步到Test1中这个时候该怎么办呢?

    这就用到了SVN的external属性,external属性设置项目的部分代码为外部链接,假如在Test2中设置com.test为external属性,则Test1中代码改动后,Test2中更新后能跟Test1中代码同步,同样在Test2中改动com.test包下的代码提交后也会提交到Test1仓库中。


    具体设置如下:

    1.刚开始项目状态如下(图1.2):



    图1.2

    2.在Test2根目录下选择:TortoiseSVN->Properties(图1.3)


    图1.3

    3.打开Properties会弹出以下对话框(图1.4):依次New->New

    然后填入LocalPath和URL然后点击OK(注意如果要保持包名相同这里Local path必须是Test1项目中代码的路径(src+包))



    图1.4

    4.最后update更新一下项目Test2

    设置完成后项目状态如下:


    图1.5


    展开全文
  • External Tables

    2013-07-08 22:58:57
    官方文档地址:...external_table_clause ::= Description of the illustration external_table_clause.gif   (external_data_properti

    官方文档地址:http://docs.oracle.com/cd/B19306_01/server.102/b14200/statements_7002.htm#i2201774

    external_table_clause::=

    Description of external_table_clause.gif follows
    Description of the illustrationexternal_table_clause.gif

     

    (external_data_properties::=)

    external_data_properties::=

    Description of external_data_properties.gif follows
    Description of the illustrationexternal_data_properties.gif

    ---由上边的语法可以看出:ACCESS PARAMETERS可以省略。然而DEFAULTDIRECTORY指定文件所在的目录必须要有,还有LOCATION也一样。

     

     

     

    external_table_clause--下边是各个参数的说明

     

    Use the external_table_clause to createan external table, which is a read-only table whose metadata isstored in the database but whose data in stored outside thedatabase. Among other capabilities, external tables let you querydata without first loading it into the database.

    See Also:

    OracleData Warehousing Guide, OracleDatabase Administrator's Guide, and Oracle Database Utilities for information on the usesfor external tables

    Because external tables have no data in the database, you definethem with a small subset of the clauses normally available whencreating tables.

    • Within the relational_properties clause,you can specify only column anddatatype.

    • Within the physical_properties_clause, youcan specify only the organization of the table(ORGANIZATION EXTERNALexternal_table_clause).

    • Within the table_properties clause, you canspecify only the parallel_clause. Theparallel_clause lets youparallelize subsequent queries on the external data and subsequentoperations that populate the external table.

    • You can populate the external table at create time by using theAS subquery clause.

    No other clauses are permitted in the same CREATETABLE statement.

    See Also:

    Restrictions onExternal Tables External tables aresubject to the following restrictions:

    • An external table cannot be a temporary table.

    • You cannot specify constraints on an external table.

    • An external table cannot have object type, varray, orLONG columns. However, you can populate LOB columns ofan external table with varray or LONG data from aninternal database table.

    TYPE TYPE access_driver_type indicates theaccess driver of the external table. The access driveris the API that interprets the external data for the database.Oracle Database provides two access drivers:ORACLE_LOADER and ORACLE_DATAPUMP. If youdo not specify TYPE, then the database usesORACLE_LOADER as the default access driver. You mustspecify the ORACLE_DATAPUMP access driver if youspecify the AS subquery clause to unload datafrom one Oracle Database and reload it into the same or a differentOracle Database.

    See Also:

    Oracle Database Utilities for information about theORACLE_LOADER and ORACLE_DATAPUMP access drivers
     

    DEFAULTDIRECTORY DEFAULT DIRECTORY letsyou specify a default directory object corresponding to a directoryon the file system where the external data sources may reside. Thedefault directory can also be used by the access driver to storeauxiliary files such as error logs.

    ACCESSPARAMETERS The optional ACCESSPARAMETERS clause lets you assign values to theparameters of the specific access driver for this externaltable.

    • The opaque_format_spec lets you listthe parameters and their values. Please refer to OracleDatabase Utilities for information on how to specifyvalues for the opaque_format_spec.

      Field names specified in the opaque_format_spec must matchcolumns in the table definition. Oracle Database ignores any fieldin the opaque_format_spec that is notmatched by a column in the table definition.

    • USING CLOB subquery lets you derive theparameters and their values through a subquery. The subquery cannotcontain any set operators or an ORDER BYclause. It must return one row containing a single item of datatypeCLOB.

    Whether you specify the parameters in an opaque_format_spec or derivethem using a subquery, the database does not interpret anything inthis clause. It is up to the access driver to interpret thisinformation in the context of the external data.

     

    LOCATIONThe LOCATION clause lets you specify one or moreexternal data sources. Usually the location_specifier is a file,but it need not be. Oracle Database does not interpret this clause.It is up to the access driver to interpret this information in thecontext of the external data. You cannot use wildcards in thelocation_specifier to specifymultiple files.

     

    REJECTLIMIT The REJECT LIMITclause lets you specify how many conversion errors can occur duringa query of the external data before an Oracle Database error isreturned and the query is aborted. Thedefault value is 0.

     

     

     

     

    官方文档地址:

    http://docs.oracle.com/cd/B19306_01/server.102/b14220/schema.htm#sthref783

     

    External Tables

    External tables access data in external sources as if it were ina table in the database. You can connect to the database and createmetadata for the external table using DDL. The DDL for an externaltable consists of two parts: one part that describes the Oraclecolumn types, and another part (the access parameters) thatdescribes the mapping of the external data to the Oracle datacolumns.

    An external table does not describe any data that is stored inthe database. Nor does it describe how data is stored in theexternal source. Instead, it describes how the external table layerneeds to present the data to the server. It is the responsibilityof the access driver and the external table layer to do thenecessary transformations required on the data in the datafile sothat it matches the external table definition.

     

    External tables are read only;therefore, no DML operations are possible, and no index can becreated on them.--外部表是只读的,不能执行DML语句,在上边建索引和约束是不被允许的。

    The Access Driver

    When you create an external table,you specify its type. Each type of external table has its ownaccess driver that provides access parameters unique to that typeof external table. The access driver ensures that data from thedata source is processed so that it matches the definition of theexternal table. --外i部表的两种访问驱动功能是不相同的。

     

    In the context of external tables, loading data refersto the act of reading data from an external table and loading itinto a table in the database. Unloading data refers to the act ofreading data from a table in the database and inserting it into anexternal table.

     

     

    The default type for externaltables is ORACLE_LOADER, which lets you read tabledata from an external table and load it into a database.---ORACLE_LOADER类型。此种类型的驱动是让你从外部表里头读取数据然后加载进数据库里头。见下边例子

     

    Oracle also provides theORACLE_DATAPUMP type, which lets you unload data (thatis, read data from a table in the database and insert it into anexternal table) and then reload it into an Oracledatabase.--两种方式的区别的描述。 ORACLE_DATAPUMP类型。此种类型的驱动是让你卸载数据,既是,从数据库表中读取数据然后插入到外部表里头,然后再加载进数据库表。

    见下边例子

     

     

    The definition of an external table is kept separatelyfrom the description of the data in the data source. This meansthat:--外部表的定义(元数据)和在数据源里头的数据定义是相互独立的。

    • The source file can contain more or fewer fields thanthere are columns in the external table

    • The datatypes for fields in the data source can bedifferent from the columns in the external table

    Data Loading withExternal Tables

    The main use for external tablesis to use them as a row source for loading data into an actualtable in the database. After you create an external table, you canthen use a CREATE TABLE ASSELECT or INSERT INTO ...AS SELECT statement, using the externaltable as the source of the SELECTclause.--可以通过上述语句来将数据转移到别的地方去。

    Note:

    You cannot insert data into external tables or update records inthem; external tables are read only.

    When you access the external table through a SQL statement, thefields of the external table can be used just like any other fieldin a regular table. In particular, you can use the fields asarguments for any SQL built-in function, PL/SQL function, or Javafunction. This lets you manipulate data from the external source.For data warehousing, you can do more sophisticated transformationsin this way than you can with simple datatype conversions. You canalso use this mechanism in data warehousing to do datacleansing.

    While external tables cannot contain a column object,constructor functions can be used to build a column object fromattributes in the external table

     

    下是实际例子:--来源网上

    1、Oracle10g新特性:利用外部表卸载数据  

      今天在看Oracle的CONCEPT文档时发现,Oracle的外部表也可以用来卸载数据了。

      从10.2中开始,Oracle增加了外部表的一个新的访问驱动:ORACLE_DATAPUMP。而再次之前,只有一个默认的驱动ORACLE_LOADER。

      使用ORACLE_DATAPUMP驱动,带来的一个优点是,可以利用外部表将数据库中的数据卸载到磁盘文件中,而这是10.1及以前版本所无法做到的。

    下面看一个最简单的例子:

    SQL> CREATE TABLE T_EXTERNAL
      2 (
      3 ID,
      4 NAME
      5 )
      6 ORGANIZATION EXTERNAL
      7 (
      8 TYPE ORACLE_DATAPUMP
      9 DEFAULT DIRECTORY D_OUTPUT
      10 LOCATION('TEST.DMP')
      11 )
      12 AS SELECT ROWNUM RN, TNAME
      13 FROM TAB;

     

     表已创建。
      在这张外部表创建的同时,在D_OUTPUT所指向的操作系统目录下,生成了一个TEST.DMP二进制文件。
      显示这个二进制文件中的可显示字符:

    $ strings TEST.DMP 
      IBMPC/WIN_NT-8.1.0 
      ZHS16GBK 
      LBB EMB GHC JWD SD EBE WMF DDG JG SJH SRH JGK CL EGM BJM RAP RLP RP KR PAR MS MRS JLS CET HLT 
      10.02.00.01.00 
      T 
      1 
      0 
      3 
      0 
      ZHS16GBK 
      AL16UTF16 
      +00:00 
      YANGTK 
      T_EXTERNAL 
      1 
      0 
      ID 
      2 
      22 
      0 
      -127 
      0 
      0 
      0 
      2 
      0 
      NAME 
      1 
      30 
      0 
      0 
      852 
      1 
      30 
      T_LOG< 
      TEST_LOB< 
      T_COMPRESS< 
      T_TEMP2< 
      T_RECORD< 
      T_SESSION_STAT< 
      T_TEMP< 
      T_NO_EXISTS_BEFORE< 
      T_CHAR< 
      SYS_EXPORT_SCHEMA_01< 
      T_EXTERNAL< 
      T_LOAD_SPACE< 
      T_LEVEL< 
      T_LEVEL1< 
      CHAINED_ROWS< 
      T_TREE  

     这个二进制文件可以用于在其他数据库中创建外部表:

    SQL> CREATE TABLE T_EXTERNAL
      2 (
      3 ID NUMBER,
      4 NAME VARCHAR2(30)
      5 )
      6 ORGANIZATION EXTERNAL
      7 (
      8 TYPE ORACLE_DATAPUMP
      9 DEFAULT DIRECTORY D_OUTPUT
      10 LOCATION('TEST.DMP')
      11 );

    表已创建。

    SQL> SELECT * FROM T_EXTERNAL;
      ID NAME
      ---------- ------------------------------
      1 T_LOG
      2 TEST_LOB
      3 T_COMPRESS
      4 T_TEMP2
      5 T_RECORD
      6 T_SESSION_STAT
      7 T_TEMP
      8 T
      9 T_NO_EXISTS_BEFORE
      10 T_CHAR
      11 SYS_EXPORT_SCHEMA_01
      12 T_EXTERNAL
      13 T_LOAD_SPACE
      14 T_LEVEL
      15 T_LEVEL1
      16 CHAINED_ROWS
      17 T_TREE

    已选择17行。

      唯一可惜的是Oracle只能将数据写为二进制格式,因此可以考虑使用这种方法进行数据迁移或发布。不过想利用这种方法来生成文本报表也是行不通的。

      最后提一下,外部表是只读表,可以利用外部表卸载数据,不过必须在建表时完成,一旦表建立成功,外部表就变成不可修改了。

     

    SQL> INSERT INTO T_EXTERNAL VALUES (100, 'A');
     INSERT INTO T_EXTERNAL VALUES (100, 'A')

     SQL> INSERT INTO T_EXTERNAL VALUES (100, 'A');
     INSERT INTO T_EXTERNAL VALUES (100, 'A')

      *第 1 行出现错误:

      ORA-30657: 操作在外部组织表上不受支持

      SQL> DROP TABLE T_EXTERNAL;

      表已删除。

     

    SQL> CREATE TABLE T_EXTERNAL
      2 (
      3 ID NUMBER,
      4 NAME VARCHAR2(30)
      5 )
      6 ORGANIZATION EXTERNAL
      7 (
      8 TYPE ORACLE_DATAPUMP
      9 DEFAULT DIRECTORY D_OUTPUT
      10 LOCATION('TEST1.DMP')
      11 );

      SQL> CREATE TABLE T_EXTERNAL
      2 (
      3 ID NUMBER,
      4 NAME VARCHAR2(30)
      5 )
      6 ORGANIZATION EXTERNAL
      7 (
      8 TYPE ORACLE_DATAPUMP
      9 DEFAULT DIRECTORY D_OUTPUT
      10 LOCATION('TEST1.DMP')
      11 );

       表已创建。

     

    SQL> INSERT INTO T_EXTERNAL VALUES (1, 'A');
    INSERT INTO T_EXTERNAL VALUES (1, 'A')

    SQL> INSERT INTO T_EXTERNAL VALUES (1, 'A');
    INSERT INTO T_EXTERNAL VALUES (1, 'A')

      *第 1 行出现错误:

      ORA-30657: 操作在外部组织表上不受支持

     

     

    2、Oracle为外部表提供了两种访问的驱动程序,默认的访问程序是oracle_loader,它允许使用oracle的装载技术从外部文件中读取数据。另一种访问驱动程序是oracle_datapump它从数据库读取数据库并将数据插入到外部表中。

    1. Oracle_loader驱动程序

    创建外部表去访问D:\waibubiaoexp.dat文件中的记录

    (1).创建一个目录

    create directorymulu as 'D:\waibubiao'

    SQL> create directorymulu as 'D:\waibubiao'

    目录已创建。

    2.scott用赋予对目录mulu的读写权限

    SQL>grant read,write on directory mulu to scott;

    授权成功。

    SQL>

    3.soctt用户下创建外部表admin_ext_testing

    create tableadmin_ext_testing

    (idnumber, name varchar(10))

    organizationexternal

    (typeoracle_loader

    default directorymulu

    accessparameters

    (

    records delimitedby newline

    badfilemulu:'exp.bad'

    logfilemulu:'emp.log'

    fields terminatedby ','

    missing fieldvalues are null

    (id,name))

    location('exp.dat'))

    reject limitunlimited;

    SQL>conn scott/tiger

    已连接。

    SQL>create table admin_ext_testing

     2  (id number, name varchar(10))

     3  organization external

     4  (type oracle_loader

     5  default directory mulu

     6  access parameters

     7  (

     8  records delimited by newline

     9  badfile mulu:'exp.bad'

     10 logfile mulu:'emp.log'

     11 fields terminated by ','

     12 missing field values are null

     13 (id,name))

     14 location ('exp.dat'))

     15 reject limit unlimited;

    表已创建。

    SQL>

    4.外部表创建成功,查询外部表中的数据

    SQL>select * from admin_ext_testing;

           ID NAME

    ------------------------------

            1 jack

            2 pter

            3 tom

            4 sola

            5 kobe

            6 ddd

            7 jjjjj

            8 999

    已选择8行。

    SQL>

    至此oracle可以访问外部文件的数据了

     

    2. Oracle_datapump驱动程序

    创建一个外部表去访问另一个数据库中的数据库,先把令一个数据库中的数据导入一个文件,然后再去访问外部文件。

    数据库mdsp要访问数据库wlm中一个表test的数据,数据如下:

    SQL>select * from test;

           ID NAME

    ------------------------------

         1000 abc

         1001 abc

         1002 abcer

         1003 defalut

    SQL>

    1.wlm数据库上创建一个目录data

    create directorymulu as 'D:\data'

    SQL>create directory mulu as 'D:\data';

    目录已创建。

    SQL>

    2)在wlm数据库上创建外部表,执行完下面的语句后,会把表test中数据放到d:\dataTEST.DAT

    SQL>create table ext_test (id , name)

     2  organization external

     3  (

     4   typeoracle_datapump

     5   default directorymulu

     6  location('test.dat')

     7   )

     8   as select * fromtest;

    表已创建。

    SQL>

    3)在mdsp数据库中创建目录data指向d:\data

    SQL>create directory data as 'D:\data'

    目录已创建。

    SQL>

    4)在mdsp上创建外部表去访问TEST.DAT文件中的数据

    SQL>create table ext_mdsp_test (id number , namevarchar(10))

     2  organization external

     3  (

     4   typeoracle_datapump

     5   default directorydata

     6  location('test.dat')

     7   );

    表已创建。

    SQL>

    5)在mdsp数据库上访问外部表ext_mdsp_test

    SQL>select * from ext_mdsp_test;

           ID NAME

    ------------------------------

         1000 abc

         1001 abc

         1002 abcer

         1003defalut

    SQL>

    注:在外部表上不能执行DML操作

    展开全文
  • external file

    2014-08-24 16:01:04
    外部表怎么创建的 使用create table ... organazation external 语句创建,你
  • external table

    千次阅读 2013-05-08 13:39:59
    external table A read-only table whose metadata is stored in the database but whose data in stored in files outside the database. The database uses the metadata describing external tables to expose
  • dart external function

    千次阅读 2019-07-18 01:59:38
    dart external function 简单来说就是只声明方法,具体实现由外部提供,通常是不同的平台 runtime,类似 Java 的 native 方法。
  • pycharm external libraries

    2019-11-06 18:56:43
    电脑中存在着多个不同的版本的python和不同的虚拟环境,所以要不同的项目配置不同的虚拟环境,这样项目里调用的什么库,可以通过 按住键“command”+鼠标点击 进入调用库,所以这里讲下如何修改external libraries。...
  • WRITE_EXTERNAL_STORAGE:写入权限 READ_EXTERNAL_STORAGE:读取权限 最近申请存储权限时,在纠结是否需要同时申明WRITE_EXTERNAL_STORAGE 和 READ_EXTERNAL_STORAGE?因为6.0以上手机貌似只有一个存储开关,申请...
  • imprecise external abort

    千次阅读 2017-03-02 00:10:38
    开机到kernel某个固定阶段发生死机,死机信息都是imprecise external abort.
  • Maven External Dependency

    2017-05-26 17:42:37
    pom.xml中添加 参:https://www.tutorialspoint.com/maven/maven_external_dependencies.htm
  • oracle external密码验证

    2019-10-08 12:35:55
    什么是external密码验证  当OS user 中存在和DB user 同名的用户时 直接使用和DB user 同名的OS user 可以不输入密码直接登录数据库,  [oracle@zxrac1 ~] sqlplus / 如果数据库中存在Oracle用户,则可以不输入...
  • 配置 External 网络

    千次阅读 2014-08-05 17:09:28
    External 就是外部网络,相当于 Float ip,External 网络走的是 br-ex,也就是物理 eth1 网卡,对于 External 网络我们只需要创建一个就够了,而所有的租户都用这一个 External 到外网。 我们用管理员创建一个 ...
  • 今天刚好在做项目,然后看了别人的项目a标签rel=”external nofollow"因为不知道什么意思,就度娘查了一下资料,才知道是什么意思。nofollow 、external nofollow:它是告诉搜索引擎,不要将链接记入权重中,他...
  • Android使用过程中,对SD卡存储空间进行读写,那么是否需要同时申明WRITE_EXTERNAL_STORAGE 和 READ_EXTERNAL_STORAGE呢? 实践结论:不一定。 1、当你的APP只需要读取权限时,仅需申明READ_EXTERNAL_STORAGE; 2...
  • hive删除EXTERNAL外表

    千次阅读 2018-12-14 16:46:52
    外表不能按一般步骤drop,否则你还得手动去hdfs rm -r xxx文件,并且还可能遇到因为文件太大而不能删除等问题; ...ALTER TABLE xxx SET TBLPROPERTIES('EXTERNAL'='False'); drop table xxx;...
  • rollup external 属性解析

    千次阅读 2019-07-12 10:59:27
    这个时候我们就需要使用external属性。 二、示例 现在有一个示例项目,可以用作测试。直接运行npm run build 打包出的文件行数为170行。 现在我们要在项目中引用jquery。 在package.json中添加jquery dependencie.....
  • HIVE External&TBLPROPERTIES

    千次阅读 2018-04-21 21:13:25
    HIVE External&amp;TBLPROPERTIES1.Externalhive中有两种表:外部表和内部表(managed and external)。可以通过desc formatted table_name 命令来查看表的信息,来辨别表是外部表还是内部表。 内部表的文件,...
  • Pycharm external tools的使用

    千次阅读 2020-04-08 19:28:17
    对于PyCharm这样一个强大的IDE,如果所有事情都需要自己手动去操作,未免也太大材小用了,最近看到它有个external tools的功能,试了试还挺好用,下面我们来说说用法。 一、添加快捷操作到external tools 点击File-...
  • 首先简单介绍下external_id,此参数主要是增加在转链接口中使用,主要用来获取消费者的special_id,可以通过我们系统用户的自增ID,微信openid来完成绑定,从后在用户下单完成后,来识别用户订单,从订单信息中可以...
  • external 和 static 变量

    千次阅读 2016-06-19 12:03:12
    我们大概来谈一谈external 和 static 变量在使用的区别 1. 首先external变量是全局变量,你可以在头文件中申明某个变量是全局变量,external int a;但是不要赋值,如果你后面赋值就成为定义了。也就是不是声明,到...
  • webpack dll VS external

    千次阅读 2018-06-05 10:07:58
    webpack中的dll和external在本质上其实是解决的同一个问题:避免将某些外部依赖库打包进我们的业务代码,而是在运行时提供这些依赖。 一方面实现了代码拆分,以及依赖的复用, 另一方面提升构建速度. 这两种方案...
  • Fabric 2.0 除了原有的 docker builder 之外新增了 external builder ,一个 external builder 的实现提供 detect、build、release、run 可执行命令。 detect :接受两个参数source dir、metadata dir,用于探测...
  • idea External Libraries 没有jar

    万次阅读 2018-03-12 21:56:27
    在pom.xml中引入依赖后, 发现External Libraries只有jdk没有其他的jar, 在java代码中也无法用引入的类. 解决 在idea右侧的Maven Projects右击项目选择Reimport, 此时开始将jar导入到项目中, 但是这个加载过程...
  • Android系统源码external添加新模块
  • android studio external tool

    2017-05-19 15:55:48
    1. File->Settings->Tools->External Tools 2. javah Program : $JDKPath$\bin\javah.exe Parameters : -classpath . -jni -o $ModuleFileDir$/src/main/jni/$Prompt$ $FileClass$ Working
  • window.external的使用

    千次阅读 2018-02-08 10:53:00
    我们在js中可以通过window.external.myfunc()来调用浏览器提供的外部方法myfunc。可以让网页内的js脚本中能调用C++代码。 window.external 是外部对象,如你写C# 本地程序放个 webbrowser ,嵌套个网页,this....
  • idea External Libraries 没有maven依赖

    千次阅读 2020-02-12 16:39:19
    问题:idea导入maven项目,External Libraries中只有jdk的jar包。没有maven的依赖。 解决:pom.xml文件不知道为什么损坏了,里面没有依赖。删除项目,重新从版本库下载项目,导入,好了。 ...

空空如也

空空如也

1 2 3 4 5 ... 20
收藏数 107,945
精华内容 43,178
关键字:

external