首页 \ 问答 \ 从SQL Server存储过程执行Oracle存储过程(Execute an Oracle stored procedure from a SQL Server stored procedure)

从SQL Server存储过程执行Oracle存储过程(Execute an Oracle stored procedure from a SQL Server stored procedure)

我有一个SQL Server存储过程需要发送信息到Oracle存储过程。

我如何设置? 它应该是一个链接服务器? 我如何编写代码来传递和执行存储过程?


I have a SQL Server stored proc that needs to send information to an Oracle stored proc.

How do I set this up? Should it be a linked server? And how do I write the code to pass and execute the stored proc?


原文:https://stackoverflow.com/questions/7262158
更新时间:2022-12-16 07:12

最满意答案

对象关系的基数定义了左端有多少个对象被映射到右端有多少个对象。 例如,它可以是:

  • 1 : 1 (一对一) - 对于左类型的每个对象,只需要一个正确类型的对象。 在这种情况下,通常两个对象都有一个指向另一个对象的指针或存储它的唯一ID。
  • 1 : 1..* (一对多) - 对于左类型的每个对象,至少需要一个正确类型的对象,但可以创建更多对象。 在这种情况下,通常左侧的对象不知道右侧的对象,但右侧的对象有一个指针或保留左侧对象的唯一ID。
  • 1 : 0..1 (一个到可选的一个) - 对于左类型的每个对象,不需要任何正确类型的对象,但如果存在,则它必须不超过一个。 在这种情况下,通常左侧的对象不知道右侧的对象,但右侧的对象有一个指针或保留左侧对象的唯一ID。
  • 1..* : 1..* (多对多) - 对于左类型的每个对象,至少需要一个正确类型的对象,但是一个正确类型的对象可能满足对多个对象的要求。左类型。 在这种情况下,通常左侧和右侧的两个对象都不知道其他对象,但它们都有指向常见第三个对象的指针或保留定义关系的唯一ID。
  • 等等

请注意,虽然在我的所有示例中,我都谈到了正确的对象与左对象的关系,但每个基数都可以颠倒过来,并且一些基数指定了双向要求(即,从右到左,从左到右)。对)

以下是有关数据模型的基数的更多信息。

特别是,核心数据的上一段说明如果删除1 : 1 1 : 1..*1..* : 1..*关系右侧的对象(换句话说,一个或多个其他对象取决于该特定对象的存在),这种关系左侧的对象将处于无效状态。


The cardinality of an object relationship defines how many objects at the left end are mapped to how many objects at the right end. For example, it can be:

  • 1 : 1 (one to one) - for each object of the left type, exactly one object of the right type is required. In this scenario, usually both objects have a pointer to the other or store the unique id of it.
  • 1 : 1..* (one to many) - for each object of the left type, at least one object of the right type is required, but more can be created. In this scenario, usually the object on the left does not know about the objects on the right, but the objects on the right have a pointer or keep unique id for the left object.
  • 1 : 0..1 (one to optional one) - for each object of the left type, no object of the right type is required, but if any exist, it must be no more than one. In this scenario, usually the object on the left does not know about the objects on the right, but the objects on the right have a pointer or keep unique id for the left object.
  • 1..* : 1..* (many to many) - for each object of the left type, at least one object of the right type is required, but one object of the right type might satisfy the requirement for multiple objects of the left type. In this scenario, usually both objects on the left and right side don't know about the others, but they both have a pointer to a common third object or keep unique id that defines the relationship.
  • etc.

Note that while in all my examples I talk about the relationship of the right object to the left object, each cardinality can be reversed, and some of the cardinalities specify bi-directional requirements (ie. right-to-left and left-to-right)

Here's more information about Cardinality with regards to data models.

In particular, the above paragraph from Core Data states that if you delete an object that is on the right side of a 1 : 1, 1 : 1..* or 1..* : 1..* relationship (in other words, one or more other objects depend on the existence of this particular object), the objects on the left side of such relationship would be in an invalid state.

相关问答

更多
  • 对象关系的基数定义了左端有多少个对象被映射到右端有多少个对象。 例如,它可以是: 1 : 1 (一对一) - 对于左类型的每个对象,只需要一个正确类型的对象。 在这种情况下,通常两个对象都有一个指向另一个对象的指针或存储它的唯一ID。 1 : 1..* (一对多) - 对于左类型的每个对象,至少需要一个正确类型的对象,但可以创建更多对象。 在这种情况下,通常左侧的对象不知道右侧的对象,但右侧的对象有一个指针或保留左侧对象的唯一ID。 1 : 0..1 (一个到可选的一个) - 对于左类型的每个对象,不需要任 ...
  • 我认为这样做的方法不止一种。 这是我认为有效的一个: 如果Transaction是另一个实体,则Appointment与Transaction具有一对一的关系。 然后,如果不付款,您可以将交易实体保留为零。 如果付款,您设置交易并链接其与约会和客户的关系。 通过检查您的约会交易是否为零,您知道它是否变成了交易。 I think there are more than one way of doing it. This is one I think works: If Transaction is anoth ...
  • 通常的答案是“他们需要帮助维护数据完整性”。 这是一个具体的例子。 假设您有一个Department实体和一个Employee实体。 Department与employees有多对多关系employees ,但没有相应的反向关系。 有点做作,因为可能有很好的理由想要轻松查找员工的部门,但我想要一个简单的例子。 现在,假设我有一个名为“Department X”的特定部门实例,该实例适用于所有公司的间谍。 X部门有7名员工。 但是,灾难! 特工004被竞争对手公司杀害。 因此,您的应用删除了代理004的Emp ...
  • 是的,如果你定义一个抽象类Z与错误的关系'errors',然后将X和Y定义为从Z继承的类,它们将具有关系'errors'。 只记得Core Data不使用外键,直接设置关系属性。 newError.parent = objectX 并获得所有X错误 for(objectX.errors中的错误*错误){ NSLog(@“错误是%@,%@”,error.id,error.name“); } Yes, if you define an abstract class Z with a relationship ' ...
  • 你不能像这样将NSSet真正保存到CoreData中。 NSSet仅包含与主对象相关的其他CoreData实体。 要使用数据保存数组,您需要使用NSData属性并使用NSKeyedArchiver将NSArray存档为NSStrings。 然而,即使是最简单的解决方案也存在一些局限性。 例如,您将无法在这些属性上使用和谓词。 因此,我建议创建另一个“Location”实体,并根据那些“l1”,“l2”值创建一个位置对象。 是的你使用addLocObject:或者如果你想添加多个你使用的 - (void)ad ...
  • 这种关系是绝对正确的,除了友谊是自然的双向,所以反向关系也是朋友。 没有创建朋友这样的问题,因此它不会创建新用户。 您可以在两个现有用户之间建立友谊关系。 您正在寻找的关键字是:核心数据编程指南:) The relationship is absolutely correct, except that friendship is naturally bidirectional, so inverse relation is friends too. There is no such issue as cre ...
  • 您真的需要从头到尾阅读核心数据指南 。 它回答了所有这些问题,并将为您节省大量的麻烦。 我是Core Data的忠实粉丝,但它是一个庞大的框架,无法通过周围的方式来学习,只是自己尝试一下(这也是我先尝试过的,并且非常沮丧,浪费了更多的时间来解决我以为自己已经学会了。 最重要的是,不要将CD视为ORM或数据库映射器 - 它实际上是一个对象图管理器,它还为您处理持久化的对象图(以及撤消管理,对象'模式'演变等) 对你的问题的简短回答是,不,你不必马上告诉CD关于你的对象的一切。 您可以创建配置文件,在其上设置一 ...
  • 基数是以下方面: 医生---(1,N) - 工作 - (N,1)---部门 无论是否存在日期属性。 这基本上是如何使用额外的实体(在您的情况下为WORK)呈现包含额外属性的(N,N)关系。 date属性仅影响WORK实体的键,但不影响关系的基数。 The cardinalities are the fololowing: DOCTOR ---(1,N)--WORK--(N,1)--- DEPARTMENT regardless of presence of date attribute. That is b ...
  • 这种情况下的同步意味着利用运行在不同设备上的应用的不同实例之间的同步服务。 它本身与Core Data没有任何关系,只是通知同步服务Core Data将数据模型的那部分暴露给同步服务。 如果您不使用同步服务,则可以忽略该设置。 Sync in this instance means utilizing synchronization services between different instances of the app running on different devices. It doesn't ...
  • 只需创建指向同一实体的关系即可。 这是一个例子: @property (nonatomic, retain) NSString * goalName; @property (nonatomic, retain) NSData * goalPicture; @property (nonatomic, retain) NSNumber * indexOrder; @property (nonatomic, retain) NSNumber * wordPicture; @property (nonatomic, ...

相关文章

更多

最新问答

更多
  • 获取MVC 4使用的DisplayMode后缀(Get the DisplayMode Suffix being used by MVC 4)
  • 如何通过引用返回对象?(How is returning an object by reference possible?)
  • 矩阵如何存储在内存中?(How are matrices stored in memory?)
  • 每个请求的Java新会话?(Java New Session For Each Request?)
  • css:浮动div中重叠的标题h1(css: overlapping headlines h1 in floated divs)
  • 无论图像如何,Caffe预测同一类(Caffe predicts same class regardless of image)
  • xcode语法颜色编码解释?(xcode syntax color coding explained?)
  • 在Access 2010 Runtime中使用Office 2000校对工具(Use Office 2000 proofing tools in Access 2010 Runtime)
  • 从单独的Web主机将图像传输到服务器上(Getting images onto server from separate web host)
  • 从旧版本复制文件并保留它们(旧/新版本)(Copy a file from old revision and keep both of them (old / new revision))
  • 西安哪有PLC可控制编程的培训
  • 在Entity Framework中选择基类(Select base class in Entity Framework)
  • 在Android中出现错误“数据集和渲染器应该不为null,并且应该具有相同数量的系列”(Error “Dataset and renderer should be not null and should have the same number of series” in Android)
  • 电脑二级VF有什么用
  • Datamapper Ruby如何添加Hook方法(Datamapper Ruby How to add Hook Method)
  • 金华英语角.
  • 手机软件如何制作
  • 用于Android webview中图像保存的上下文菜单(Context Menu for Image Saving in an Android webview)
  • 注意:未定义的偏移量:PHP(Notice: Undefined offset: PHP)
  • 如何读R中的大数据集[复制](How to read large dataset in R [duplicate])
  • Unity 5 Heighmap与地形宽度/地形长度的分辨率关系?(Unity 5 Heighmap Resolution relationship to terrain width / terrain length?)
  • 如何通知PipedOutputStream线程写入最后一个字节的PipedInputStream线程?(How to notify PipedInputStream thread that PipedOutputStream thread has written last byte?)
  • python的访问器方法有哪些
  • DeviceNetworkInformation:哪个是哪个?(DeviceNetworkInformation: Which is which?)
  • 在Ruby中对组合进行排序(Sorting a combination in Ruby)
  • 网站开发的流程?
  • 使用Zend Framework 2中的JOIN sql检索数据(Retrieve data using JOIN sql in Zend Framework 2)
  • 条带格式类型格式模式编号无法正常工作(Stripes format type format pattern number not working properly)
  • 透明度错误IE11(Transparency bug IE11)
  • linux的基本操作命令。。。