Maintaining referential integrity using MS SQL server

Some time ago I posted a question relating to the following extension:
<extension vendor-name="kodo" key="jdbc-delete-action" value="null"/>
Kodo generates a "on delete set null" constraint for this, however ms sql
server does not support this. Since I don't want to matain this referential
integrity in my java code (meaning as soon as an object is deleted, setting
all references to it to null), I tried to implement a custom dictionary with
the default ms sql server solution for this problem: creating a trigger by
overriding the "getAddForeignKeySQL" method. This works fine when creating a
database from scratch using the schema tool, however, when updating an
existing databasebase schema, this is ignored, thereby not solving the
problem of having the database maintenance automated. I suppose I have to
write code for checking whether the trigger already exists. Browsing through
the code, I couldn't figure out how this is done. Can someone give me
suggestions on how to do this (and if this takes a lot of effort).
I also would like to know whether solarmetric has intentions to deal with
this problem in their framework. To be honest, I was quite surprised that
Kodo doesnt take care of this, leaving my database in an inconsistent state.
kind regards,
Christiaan

"Abe White" <[email protected]> schreef in bericht
news:caaunu$ecj$[email protected]..
>
I also would like to know whether solarmetric has intentions to dealwith
this problem in their framework. To be honest, I was quite surprisedthat
Kodo doesnt take care of this, leaving my database in an inconsistentstate.
>
Well, I would say that you're the one leaving the database in an
inconsistent state by not keeping your object model consistent :)From the manual:
6.2.2.12. jdbc-delete-action
If a field holds a relation to another object, you can use the
jdbc-delete-action field extension to control the delete action of the
database foreign key that models this relation. Possible values are:
null: Null the column(s) of this foreign key when the related record is
deleted.
It does mean that if the primary key record is deleted, all foreign keys to
the record are set to null, right? Since the jdo framework is about database
independence, not writing sql code (and of course lots more;) and Kodo
supports ms sql server, I would have expected that kodo to set the foreign
key to null if the object is deleted. Even if I do know sql server supports
does not support a 'on delete set null' sql statement;)
>
We have no plans to create triggers at this time.
What do you mean when you say "it is ignored" when you're updating?
Exactly what tool are you running, what actions are you running with, is
the foreign key extension present, and what is the outcome?Like I said, I wrote code in the "getAddForeignKeySQL" in the dictionary, so
a trigger is created when creating the database in the workbench (by running
the schematool). However, if the table already exists, but not the trigger,
refreshing the database from the workbench does not call the
getAddForeignKeySql to add the trigger to the table.

Similar Messages

  • Using MS-SQL Server tables to build Universes

    My team has been tasked to create Universes so users can create WEBI reports.  We don't have a business warehouse, but that appeared not to be a problem as our understanding is that we can create Universes directly from MS-SQL Server tables. 
    On attempting to use Microsoft SQL Server Management Studio (20005), we find that once we expand the list of tables for SAP performance slows down to a 5 to 10 second response time between mouse clicks. 
    Is there a setting to work around this?  Are we approaching this the wrong way?  Is there documentation that addresses this?
    Thanks,
    Leo

    Hi Leo,
    There are a couple of options which can help improve the performance of your designer.
    1) Under tools, options on the graphics tab if you turn off the Show Row Counts, then the db will not be queried for the number of rows
    2) Check tools, options general ensure Automatic parse upon defintion and check universe integrity at opening are checked off
    It is not clear from your message, but you mentioned SAP as your source. I am not sure if you intended that you were connecting directly to SAP or not.
    The number of tables can also have an impact of the performance of the designer tool. You can limit the number of tabels by tailoring a tables strategies. This means you can limit the query that returns the list of table to a specific set.
    Hope this helps
    Alan

  • Can I use Microsoft SQL Server Management Studio version 11.0 to write SQL queries for "SQL Server Compact 4.0 Local Database"

    Hi, Can I use Microsoft SQL Server Management Studio version 11.0 to write SQL queries for "SQL Server Compact 4.0 Local Database" ?
    When I use Connect Object Explorer, the "Connect to Server" dialog box which pops up has only 4 selections in the Server Type Drop Down List. They are Database Engine, Analysis Services, Reporting Services & Integration Services. I have read
    somewhere that there should be a compact database option. but I do not see it.
    What I would like to do is use free form SQL Queries against the tables in "SQL Server Compact 4.0 Local Database" .
    Once I have validated these queries, then I will use them in my Visual Studio 2012 C#, ASP.NET application. I created the Local Database using Visual Studio 2012 for use by my application.
    Thank you for your help..
    diana4

    Hello,
    With SSMS 2005 we have had the Option to work with SQL CE database files, but not with higher Version of SSMS.
    You can use the free SQL CE Toolbax instead; see
    http://sqlcetoolbox.codeplex.com/
    Olaf Helper
    [ Blog] [ Xing] [ MVP]

  • How to populate a spry menu using microsoft sql server database?

    Hi
    I would like to use dreamweaver cs4 and spry menu to create a dynamically created menu system.
    My concept is to populate the menu items on the fly using MS sql server as the database technology.
    Can anyone point me in the right direction? I have googled and searched but cant seem to get anywhere.
    Also once i get my menu established, i would like to style it. It seems like a lot of work to style each element by hand. I was wondering if there were some collection of spry menu css files somewhere that i could just attach and presto!
    Thank you.
    Jerry

    I would like to use dreamweaver cs4 and spry menu to create a dynamically created menu system. My concept is to populate the menu items on the fly using MS sql server as the database technology.
    Basically
    create a dynamic XML file containing data from the database
    create A SpryXMLDataSet
    create a SpryRegion where the menu appears
    using SpryRepeat populate the menu
    More info can be found here http://labs.adobe.com/technologies/spry/samples/
    Also once i get my menu established, i would like to style it. It seems like a lot of work to style each element by hand. I was wondering if there were some collection of spry menu css files somewhere that i could just attach and presto!
    Have a look here http://www.adobe.com/cfusion/exchange/index.cfm?event=extensionDetail&extid=2141544
    If you require further Spry related support go to http://forums.adobe.com/community/labs/spry

  • Using the SQL Server Agent for the first time

    I have set up several jobs to run automatically throughout the day. Each job just does one thing: executes an SSIS package.
    The packages themselves run perfect when I test them in Visual Studio 2005, but when the SQL Server Agent tries to run the job I am getting failed jobs.
    Is there any tutorials or walkthroughs that can teach my about using the SQL Server Agent? If I wanted extensive help troubleshooting my SQL Server Agent problems which part of the message boards would I post that too?
    Thanks for the info!

    Anyone?
    I really need some resources for SQL Server Agent 2005.
    Refer these links,
    http://technet.microsoft.com/en-us/library/ms141701(v=sql.90).aspx
    http://stackoverflow.com/questions/10489392/permissions-issue-running-ssis-package-from-sql-job
    Regards, RSingh

  • Problem using MS SQL Server JDBC Driver

    I am trying to use MS SQL Server JBDC driver with JDeveloper9i. I followed the steps mentioned in the document
    http://otn.oracle.com/products/jdev/howtos/bc4j/bc_psqlserverwalkthrough.html
    Still I am getting the following error message
    Error initializing data-source 'SQLTestDS': DriverManagerDataSource driver 'com.microsoft.jdbc.sqlserver.SQLServerDriver' not found
    What could be the reason?Did anybody run into similar issue?
    Thanks in advance.
    RC

    I assume from your message that you are attempting to
    deploy your application into OC4J - you're probably
    implicitly using the inbuilt OC4J if your using JSPs.
    If so, try placing the jdbc jars into the <JDEVHOME>\lib directory
    and referencing them from the j2ee\home\application.xml
    file:
    use lines like:
    <library path="../../../lib/msbase.jar" />
    regards, Karl

  • Query used by SQL Server Management Pack for monitoring database backups

    I use SCOM 2012 R2 and the SQL Server Management Pack to monitor SQL Server database backups. I believe I am getting false positives. SCOM reports database are not backuped, while in fact they are. So I need to troubleshoot this. I suspect SCOM is querying
    the backup history in the msdb database. I want to know which query SCOM uses.
    I have tried looking in the monitor's definition but I suspect the query is embedded in the management pack files which are binary. I have also tried running a trace using the SQL Server Profiler on my test environment and overriding the interval to 60 seconds,
    but I don't see a relevant query being executed. I also don't see the alert reappear so I suspect SCOM does not honor the interval in a way I would expect.
    What query, or other method, does SCOM use to check database backups?
    Thanks in advance.

    Thank you both Ivan and Michael,
    I only saw your messages by email and didn't see your screen shot before I extracted the query myself. In my own queries I calculate the backup age in hours instead of days because of daily full backups. Perhaps It will be a good idea to create my own monitors
    from scratch like I used to do with Nagios.
    I will study the vbscripts and might create my own version which allows the query to be entered as an parameter and move all code to a .Net class which can be called from vbscript as an COM object. This way I hope to reduce the vbscript code to an minimum
    while keeping the flexibility of the SCOM Operations Console and the robustness of .Net. I suspect I want to make more non standard monitors in the future.
    Regards,
    Arjen

  • Use a SQL SERVER get date in query

    I want to constrain my returned data by a change date to just return the last rolling 30 days of data. When I use sysdate, I find the plan is to retreive ALL data across the dblink, and then filter it on the Oracle side.
    Is there any way I can use the Sql Server getdate() function, something like
    select * from remote@ss_link
    where upd_date >= getdate() - 30
    Problem - how do I get Oracle to pass the Sql Server specific function call to Sql Server? [BTW I'm on an old version of Oracle...]

    It depends on the product you are using.
    If you are using a gateway you can call remote functions using the getdate@<db link> syntax as described in the Heterogeneous Admin Guide.
    For gateways and generic connectivity you can also use PASSTHROUGH which allows you to pass a statement as it is to the remote database.
    Or at least you can create a view at the SQL Server side which returns the last 30 days and then just select from this view.

  • Error Using the SQL Server 2000 Driver for JDBC Service Pack 3

    Hi,
    I�m using the SQL Server 2000 Driver for JDBC Service Pack 3. The connection is succesfully, but when I use de statement.executequery() method, there is the follow exception:
    java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Invalid object name 'PEC_COUNTRY'.
    This is my code:
    ResultSet resultSet;
    Statement statement;
    Connection connection;
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver").newInstance();
    connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://S0MALMUERTA:1433;user=sa;password=");
    statement = connection.createStatement();
    resultSet = statement.executeQuery("SELECT COY_INX, COY_NAME, COY_ICO FROM PEC_COUNTRY
    ");When I make the last instruction, occurs the above exception
    Thanks in advance
    Luija

    The way you are connecting, the default database used will be 'master' and i guess that the table PEC_COUNTRY was defined in another database.
    If it is the case you need to specify the database name.
    connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://S0MALMUERTA:1433;DatabaseName=yourdb;user=sa;password=");

  • Using MS Sql Server 2000 with Flex 2

    help! - I'm trying to understand how I could use Flex 2 (with
    the Flex Data Services) using MS SQL Server 2000 as my RDMS.
    Currently using SS with ASP. Basically, what do I need in
    terms of server set up (e.g. do I need to install the J2EE Server
    for instance?). How about using transaction based storedprocedures
    with flex.
    I'm having difficulty finding a clear answer (for me anyway!)
    to my question. I have even phoned Adobe last Thursday to ask them
    - and their expert was not around and they said would call me
    back... hmm.

    Hi Michael,
    At this time SQL Server 2000 is not certified for WLCS 3.5. Since the
    schema has changed between 3.2 and 3.5, running the 3.2 scripts is not a
    good idea.
    I can tell you that certification is in progress for SQL Server 2000. Your
    best bet is to contact your Sales Representative to get an idea of when
    certification might be coming.
    I hope this helps.
    - Ginny
    "Michael Schulz" <[email protected]> wrote in message
    news:[email protected]..
    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

  • Using MS SQL Server 2000 for WLCS 3.50 DB

    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

    Hi Michael,
    At this time SQL Server 2000 is not certified for WLCS 3.5. Since the
    schema has changed between 3.2 and 3.5, running the 3.2 scripts is not a
    good idea.
    I can tell you that certification is in progress for SQL Server 2000. Your
    best bet is to contact your Sales Representative to get an idea of when
    certification might be coming.
    I hope this helps.
    - Ginny
    "Michael Schulz" <[email protected]> wrote in message
    news:[email protected]..
    I'm using WebLogic 6.0sp1 with Commerce Server 3.5 and I've successfully
    installed the demo. I would like to create another commerce server
    installation, this time using Microsoft SQL Server 2000 as the database
    instead of Cloudscape. I've downloaded and installed the BEA jDriver
    for MS SQL 7/2000 and tested it using dbping. My question is: where are
    the db scripts for creating and populating the commerce database? I've
    found the WLCS_320_DB_DDL_1.1.zip file on the BEA downloads site, but
    I'm concerned that this schema is for Version 3.20 of Commerce Server.
    Is there a similar file for WLCS 3.50? If not, is it safe to use this
    one?
    If this is posted in the wrong place, please let me know and I'll repost
    to the appropriate newsgroup as required.
    Sincerely,
    Michael Schulz

  • Can't create an MBO object using an SQL Server connection profile

    Hi all,
    I'm trying to create an MBO from an table using an SQL Server connection profile. The connection is fine but when i grag a table into Mobile Application Diagram in order to create an MBO i got the following exeption:
    I´ve already configured the necessary jar (sqljdbc4.jar) in the following directories:
    C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\lib
    C:\Sybase\UnwiredPlatform\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.com.sqlserver_2.1.0.201109131337
    but i always get the same error.
    Any help, suggest would be apreciated
    thx,
    Nuno

    Hi Nuno,
    I just wanted you to verify the path where you have pasted JAR file. As you mentioned
    Path 1:
    C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\lib
    but as per doc it should be under:
    C:\Sybase\UnwiredPlatform\Servers\UnwiredServer\lib\3rdparty
    Path 2:
    C:\Sybase\UnwiredPlatform\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.com.sqlserver_2.1.0.201109131337
    but as per doc it should be under:
    C:\Sybase\UnwiredPlatform\Unwired_WorkSpace\Eclipse\sybase_workspace\mobile\eclipse\plugins\com.sybase.uep.com.sqlserver_2.1.0.201109131337\lib
    Rgrds,
    JK

  • SQL ENTERPRISE: The edition of Reporting Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database

    The error below makes absolutely no sense! I'm using Enterprise Core...yet I'm being told I can't use remote data sources:
    w3wp!library!8!03/05/2015-19:08:48:: i INFO: Catalog SQL Server Edition = EnterpriseCore
    w3wp!library!8!03/05/2015-19:08:48:: e ERROR: Throwing Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: , Microsoft.ReportingServices.Diagnostics.Utilities.OperationNotSupportedException: The feature: "The edition of Reporting
    Services that you are using requires that you use local SQL Server relational databases for report data sources and the report server database." is not supported in this edition of Reporting Services.;
    Really? This totally contradicts the documentation found here:
    https://msdn.microsoft.com/en-us/library/ms157285(v=sql.110).aspx
    That article says remote connections are completely supported.
    ARGH! Why does this have to be so difficult to setup?!?

    Hi jeffoliver1000,
    According to your description, you are using Enterprise Core edition and you are prompted that you can’t use remote data sources.
    In your scenario, we neither ignore your point nor be doubt with what you say. But actually we have met the case before that even though the SQL Server engine is Enterprise but the reporting services is still standard. So I would recommend you to find the
    actual edition of reporting services you are using. You can find Reporting Services starting SKU in the Reporting Service logs ( default location: C:\Program Files\Microsoft SQL Server\<instance name>\Reporting Services\LogFiles). For more information,
    please refer to the similar thread below:
    https://social.technet.microsoft.com/Forums/en-US/f98c2f3e-1a30-4993-ab41-acbc5014f92e/data-driven-subscription-button-not-displayed?forum=sqlreportingservices
    By the way, have you installed the other SQL Server edition before?
    Best regards,
    Qiuyun Yu
    Qiuyun Yu
    TechNet Community Support

  • Does Exchange Server 2003 use M$SQL Server?

    Hi All,
    I have a new customer with SBS 2003 running as an Exchange Server.  He have four workstations and one server.  He is also running M$SQL Server 2005.  Does Exchange Server use M$SQL Server?  (Need to know for backup considerations.)
    Many thanks,-T

    No problem. Check if you have SQL management studio installed on the computer and open it up,to see what db are in there.
    Regards,
    Denis Cooper
    MCITP EA - MCT
    Help keep the forums tidy, if this has helped please mark it as an answer
    Blog: http://www.windows-support.co.uk 
    Twitter:   LinkedIn:

  • Features No longer used from Sql Server 2005 to 2008 R2

    As part of our Migration process from 2005 to 2008 R2, which Specific features should i be taking into consideration in Upgrade to Sql Server 2008 R2 in prespective of T-Sql queries already written in 2005 and need to be changed to 2008 r2 compatibility.Thanks!
    Srikanth

    According to the Link, SET ROWCOUNT function has to be replaced with TOP keyword , but SET ROWCOUNT is still used in SQL Server 2008 R2 and its later versions according to microsoft :
    http://msdn.microsoft.com/en-us/library/ms188774.aspx 
    Can anyone help me in this regard.Thanks!
    If you read further below there is a note mentioned as
    Using SET ROWCOUNT will not affect DELETE, INSERT, and UPDATE statements in a future release of SQL Server. Avoid using SET ROWCOUNT with DELETE, INSERT, and UPDATE statements in new development work, and plan to modify applications that currently use it.
    For a similar behavior, use the TOP syntax. For more information, see TOP (Transact-SQL).
    MS cannot remove it completely knowing to fact that we are Lazy and will not immediately change our code :)
    Please mark this reply as answer if it solved your issue or vote as helpful if it helped so that other forum members can benefit from it.
    My TechNet Wiki Articles

Maybe you are looking for

  • My ipod/iphone cannot be used because the required software isn"t installed

    I am trying to connect my ipod touch and my iphone to my itunes.it is telling me to use the itunes installer and remove itunes and install the 64 bit version.I did that and I still get the same message

  • What format do I use to post on youtube so that IPhone and Androids can play it?

    adobe premiere pro cs6: What format do I use to post on youtube so that IPhone and Androids can play it? how do I fix it so it will play I tryed h.264 youtube hd 720, h.264 andriod phone here is the youtube video play's fine on pc but will not play o

  • What is raise form_trigger_failure

    db and dev 10g rel2 hi all , could you please tell me about the functionality of this statement ? what can i do with it ? i searched the online help , and i found just one page ,and got nothing from it , and there is nothing in the documentation . th

  • MS VisualStudio7 and Oracle precompiler

    Use someone MS Visual Studio 7 and Oracle precomiler? I have some problems to include the precomp file. such as: error LNK2019: unresolved external symbol "void __cdecl sqlcxt(void * *,unsigned long *,struct sqlexd *,struct sqlcxp const *)" (?sqlcxt@

  • EDI output message for Outbound Deliv send with application own transaction

    Dear All, I encountering a problem with the output message "WSOR" via EDI. What i want:        I would to configure this message output without the Dispatch time " 3: Send with application own transaction". What is encountering now:       I have done