SQL Server 2000 auditing/tracking DML changes on specific tables.

Hello,
We would like to audit/track all DML activities on couple of tables which reside on SQL Server 2000. Triggers are an option we think but thought that would impact performance because of activity on those tables. Could someone please suggest any other best
options that are possible with SQL Server 2000 to capture these changes.
Thanks,

Hello,
You may consider third party tools that may still support SQL Server 2000. The following tool supported SQL Server 2000 a few years
ago, not sure about today:
http://www.apexsql.com/sql_tools_comply.aspx
Server side traces may be another option:
http://msdn.microsoft.com/en-us/library/cc293613.aspx
Hope this helps.
Regards,
Alberto Morillo
SQLCoffee.com

Similar Messages

  • SQL Server 2000 auditing on DML changes on user tables to user databases

    Please let me know if you know if there is any procedure or steps to determine DML changes on user tables in database.

    Hello,
    You can use triggers as shown in the following article:
    http://sqlserver2000.databases.aspfaq.com/how-do-i-audit-changes-to-sql-server-data.html
    You may also consider third party tools that may still support SQL Server 2000. The following tool supported SQL Server 2000 a few years
    ago, not sure about today:
    http://www.apexsql.com/sql_tools_comply.aspx
    Server side traces may be another option:
    http://msdn.microsoft.com/en-us/library/cc293613.aspx
    Hope this helps.
    Regards,
    Alberto Morillo
    SQLCoffee.com

  • Designing principle of auditing the DML on a specific table?

    Hi All,
    What is the designing principle of auditing the DML performed on a table? or a bunch of tables?
    I know Oracle provides the auditing capability and there is Fine-Grained auditing available to use to keep track of row/column level changes.
    However, in this case, since we want to keep all the changing history of the table, and we want to do it our own way, we don`t want to use the Oracle`s FGA.
    the scenario is:
    I have a table with 40 columns, and any one of them might be updated, including the primary key. (it sucks and bad)
    we want to keep track of all the changes performed on this table, mainly DML.
    the table structure I came up with is as below and it doesn`t look good or feel right.
    So, could you share some experiences of how your design the table in this scenario? and the basic principle or rule to follow?
    CREATE TABLE TBS (COL1 VARCHAR2(10), COL2 VARCHAR2(20), COL3 VARCHAR2(20), COL4 VARCHAR2(30)....., COL40 VARCHAR2(50));
    CREATE TABLE tbs_audit (
    SEQ_NUM NUMBER,
    USER_NAME VARCHAR2(50),
    UPD_DT TIMESTAMP,
    OPERATION_TYPE VARCHAR2(20),
    COL1_OLD_VAL VARCHAR2(10),
    COL2_OLD_VAL VARCHAR2(20),
    COL40_OLD_VAL VARCHAR2(50));Thanks in advance!

    I would definitely put the auditing records into another table.
    What I am struggling with is:
    whether should I record the changed columns only or the whole row? to me, the first one is better. it saves space, and it comes easy when I want to display the changed history of certain columns.
    And for the first one, should I use table structure like 1) or 2)? which one is better? why?
    1)
    CREATE TABLE tbs_audit (
    SEQ_NUM NUMBER,
    USER_NAME VARCHAR2(50),
    UPD_DT TIMESTAMP,
    OPERATION_TYPE VARCHAR2(20),
    COL1_OLD_VAL VARCHAR2(10),
    COL2_OLD_VAL VARCHAR2(20),
    COL40_OLD_VAL VARCHAR2(50));
    2)
    CREATE TABLE tbs_audit (
    SEQ_NUM NUMBER,
    USER_NAME VARCHAR2(50),
    UPD_DT TIMESTAMP,
    OPERATION_TYPE VARCHAR2(20),
    COL_name VARCHAR2(10),
    COL_OLD_VAL VARCHAR2(20)
    );

  • Transactions in MS SQL server 2000

    I'm writing an application whish will real data from MS SQL server 2000. At the same time one table and/or database would be used with couple of users. What should I use for handling transactions?
    I'm using jtds-0.8-rc1 as JDBC driver.
    Thanks in advance.

    I'm writing an application whish will real data from
    MS SQL server 2000. At the same time one table and/or
    database would be used with couple of users. What
    should I use for handling transactions?
    I'm using jtds-0.8-rc1 as JDBC driver.
    Thanks in advance.Are you saying you will only have one database? Are your sql statements atomic? If they are just use sql server and JDBC with autocommit on. If not, you can still just use sql server and jdbc and turn autocommit off, and explicitly control the transactions yourself. If your app is a web application, you can probably use the web container to control the transactions.
    If you are going to have more than one database, or a database and another datasource, then you'll have to look at a transaction manager or application server. If you do, you'll have to have the Microsoft Distributed Transaction Coordinator running as well.

  • Collation change in MS SQL SERVER 2000

    As i have installed sqlserver 2000 with default collation SQL_Latin1_general_CP1_CI_AS, Now i am unable to continue ECC5.0 IDES Installation which  requires  the collation SQL_Latin_General_c850_BIN2. Please let me know how to change default collation to BIN2  in  sqlserver 2000. I have  seen note 600027 which seems to be not clear.
    thanks
    balan

    Hi Chidam,
    you have to distinguish between the server collation and the database collation. In your case, as far as I can tell, you have to uninstall SQL Server 2000 and install it again with the right collation (Binary order for use with the 850 Multilingual Character Set).
    Please also refer to note 505906 which describes your scenario.
    Regards,
    Sven

  • Changes required to switch from SQL Server 2000 to SQL Server 2005?

    I'm converting a legacy app from SQL Server 2000 to SQL Server 2005.  The app is written in VB6 and utilizes CR 8 OCX.  When I invoke a report from VB I'm getting Error# 20599 Cannot open SQL server.  I redefined the ODBC DSN specifying Windows Authentication, and the SQL Server instance supports mixed mode.
    Searching for the error, I found an article that suggests I need p2sodbc8.zip, but I can't find a link to it in the Downloads area.
    Would greatly appreciate any help at all - including a link to p2sodbc8.zip if that's the likely resolution.
    Thanks in advance,
    Pete

    Hi Peter,
    As you are having issue with SDK's.
    I would suggest you to post your question in
    Business Objects SDK Application Development » [Legacy Application Development SDKs|;
    That forum is monitored by qualified technicians and you will get a faster response there. Also, all  SDK queries remain in one place and thus can be easily searched in one place.
    Thank you for your understanding,
    Shweta

  • Exceptions thrown while importing tables from SQL Server 2000

    Hi all,
    <MyProblem:
    I cannot import the tables defined in my local SQL Server. An exception is thrown --oracle.jdeveloper.cm.ds.db.ValidationException: Columns of type varchar cannot have a size specified.
    />
    <What I have done:
    In Oracle JDev 10g, Created a new DB connection called "SQLServerConnection" to connect to the SQL Server and it works fine. I am able to see all tables by expanding the connection.
    During the creation of a new partner link named "DBAdapter", I use the adapter wizard to select DB Adapter and then select the "SQLServerConnection" DB connection I have created. I select Perform an Operation on a Table and then check Select. After I pressed OK button on the[i] Import Tables  dialog, a Error messege box emmerged indicating the Exception: Columns of type varchar cannot have a size specified.
    I try to change the data type of the columns of the tables to char, there is still similar exception (Columns of type char cannot have a size specified).
    />
    I got the stack trace from the prompt by using jdev.exe.
    <StackTrace:
    oracle.jdeveloper.cm.ds.db.ValidationException: Columns of type varchar cannot h
    ave a size specified.
    at oracle.jdeveloper.offlinedb.OfflineDBTableValidator.validateObject(Of
    flineDBTableValidator.java:116)
    at oracle.jdeveloper.cm.ds.db.AbstractDBObjectProvider.validateObject(Ab
    stractDBObjectProvider.java:601)
    at oracle.jdeveloper.offlinedb.OfflineDBObjectProvider.updateObject(Offl
    ineDBObjectProvider.java:952)
    at oracle.tip.tools.ide.pm.wizard.adapter.db.DBAdapterDescriptorGenerato
    r.generate(DBAdapterDescriptorGenerator.java:274)
    at oracle.tip.tools.ide.pm.wizard.adapter.db.DBAdapterSelectTablePage.ac
    tionPerformed(DBAdapterSelectTablePage.java:451)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    86)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:141)
    at java.awt.Dialog$1.run(Dialog.java:540)
    at java.awt.Dialog.show(Dialog.java:561)
    at java.awt.Component.show(Component.java:1133)
    at java.awt.Component.setVisible(Component.java:1088)
    at oracle.bali.ewt.wizard.WizardDialog.runDialog(Unknown Source)
    at oracle.tip.tools.ide.pm.wizard.adapter.techAdapterWizard.display(tech
    AdapterWizard.java:151)
    at oracle.tip.tools.ide.pm.bpelgraph.editors.PartnerLinkEditPage.handleA
    dapterWizard(PartnerLinkEditPage.java:311)
    at oracle.tip.tools.ide.pm.bpelgraph.editors.PartnerLinkEditPage.actionP
    erformed(PartnerLinkEditPage.java:893)
    at javax.swing.AbstractButton.fireActionPerformed(AbstractButton.java:17
    86)
    at javax.swing.AbstractButton$ForwardActionEvents.actionPerformed(Abstra
    ctButton.java:1839)
    at javax.swing.DefaultButtonModel.fireActionPerformed(DefaultButtonModel
    .java:420)
    at javax.swing.DefaultButtonModel.setPressed(DefaultButtonModel.java:258
    at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(BasicButtonL
    istener.java:245)
    at java.awt.AWTEventMulticaster.mouseReleased(AWTEventMulticaster.java:2
    31)
    at java.awt.Component.processMouseEvent(Component.java:5100)
    at java.awt.Component.processEvent(Component.java:4897)
    at java.awt.Container.processEvent(Container.java:1569)
    at java.awt.Component.dispatchEventImpl(Component.java:3615)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
    at java.awt.LightweightDispatcher.processMouseEvent(Container.java:3198)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3128)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:141)
    at java.awt.Dialog$1.run(Dialog.java:540)
    at java.awt.Dialog.show(Dialog.java:561)
    at oracle.tip.tools.ide.pm.bpelgraph.editors.PartnerLinkDialog.create(Pa
    rtnerLinkDialog.java:90)
    at oracle.tip.tools.ide.pm.bpelgraph.collaxalaf.BPELGraphPane.createPart
    nerLink(BPELGraphPane.java:324)
    at oracle.tip.tools.ide.pm.bpelgraph.collaxalaf.BPELDNDDropHandler.handl
    eDrop(BPELDNDDropHandler.java:77)
    at oracle.tip.tools.ide.common.graph.DefaultGraphPaneDropTargetListener.
    routeToDropHandler(DefaultGraphPaneDropTargetListener.java:212)
    at oracle.tip.tools.ide.common.graph.DefaultGraphPaneDropTargetListener.
    handleDrop(DefaultGraphPaneDropTargetListener.java:200)
    at oracle.tip.tools.ide.pm.bpelgraph.collaxalaf.BPELGraphPaneDropTargetL
    istener.handleDrop(BPELGraphPaneDropTargetListener.java:75)
    at oracle.tip.tools.ide.common.graph.DefaultGraphPaneDropTargetListener.
    drop(DefaultGraphPaneDropTargetListener.java:260)
    at java.awt.dnd.DropTarget.drop(DropTarget.java:398)
    at sun.awt.dnd.SunDropTargetContextPeer.processDropMessage(SunDropTarget
    ContextPeer.java:542)
    at sun.awt.dnd.SunDropTargetContextPeer.access$800(SunDropTargetContextP
    eer.java:52)
    at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchDropEven
    t(SunDropTargetContextPeer.java:805)
    at sun.awt.dnd.SunDropTargetContextPeer$EventDispatcher.dispatchEvent(Su
    nDropTargetContextPeer.java:743)
    at sun.awt.dnd.SunDropTargetEvent.dispatch(SunDropTargetEvent.java:29)
    at java.awt.Component.dispatchEventImpl(Component.java:3494)
    at java.awt.Container.dispatchEventImpl(Container.java:1627)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.LightweightDispatcher.retargetMouseEvent(Container.java:3483
    at java.awt.LightweightDispatcher.processDropTargetEvent(Container.java:
    3269)
    at java.awt.LightweightDispatcher.dispatchEvent(Container.java:3123)
    at java.awt.Container.dispatchEventImpl(Container.java:1613)
    at java.awt.Window.dispatchEventImpl(Window.java:1606)
    at java.awt.Component.dispatchEvent(Component.java:3477)
    at java.awt.EventQueue.dispatchEvent(EventQueue.java:456)
    at java.awt.EventDispatchThread.pumpOneEventForHierarchy(EventDispatchTh
    read.java:201)
    at java.awt.EventDispatchThread.pumpEventsForHierarchy(EventDispatchThre
    ad.java:151)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:145)
    at java.awt.EventDispatchThread.pumpEvents(EventDispatchThread.java:137)
    at java.awt.EventDispatchThread.run(EventDispatchThread.java:100)
    />
    <Oracle:
    Oracle JDeveloper 10.1.2.0.0 (Build 1811)
    Oracle IDE     10.1.2.17.84
    Business Components Version     10.1.2.17.96
    UML Modelers Version     10.1.2.16.71
    Versioning Support     10.1.2.16.71
    WebDAV Support Version     10.1.2.16.71
    Struts Modeler Version     10.1.2.6.15
    BPEL Designer     10.1.2.0.0 (Build 050504)
    Designer Generators Framework     10.1.2.7.56
    ADF UIX     2.2.16
    java.version     1.4.2_06
    java.home     E:\OraBPELPM\jdk\jre
    java.vm.name     Java HotSpot(TM) Client VM
    java.vm.vendor     Sun Microsystems Inc.
    java.vm.version     1.4.2_06-b03
    user.language     zh
    user.region     <no value assigned>
    user.name     Administrator
    user.home     C:\Documents and Settings\Administrator
    user.dir     E:\OraBPELPM\integration\jdev\jdev\bin
    os.name     Windows 2003
    os.version     5.2
    os.arch     x86
    http.proxyHost     jproxy.nju.edu.cn
    http.proxyPort     8080
    />
    <SQL Server:
    Microsoft SQL Server 2000 with the Microsoft SQL Server 2000 Driver for JDBC Service Pack 3 installed
    />
    By the way, I have read the thread Thread: DB Adapter not importing SQL Svr tables and take some of their advises but the problem still exist.
    Any help would be greatly appreciated.
    Thanks!
    And Merry Christmas to all!

    Hi, ronen!
    Thank you.
    I followed the steps and the there were no exceptions then.
    However, new runtime error emerged.
    The BPEL PM Server cannot build Toplink Session. But I do not know why.
    The messeges from the "Start BPEL PM Server" console about this project (named "TryDB") is as following (DoSelect is the service name of the DB Adapter):
    <::Outbound><oracle.tip.adapter.db.ox.TopLinkXMLProjectInitializer initialize> I
    nitializing an existing toplink project for use by the database adapter.
    <::Outbound><oracle.tip.adapter.db.ox.TopLinkXMLProjectInitializer initialize> I
    nitializing an existing toplink project for use by the database adapter.
    <2006-01-10 16:03:02,656> <INFO> <default.collaxa.cube.compiler> &#27491;&#22312;&#39564;&#35777; "E:\Or
    aBPELPM\integration\orabpel\domains\default\tmp\.bpel_TryDB_1.0.jar\TryDB.bpel"
    <2006-01-10 16:03:05,156> <INFO> <default.collaxa.cube.engine.deployment> <CubeP
    rocessFactory::generateProcessClass>
    &#27969;&#31243; "TryDB" (&#20462;&#35746; "1.0") &#32534;&#35793;&#25104;&#21151;&#12290;
    <2006-01-10 16:03:05,765> <INFO> <default.collaxa.cube.engine.deployment> &#27969;&#31243; "
    TryDB" (&#20462;&#35746;&#26631;&#35760; "1.0") &#24050;&#25104;&#21151;&#21152;&#36733;&#12290;
    06/01/10 16:03:34 Tutalii: E:\OraBPELPM\integration\orabpel\lib\orabpel.jar arch
    ive
    <2006-01-10 16:03:34,500> <INFO> <default.collaxa.cube.ws> <AdapterFramework::Ou
    tbound> file:/E:/OraBPELPM/integration/orabpel/domains/default/tmp/.bpel_TryDB_1
    .0.jar/DoSelect.wsdl [ DoSelect_ptt::DoSelectSelect(DoSelectSelect_inparameters,
    AirlineTableCollection) ] - Using JCA Connection Pool - max size = <unbounded>
    <2006-01-10 16:03:35,093> <ERROR> <default.collaxa.cube.ws> <Database Adapter::O
    utbound> <oracle.tip.adapter.db.DBManagedConnectionFactory acquireClientSession>
    unable to build the TopLink Session
    <2006-01-10 16:03:35,125> <ERROR> <default.collaxa.cube.ws> <Database Adapter::O
    utbound> <oracle.tip.adapter.db.DBInteraction executeOutboundRead> unable to exe
    cute the NamedQuery: TryDB.AirlineTable.DoSelectSelect
    <2006-01-10 16:03:35,125> <ERROR> <default.collaxa.cube.ws> <AdapterFramework::O
    utbound> file:/E:/OraBPELPM/integration/orabpel/domains/default/tmp/.bpel_TryDB_
    1.0.jar/DoSelect.wsdl [ DoSelect_ptt::DoSelectSelect(DoSelectSelect_inparameters
    ,AirlineTableCollection) ] - Could not invoke operation 'DoSelectSelect' against
    the 'Database Adapter' due to:
    ORABPEL-11622
    &#26080;&#27861;&#21019;&#24314;/&#35775;&#38382; TopLink &#20250;&#35805;.
    &#27492;&#20250;&#35805;&#29992;&#20110;&#36830;&#25509;&#21040;&#25968;&#25454;&#23384;&#20648;&#12290;.
    &#26377;&#20851;&#29305;&#23450;&#24322;&#24120;&#38169;&#35823;, &#35831;&#21442;&#38405;&#26681;&#24322;&#24120;&#38169;&#35823;&#12290;&#24744;&#21487;&#33021;&#38656;&#35201;&#22312; j2ee/home/application-deploymen
    ts/default/DbAdapter/oc4j-ra.xml &#20013;&#37197;&#32622;&#36830;&#25509;&#35774;&#32622;&#24182;&#37325;&#26032;&#21551;&#21160;&#26381;&#21153;&#22120;&#12290;&#30001; $J2EE_HOME/a
    pplication-deployments/default/DbAdapter/oc4j-ra.xml &#23548;&#33268;&#12290;
    <2006-01-10 16:03:35,125> <INFO> <default.collaxa.cube.ws> <AdapterFramework::Ou
    tbound> Change logging level for Logger 'default.collaxa.cube.ws' to DEBUG to se
    e full error stack
    <2006-01-10 16:03:35,125> <ERROR> <default.collaxa.cube.ws> <AdapterFramework::O
    utbound> file:/E:/OraBPELPM/integration/orabpel/domains/default/tmp/.bpel_TryDB_
    1.0.jar/DoSelect.wsdl [ DoSelect_ptt::DoSelectSelect(DoSelectSelect_inparameters
    ,AirlineTableCollection) ] - Rolling back JCA LocalTransaction
    And in the Audit part of the BPEL Console, I got the following "details"
    <remoteFault xmlns="http://schemas.oracle.com/bpel/extension">
    <part name="code">
    <code>4003</code>
    </part>
    <part name="summary">
    <summary>file:/E:/OraBPELPM/integration/orabpel/domains/default/tmp/.bpel_TryDB_1.0.jar/DoSelect.wsdl [
    DoSelect_ptt::DoSelectSelect(DoSelectSelect_inparameters,AirlineTableCollection) ] - WSIF JCA Execute of operation
    'DoSelectSelect' failed due to: ????/?? TopLink ??. ?????????????. ; nested exception is: ORABPEL-11622 ????/??
    TopLink ??. ?????????????. ????????, ??????????????? j2ee/home/application-deployments/default/DbAdapter/oc4j-ra.xml
    ????????????????? $J2EE_HOME/application-deployments/default/DbAdapter/oc4j-ra.xml ???</summary>
    </part>
    <part name="detail">
    <detail>??????: ????????? [com.microsoft.jdbc.sqlserver.SQLServerDriver]?</detail>
    </part>
    </remoteFault>
    My oc4j-ra.xml has the following content (SQLServerConnection is the name of the connection of SQL Server database):
    <connector-factory location="eis/DB/SQLServerConnection" connector-name="Database Adapter">
         <config-property name="driverClassName" value="com.microsoft.jdbc.sqlserver.SQLServerDriver"/>
         <config-property name="connectionString" value="jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor;databasename=lxbpel"/>
         <config-property name="userName" value="bpel"/>
         <config-property name="password" value="bpel"/>
         <config-property name="minConnections" value="5"/>
         <config-property name="maxConnections" value="5"/>
         <config-property name="minReadConnections" value="1"/>
         <config-property name="maxReadConnections" value="1"/>
         <config-property name="usesExternalConnectionPooling" value="false"/>
         <config-property name="dataSourceName" value=""/>
         <config-property name="usesExternalTransactionController" value="false"/>
         <config-property name="platformClassName" value="oracle.toplink.internal.databaseaccess.SQLServerPlatform"/>
         <config-property name="usesNativeSequencing" value="true"/>
         <config-property name="sequencePreallocationSize" value="50"/>
         <config-property name="tableQualifier" value=""/>
    </connector-factory>
    I think this configuration in this oc4j-ra.xml is fine
    So please help me again. I owe you so much.
    Thank you!

  • SQL Server 2000 and 2008 Standard Edition

    Hi,
    I was wondering if anyone knows if there are any auditing limitations in the standard editions of SQL server 2000 and 2008 R2.
    I'm interested to know if there are audit functions for user auditing like creation, deletion and logons
    Can't seem to find any information about this.

    In addition to Shanky notes, please  have a look at these article:
    DML Trigger Status Alerts
    Implementing generic audit trail trigger in sql server
    Saeid Hasani [sqldevelop]

  • Null connection when trying to connect to SQL Server 2000 in Tomcat4.1.29

    Hi All,
    I am still struggling with null connection when trying to connect to sql server 2000 with tomcat using sun.jdbc.odbc.JdbcOdbcDriver
    Here is my server.xml
    <Server port="8005" shutdown="SHUTDOWN" debug="0">
    <Listener className="org.apache.catalina.mbeans.ServerLifecycleListener"
    debug="0"/>
    <Listener className="org.apache.catalina.mbeans.GlobalResourcesLifecycleListener"
    debug="0"/>
    <GlobalNamingResources>
    <Resource name="UserDatabase" auth="Container"
    type="org.apache.catalina.UserDatabase"
    description="User database that can be updated and saved">
    </Resource>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    <Resource auth="Container" description="Users and Groups
    Database" name="UserDatabase"
    scope="Shareable"
    type="org.apache.catalina.UserDatabase"/>
    <Resource name="jdbc/DefaultDS" scope="Shareable"
    type="javax.sql.DataSource"/>
    <ResourceParams name="UserDatabase">
    <parameter>
    <name>factory</name>
    <value>org.apache.catalina.users.
    MemoryUserDatabaseFactory</value>
    </parameter>
    <parameter>
    <name>pathname</name>
    <value>conf/tomcat-users.xml</value>
    </parameter>
    </ResourceParams>
    <ResourceParams name="jdbc/DefaultDS">
    <parameter>
    <name>validationQuery</name>
    <value></value>
    </parameter>
    <parameter>
    <name>user</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <parameter>
    <name>maxActive</name>
    <value>4</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:JBoss-SQL://localhost:1433;databaseName=Development;selectMethod=cursor;</value>
    </parameter>
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <parameter>
    <name>maxIdle</name>
    <value>2</value>
    </parameter>
    </ResourceParams>
    </GlobalNamingResources>
    <!-- Define the Tomcat Stand-Alone Service -->
    <Service name="Tomcat-Standalone">
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8080" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="100" debug="0" connectionTimeout="20000"
    useURIValidationHack="false" disableUploadTimeout="true" />
    <!-- Note : To disable connection timeouts, set connectionTimeout value
    to -1 -->
    <!-- Define a SSL Coyote HTTP/1.1 Connector on port 8443 -->
    <!--
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8443" minProcessors="5" maxProcessors="75"
    enableLookups="true"
    acceptCount="100" debug="0" scheme="https" secure="true"
    useURIValidationHack="false" disableUploadTimeout="true">
    <Factory className="org.apache.coyote.tomcat4.CoyoteServerSocketFactory"
    clientAuth="false" protocol="TLS" />
    </Connector>
    -->
    <!-- Define a Coyote/JK2 AJP 1.3 Connector on port 8009 -->
    <Connector className="org.apache.coyote.tomcat4.CoyoteConnector"
    port="8009" minProcessors="5" maxProcessors="75"
    enableLookups="true" redirectPort="8443"
    acceptCount="10" debug="0" connectionTimeout="0"
    useURIValidationHack="false"
    protocolHandlerClassName="org.apache.jk.server.JkCoyoteHandler"/>
    <!-- Define an AJP 1.3 Connector on port 8009 --><Logger className="org.apache.catalina.logger.FileLogger"
    prefix="catalina_log." suffix=".txt"
    timestamp="true"/>
    <!-- Define the default virtual host -->
    <Host name="localhost" debug="0" appBase="webapps"
    unpackWARs="true" autoDeploy="true">
    <Logger className="org.apache.catalina.logger.FileLogger"
    directory="logs" prefix="localhost_log." suffix=".txt"
    timestamp="true"/>
    <Environment name="maxExemptions" type="java.lang.Integer"
    value="15"/>
    <Parameter name="context.param.name" value="context.param.value"
    override="false"/>
    <Resource name="jdbc/DefaultDS" auth="container" type="javax.sql.DataSource"/>
    <ResourceParams name="jdbc/DefaultDS">
    <!-- Maximum number of dB connections in pool.
    Set to 0 for no limit.
    -->
    <parameter>
    <name>maxActive</name>
    <value>8</value>
    </parameter>
    <!-- Maximum number of idle dB connections to retain in pool.
    Set to 0 for no limit.
    -->
    <parameter>
    <name>maxIdle</name>
    <value>4</value>
    </parameter>
    <!-- Maximum time to wait for a dB connection to become available
    in ms, in this example 10 seconds. An Exception is thrown if
    this timeout is exceeded. Set to -1 to wait indefinitely.
    -->
    <parameter>
    <name>maxWait</name>
    <value>5000</value>
    </parameter>
    <!-- MS Sql Server dB username and password for dB connections
    -->
    <parameter>
    <name>user</name>
    <value>sa</value>
    </parameter>
    <parameter>
    <name>password</name>
    <value>sa</value>
    </parameter>
    <!-- Class name for MS Sql Server JDBC driver
    -->
    <parameter>
    <name>driverClassName</name>
    <value>sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    <!-- The JDBC connection url for connecting to MS Sql Server dB.
    -->
    <parameter>
    <name>url</name>
    <value>jdbc:odbc:JBoss-SQL://localhost:1433;databaseName=Development;selectMethod=cursor;</value>
    </parameter>
    <!-- This Databae Connection Pool Description.
    -->
    <parameter>
    <name>description</name>
    <value>JDBC Driver: sun.jdbc.odbc.JdbcOdbcDriver</value>
    </parameter>
    </ResourceParams>
    <Resource name="mail/Session" auth="Container"
    type="javax.mail.Session"/>
    <ResourceParams name="mail/Session">
    <parameter>
    <name>mail.smtp.host</name>
    <value>localhost</value>
    </parameter>
    </ResourceParams>
    <ResourceLink name="linkToGlobalResource"
    global="simpleValue"
    type="java.lang.Integer"/>
    </Host>
    </Engine>
    </Service>
    </Server>
    and my web.xml
    <?xml version="1.0" encoding="UTF-8"?>
    <!DOCTYPE web-app PUBLIC "-//Sun Microsystems, Inc.//DTD Web Application 2.3//EN" "http://java.sun.com/dtd/web-app_2_3.dtd">
    <!-- Standard Action Servlet Mapping -->
    <web-app>
    <resource-ref>
    <res-ref-name>jdbc/DefaultDS</res-ref-name>
    <res-type>javax.sql.DataSource</res-type>
    <res-auth>Container</res-auth>
    </resource-ref>
    </web-app>
    and JBoss-SQL is data source I created from control panel settings and here is way I am retrieving connetion
    InitialContext initCtx = new InitialContext();
    DataSource ds = (DataSource) initCtx.lookup("java:comp/env/jdbc/DefaultDS");
    Connection con = ds.getConnection();
    return con;
    I tried connecting as mentioned in this website
    http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jndi-datasource-examples-howto.html#Common%20Problems.But didn't help
    Please help urgent
    Sorry for long file. Can any one please help me in solving this problem.
    Thanks in advnace
    Kurakula

    I'd recommend that you not use the JDBC-ODBC bridge driver to connect to SQL Server. M$ and jTDS are two free type IV JDBC drivers that you should use instead. Put those JARs in the WEB-INF/lib directory.
    The database URL you're using is not correct if you change drivers. Consult the docs to find out what the proper syntax is.
    MOD

  • Creating a connection pool using SQL Server 2000, Sun ONE Application Serve

    Has any one succesfully configured SQL Server 2000 to work with Sun ONE Application Server 7 on Windows 2000 server service pack 4? I am embarking on a new J2EE project and I need to configure it as soon as possible.
    The problem I am having is that, when I ping the data souce name, there is a connection error.
    I have set the data source name and other details as follows:
    Under JDBC, I have set the parameters for the connection pool as follows:
    Data Source Name:      com.microsoft.jdbc.sqlserver.SQLServerDriver
    Database Name:          jdbc:microsoft:sqlserver://localhost:1433;DatabaseName=Test
    User:               test
    Password:          test
    In the JVM settings page, I have set the prefix class path as follows for the location of the Microsoft JDBC
    drivers that I downloaded as follows:
    c:\microsoft\drivers/lib/msbase.jar
    c:\microsoft\drivers/lib/msutil.jar
    c:\microsoft\drivers/lib/mssqlserver.jar
    Under JVM Options, there is a strange setting which I don't understand: perhaps this is the cause of the
    connction error?
    -Djdbc.drivers=com.pointbase.jdbc.jdbcUniversalDriver
    Please help????

    I'm in a similar boat...
    Trying to setup AS7 JDBC and followed the instructions on the link you provided and get the following exception. I kept the case the same, thinking 'setpassword" was incorrect, so I tried changing the property to "Password", but get the same exception but it points to "setPassword" instead.
    SEVERE: RAR5041:Cannot get jdbc connection
    com.sun.enterprise.repository.J2EEResourceException
    java.lang.NoSuchMethodException: setpassword
    at com.sun.enterprise.repository.JdbcConnectionPool.createDataSource(JdbcConnectionPool.java:243)
    at com.sun.enterprise.resource.JdbcUrlAllocator.createResource(JdbcUrlAllocator.java:80)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.createSteadyResources(IASNonSharedResourcePool.java:856)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonSharedResourcePool.java:416)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:625)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:520)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:263)
    at com.sun.enterprise.resource.JdbcXAConnection.<init>(JdbcXAConnection.java:74)
    at com.sun.enterprise.resource.Jdbc10XaAllocator.createResource(Jdbc10XaAllocator.java:94)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.createSteadyResources(IASNonSharedResourcePool.java:856)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.initPool(IASNonSharedResourcePool.java:416)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.internalGetResource(IASNonSharedResourcePool.java:625)
    at com.sun.enterprise.resource.IASNonSharedResourcePool.getResource(IASNonSharedResourcePool.java:520)
    at com.sun.enterprise.resource.PoolManagerImpl.getResourceFromPool(PoolManagerImpl.java:263)
    at com.sun.enterprise.resource.PoolManagerImpl.getResource(PoolManagerImpl.java:170)
    at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:241)
    at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:98)
    at com.rvi.database.jdbcConnection.getConnection(jdbcConnection.java:93)
    at com.webapp.database.ArticlesDAO.selectByYear(ArticlesDAO.java:102)
    at com.webapp.actions.ArticleAction.list(ArticleAction.java:96)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
    at java.lang.reflect.Method.invoke(Method.java:324)
    at org.apache.struts.actions.DispatchAction.dispatchMethod(DispatchAction.java:280)
    at org.apache.struts.actions.DispatchAction.execute(DispatchAction.java:216)
    at org.apache.struts.action.RequestProcessor.processActionPerform(RequestProcessor.java:484)
    at org.apache.struts.action.RequestProcessor.process(RequestProcessor.java:274)
    at org.apache.struts.action.ActionServlet.process(ActionServlet.java:1482)
    at org.apache.struts.action.ActionServlet.doGet(ActionServlet.java:507)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:740)
    at javax.servlet.http.HttpServlet.service(HttpServlet.java:853)
    at org.apache.catalina.core.StandardWrapperValve.invokeServletService(StandardWrapperValve.java:720)
    at org.apache.catalina.core.StandardWrapperValve.access$000(StandardWrapperValve.java:118)
    at org.apache.catalina.core.StandardWrapperValve$1.run(StandardWrapperValve.java:278)
    at java.security.AccessController.doPrivileged(Native Method)
    at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:274)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:212)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:203)
    at org.apache.catalina.core.StandardPipeline.invoke(StandardPipeline.java:505)
    at com.iplanet.ias.web.connector.nsapi.NSAPIProcessor.process(NSAPIProcessor.java:157)
    at com.iplanet.ias.web.WebContainer.service(WebContainer.java:598)

  • Problem of Teststand3.1 database and microsoft SQL Server 2000 personal edition

    I have a problem when using teststand database function with Microsoft sql server 2000. the error(seen in attached screenshot3.jpg) is:
    "An error occurred calling 'LogResults' in 'ITSDBLog' of 'DBLog 1.0 Type Library'
    An error occurred executing a statement.
    Schema: Generic Recordset (NI).
    Statement: UUT_RESULT.
    [Microsoft][ODBC SQL Server Driver][SQL Server]unable to insert NULL value to column "ID", table "test.dbo.UUT_RESULT";This column is not alowed to be blank. INSERT Failed. Multiple-step OLE DB operation generated errors. Check each OLE DB status value, if available. No work was done.
    [Microsoft][ODBC SQL Server Driver][SQL Server]terminated.
    Source: TSDBLog"
     Here I listed my proceess.
    1, Configure in SQL Sever, please see attached screenshot0.jpg
       a, Open SQL
       b, build a new database with the name of test
       c, import the data from "C:\Program Files\National Instruments\TestStand 3.1\Components\NI\Models\TestStandModels\Database\TestStand Results.mdb"
    2, Configure Microsoft SQL sever: please see attached screenshot1.jpg
       a, Open windows Control Panel and select "Data Sources (ODBC). Under system DSN tab, add a SQL server data source
    3, Configure teststand database option, see attached screenshot2.jpg
       a, configure logging option, enable
       b, configure datalink
       c, select schemas of "Generic recordset (NI)
       d, No change on the tabs of "statements" and "Columns/Parameters"
    4, run an seqence file with the proess model of SequentialModel.Seq.
    Attachments:
    Screenshot.zip ‏425 KB

    Thanks Scott,
      The database function is OK now after I changed imported tables in SQL Sever.
      Actually, I once tried anothor method that you refered by using the scripts
    located at: <TestStand>\Components\NI\Models\TestStandModels\Database\SQL Server Create Generic Recordset Result Tables.sql. Attached is the error screenshots, please help me on this.
    Thanks
    Jacky
    Attachments:
    Error.jpg ‏59 KB

  • Connecting to SQL Server 2000 with MS SQL Server Driver for JDBC

    Hi,
    I am brand new to JDBC . I have installed JDBC driver (for JDBC 2.0) from the Microsoft site and made relevant changes to the class path variable to include the driver paths, as suggested in the driver help documnnts. I have written a simple java code to register. But i get "class NotFound" error.
    here's my code. What am I doing wrong? Thnaks for the help....
    class Test {
         public Test() throws Exception {
              // Get Connection
         //     Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
         DriverManager.registerDriver (new com.microsoft.jdbc.sqlserver.SQLServerDriver());
              Connection conn = DriverManager.getConnection("jdbc:microsoft:sqlserver://SQL1:1433",myuser,mypwd);
              if (conn != null) {
                   System.out.println();
                   System.out.println("Successful Connection");
                   System.out.println();
                   // Meta Data
                   DatabaseMetaData meta = conn.getMetaData();
                   System.out.println("\n Driver Information");
                   System.out.println("Driver Name: " + meta.getDriverName());
                   System.out.println("Driver Version: " + meta.getDriverVersion());
                   System.out.println("\n Database Information");
                   System.out.println("Database Name: " + meta.getDatabaseProductName());
                   System.out.println("Database Version: " + meta.getDatabaseProductVersion());
         } //Test
         public static void main(String [] args) throws Exception {
              Test test = new Test();
    }

    Hi MoD,
    This is the exact command I used for compiling
    C:\>javac -classpath "c:\java;c:\Program Files\Microsoft SQL Server 2000 Driver
    for JDBC\lib\mssqlserver.jar;c:\Program Files\Microsoft SQL Server 2000 Driver f
    or JDBC\lib\msbase.jar;c:\Program Files\Microsoft SQL Server 2000 Driver for JDB
    C\lib\msutil.jar" c:\java\Test.java
    To Execute I used
    C:\>java -classpath "c:\java;c:\Program Files\Microsoft SQL Server 2000 Driver
    for JDBC\lib\mssqlserver.jar;c:\Program Files\Microsoft SQL Server 2000 Driver f
    or JDBC\lib\msbase.jar;c:\Program Files\Microsoft SQL Server 2000 Driver for JDB
    C\lib\msutil.jar" c:\java\Test
    In fact it kept thrwing up the Class Not Found error for the above commands.
    But as U suggested I removed the classpath and executed both javac and java commands without classpath clause , and guess what it worked for the line
    Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
    (i.e., it dint throw any exception like before). So can I assume that driver is successfully registered?
    I tried using Jcreator for compile and run. But I got the same error msg as the commands given above with calsspath caluse. Is there a way around for this to make it work from an external editing tool like Jcreator apart from removing the classpath option from the JDKTool optional setting(doing this did not help for me)
    Also one last favor: How do I connect with the trusted connection option? (i.e. it should use already logged in windows authentification login)
    Thanks for all U'r help. I appreciate it very much.
    Suma

  • When a database is last used in SQL Server 2000.

    Hi,
    Need to create one script by which I can get my any of the database lastly used, which is running on SQL Server 2000 lastly used.
    Lets say if I have 100 databases running on SQL Server 2000, then using one query I can get all the databases last access date.
    I dont want to implement audits because that will give only the result after audit setup.
    Thanks In Advance
    Regards, Ashish Tripathi

    Agree with Erland.
    There is no "column" in sys.databases till now. I would suggest you to vote for this feature.
    https://connect.microsoft.com/SQLServer/feedback/details/659846/database-last-accessed-time
    Balmukund Lakhani
    Please mark solved if I've answered your question, vote for it as helpful to help other users find a solution quicker
    This posting is provided "AS IS" with no warranties, and confers no rights.
    My Blog |
    Team Blog | @Twitter
    | Facebook
    Author: SQL Server 2012 AlwaysOn -
    Paperback, Kindle

  • How to load decimal values into a file using bcp in SQL Server 2000?

    Hi everyone,
    I'm trying to load data from a database table to a text file using bcp on SQL Server 2000. When I'm loading the decimal values, the values before the decimal are not being loaded into the file. How could I load the values before decimals?
    Here are the DDLs and DMLs of what I'm trying to run:
    CREATE TABLE [dbo].[Product_Sales](
    [Year_of_Sale] [smallint] NOT NULL,
    [Product_Type] [varchar](25) NOT NULL,
    [Product_Group] [varchar](25) NOT NULL,
    [Category_Type] [varchar](25) NOT NULL,
    [Category_Group] [varchar](10) NOT NULL,
    [Product_Count] [bigint] NOT NULL,
    [Product_Amount] [decimal](19, 2) NOT NULL,
    [Category_Count] [bigint] NOT NULL,
    [Category_Amount] [decimal](19, 2) NOT NULL,
    CONSTRAINT [PK_Product_Sales] PRIMARY KEY CLUSTERED
    [Year_of_Sale] ASC,
    [Product_Type] ASC,
    [Product_Group] ASC,
    [Category_Type] ASC,
    [Category_Group] ASC
    ) ON [PRIMARY]
    ) ON [PRIMARY]
    INSERT INTO [Yearly_Sales].[dbo].[Product_Sales]
    VALUES(2010, 'Online', 'Web', 'Cameras', 'Electronics', 547, 0.00, 0, 0.00)
    EXEC [master].[dbo].[xp_cmdshell] 'bcp "SELECT * FROM [Yearly_Sales].[dbo].[Product_Sales]" queryout D:\Yearly_Sales\Product_Sales.dat -c -T -S'
    And the output I see in the file is:
    2010 Online Web Cameras Electronics 547 .00 0 .00
    The values before decimals are being truncated.
    Thanks,
    Bangaaram
    Known is a DROP, Unknown is an OCEAN.

    You can modify the decimal column(s) in the table to varchar type before export. But it does not look good.
    alter table [dbo].[Product_Sales]
    Alter column [Product_Amount] varchar(20)
    alter table [dbo].[Product_Sales]
    Alter column [Category_Amount] varchar(20)
    Does that make any sense?
    Known is a DROP, Unknown is an OCEAN.
    Basically you modify the decimal column to a varchar type before you run the bcp command for export. You can modify your source table or you can modify them on the fly. It is just a workaround.
    Modifying the source wouldn't be a good idea. Never do that if you can't get your desired output.
    Known is a DROP, Unknown is an OCEAN.

  • Storing Unicode data in SQL Server 2000

    hello,
    I'm currently developing a website which must store Cyrillic characters in a SQL Server 2000 database. I know the database can store the data correctly because when I use the MS Front end to connect to the database I am able to copy/paste the text into the database columns correctly.
    Retrieving the data from the database also works correctly and is displayed with the correct characters.
    The problems I am having is that the text seems to get garbled during the SQL insert by the database driver. If I print out the SQL just before it is inserted the characters are still correct but once they get into the database they are wrong. I'm using the JDBC drive to connect to the database.
    Any help would be appreciated,
    Alan

    I change the way I was storing the data from using unicode to getting the char values of each letter (ie \u1041 for &#1041;) and storing them in the database. Then I parse the numbers when I bring them back out and combine them into the original String

Maybe you are looking for