SQL Server 2000 - Before Commiting the transaction.
Hi All,
I am using CF7 along with SQL Server 2000.
And I am in a situation where I need to update some set of data to make sure that the changes are getting reflected in the front end.
My approach is like, trying some update statements inside "Begin Tran" block.
It goes like this,
begin tran
update table1 set field1='value' where cond='condition';
And I am just refreshing my application (in the browser). But unusually it takes a bit time to load, and no records are being pulled out after that..
My question is, do I need to perform a "Commit" to avoid this hanging kinda behaviour?.
Any ideas?.
I'm not sure I fully understand your issue, but I suspect that you will need to commit the transaction before that changes will be available to your web site. If your changes are in one UPDATE statement a transaction isn't usually required since this is a single statement. Database transactions are intended to group multiple SQL statements into a single block so that all changes will succeed or all will fail.
Please post your CF and SQL code and the steps to re-create your issue.
Similar Messages
-
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. -
Has anybody used the microsoft JDBC 2.0 driver for sql server 2000?
Hi,
Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from the
microsoft website?When I try using it with WL 6.1 sp1 it says it can't load the
driver.I try viewing the class file from the jar file using the jar utility it
gives an unknown Zip format error.Anybody has any solution for this ?If anybody
has managed to work with this microsoft driver i will be grateful if they provide
me with a solution.
Thanks
ThomasHello Thomas,
You may want to download the driver again and install it again.
heres a sample xml tag in the config.xml:
<JDBCConnectionPool
DriverName="com.microsoft.jdbc.sqlserver.SQLServerDriver"
InitialCapacity="3" MaxCapacity="12" Name="MSpool"
Password="{3DES}fUz1bxR0zDg=" Properties="user=uid"
Targets="myserver"
URL="jdbc:microsoft:sqlserver://mydbserver:1433"/>
ensure that you follow the instructions from Microsoft. For using 2000
driver you will need to have
Install_dir/lib/msbase.jar and Install_dir/lib/msutil.jar in addition to
Install_dir/lib/mssqlserver.jar in the CLASSPATH.
hth
sree
"Thomas" <[email protected]> wrote in message
news:3c91ec0e$[email protected]..
Hi,
Has anybody used the JDBC 2.0 driver for sql server 2000 downloadable from
the
microsoft website?When I try using it with WL 6.1 sp1 it says it can't load
the
driver.I try viewing the class file from the jar file using the jar utility
it
gives an unknown Zip format error.Anybody has any solution for this ?If
anybody
has managed to work with this microsoft driver i will be grateful if they
provide
me with a solution.
Thanks
Thomas -
Sql server 2000 connection error
Hi everyone ,
I am trying to connect Sql server 2000 using ODI and trying to pass the parameters.
com.microsoft.jdbc.sqlserver.SQLServerDriver
jdbc:microsoft:sqlserver://localhost:1433;SelectMethod=cursor;databaseName=Northwind;integratedSecurity=false
username : sa
password : *******
error :
connection failed
com.sunopsis.sql.c: com.microsoft.jdbc.sqlserver.SQLServerDriver
can some one help me to make it worked out especially enabling IPaddress in Sql server 2000. both for the Server and network utility have 1433 as the port for tcp/ip .
ThanksFirstly, this message normally means that you do not have the JAR files for the driver in your classpath. The classpath is created dynamically at startup of the ODI process, so the jar needs to be in the drivers directory before you start.
Second, even if you are using SQL Server 2000, the recommendation is to use the SQL Server 2005 driver, available from the Microsoft site (http://msdn.microsoft.com/en-us/data/aa937724.aspx). It is much more capable and reliable. Note that you will need to use a different Driver name, and the URL format is also slightly different.
Driver: com.microsoft.sqlserver.jdbc.SQLServerDriver
URL: jdbc:sqlserver://[serverName[\instanceName][:portNumber]][;property=value[;property=value]] -
Executing interface for a SQL Server 2000 target
Hi All,
I am trying doing some initial experimentation with ODI, in executing its interface in compiling a SQL Server 2000 target from the same source.
I designed an interface with Source and target having only one column, inserted some sample data for the source data store and left the target empty. After reversing the source and target data models, created an interface and inserted source and target datastores and active mapped the existing column. In the flow tab, I am using LKM MSSQL to MSSQL(Linked Servers) and IKM MSSQL Incremental Update and rectified Flow Control to 'No' as I dont have any keys in my structure. I am using CKM SQL, though no necessity of it, and also tried with LKM MSSQL to MSSQL(BCP), but could not correct the error when executing this interface.
It is not indicating any errors in diagram. In the Operator this is what is the message:
1038 : S0003 : com.microsoft.sqlserver.jdbc.SQLServerException: Cannot use empty object or column names. Use a single space if necessary.
com.microsoft.sqlserver.jdbc.SQLServerException: Cannot use empty object or column names. Use a single space if necessary.
at com.microsoft.sqlserver.jdbc.SQLServerException.makeFromDatabaseError(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.getNextResult(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.doExecutePreparedStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement$PrepStmtExecCmd.doExecute(Unknown Source)
at com.microsoft.sqlserver.jdbc.TDSCommand.execute(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerConnection.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeCommand(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerStatement.executeStatement(Unknown Source)
at com.microsoft.sqlserver.jdbc.SQLServerPreparedStatement.executeUpdate(Unknown Source)
at com.sunopsis.sql.SnpsQuery.executeUpdate(SnpsQuery.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.execStdOrders(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTaskTrt(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSqlC.treatTaskTrt(SnpSessTaskSqlC.java)
at com.sunopsis.dwg.dbobj.SnpSessTaskSql.treatTask(SnpSessTaskSql.java)
at com.sunopsis.dwg.dbobj.SnpSessStep.treatSessStep(SnpSessStep.java)
at com.sunopsis.dwg.dbobj.SnpSession.treatSession(SnpSession.java)
at com.sunopsis.dwg.cmd.DwgCommandSession.treatCommand(DwgCommandSession.java)
at com.sunopsis.dwg.cmd.DwgCommandBase.execute(DwgCommandBase.java)
at com.sunopsis.dwg.cmd.e.i(e.java)
at com.sunopsis.dwg.cmd.h.y(h.java)
at com.sunopsis.dwg.cmd.e.run(e.java)
at java.lang.Thread.run(Unknown Source)
Moreover in the command prompt it is indicating SQL Server Exception: Cannot invoke a rollback operation when the autocommit mode is set to true.
Please help me out in executing this interface, all help is greatly appreciated.
Many Thanks!!!Hi Rathish,
In the query it is indicating that 'It is creating view on target'. This is the step that is causing trouble.
Query description is :
create view dbo.C$_0City_Trg
as
select *
from [].odi_work.dbo.City_Trg
Thanks in Advance!!! -
Workarounds for searching a text field in SQL Server 2000
Hi,
I have a need to search within a text field in SQL Server 2000. In the
limitations section it notes that this is not possible. Is there a
recommended workaround for this in terms of performance? I have no way
of knowing the length of the text field in advance, and this could be
fairly large. Also, the number of objects that could contain the text
can be fairly large as well.
Thanks in advance,
KhamsoukNote that some databases (or Oracle, at least) provide alternatives to
LIKE '%foo%' that are more efficient for large text blocks, given that
you have the appropriate indexing plugins etc. etc.
To use one of those types of search operators, you'd have to put
together a custom extension.
-Fred
Fred Lucas <[email protected]> wrote:
I'm assuming that when you say 'a text field', you're referring to a
SQLServer TEXT field, as opposed to just any old field that contains
text.
Like I said, I'm by no means a SQLServer pro, but I just ran:
SELECT CLOBSTRINGX
FROM LOCATORTESTOBJECTX
WHERE CLOBSTRINGX LIKE '%o%';
and got back my test row with 'foo' in the CLOBSTRINGX column.
CLOBSTRINGX is a TEXT column.
So, it is possible that our stringContains() extension will just work.
But then again, maybe not. I'm guessing it will.
Give it a try and, if you get an error, post the generated SQL (turn on
SQL output by setting the com.solarmetric.kodo.Logger property to
'stdout') and the error that you get. Also, try executing the generated
SQL directly against your data store to see if it works there.
-Fred
Khamsouk Souvanlasy <[email protected]> wrote:
Basically I just want to use kodo's extended stringContains syntax on a
text field. Is this possible?
Khamsouk
Fred Lucas wrote:
I'm not intimitely familiar with SQLServer's text searching
capabilities, but I'm confident that you could create a query extension
that would do what you need it to do.
What is the SQL that you are trying to generate?
-Fred
Khamsouk Souvanlasy <[email protected]> wrote:
Hi,
I have a need to search within a text field in SQL Server 2000. In the
limitations section it notes that this is not possible. Is there a
recommended workaround for this in terms of performance? I have no way
of knowing the length of the text field in advance, and this could be
fairly large. Also, the number of objects that could contain the text
can be fairly large as well.
Thanks in advance,
Khamsouk
Fred Lucas
SolarMetric Inc.
202-595-2064 x1122
http://www.solarmetric.com -
I installed the Jdbc driver for sql server 2000 and set the classpath. When when I was trying to
connect to the sql server database from a java program, I kept getting the following error;
There was an error connecting to the DataSource: java.sql.SQLException: [Microsoft][SQLServer 2000 Driver for JDBC][SQLServer]Login failed for user 'jet123'. Reason: Not associated with a trusted SQL Server connection.
The whole scenario is like this:
I have a sql server 2000 installed in my windows 2000 machine, and I created a MISM\myBase server under the SQL Server group, where MISM is the name of my machine, and myBase is the name of the sql server. Under the MISM\myBase server I created a database named "Aromatherapy". I added new login(username:jet123, passwd:1001) to the MISM\myBase server and also added user jet123 to the Aromatherapy database. The login(jet123, 1001) is my user name and passwd to my windows machine and has the administrator privillege.
Here is the code:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection connection = DriverManager.getConnection("jdbc:microsoft:sqlserver://128.2.76.102:1433;databasename=Aromatherapy;user=jet123;password=1001");
Could anyone help?
Thanks,
Davidmake sure that user jet123 access to the sql server used by ms-sql queryanlayzer
not?
first check if your sql authentication mode is windows and sql server
or, allow the permistion to jet123 to access the database, by ordinary to be db_owner. -
Using Report Creator and SQL Server 2000
I am attempting to make some prompts and such using the report designer, and after connecting to my SQL Server 2000 DBMS using the SQL native Client as nothing else works, when i try to make a prompt based of a DB field, it does not populate... also when I verify the database it says that it cannot find the tables, but if I put one of the fields on the report, the data is displayed, I can also browse the data while creating the report as well...
Any ideas how to fix this?
Josh Fink
[email protected]Add the tables and then remove those that are not required. Knowledge of the database is required.
-
SQL Server 2000 database GETDATE() default for field
I have a SQL Server 2000 database where the createDate field
has a default value of GETDATE() and the data type is datetime. It
is inserting the date just fine, but I do not want to capture the
time along with the date. I only want the date to be entered. How
can I accomplish this? Thanks!IF you only wanted to store the date, then yes you would use
that as the column default value.
createDate datetime default convert(datetime,
convert(varchar, getDate(), 102), 102)
However, as paross1 cautioned be sure you understand you will
only be capturing the date from now on. If you change your mind
later, and decide you need both the created date and time, you will
be seriously out of luck. A safer choice might be to keep the date
and time, and use convert in your queries instead. -
I am working on application integration, and one application resides in an Oracle 8.0.5 database and the other is in a Microsoft SQL Server 2000 database. The question I have is that I am trying to create a database link within the Oracle database that points to the SQL Server database. How do I accomplish this?
i think you need to have oracle gateway
transparent layer inorder to connect to non oracle db and then u can have database link pointing to sqlserver.
<BLOCKQUOTE><font size="1" face="Verdana, Arial, Helvetica">quote:</font><HR>Originally posted by Judson Plapp ([email protected]):
I am working on application integration, and one application resides in an Oracle 8.0.5 database and the other is in a Microsoft SQL Server 2000 database. The question I have is that I am trying to create a database link within the Oracle database that points to the SQL Server database. How do I accomplish this?<HR></BLOCKQUOTE>
null -
JDBC for Microsoft SQL Server 2000
Hello,
I have installed Microsoft SQL Server 2000 to establish a connection with JDK 1.4.1 and run the following code:
import java.sql.Connection.*;
import java.sql.*;
public class Connect
private java.sql.Connection con = null;
private final String url = "jdbc:microsoft:sqlserver://";
private final String serverName= "localhost";
private final String portNumber = "1433";
private final String databaseName= "cbi";
private final String userName = "sa";
private final String password = "";
// Informs the driver to use server a side-cursor,
// which permits more than one active statement
// on a connection.
private final String selectMethod = "cursor";
// Constructor
public Connect(){}
private String getConnectionUrl()
return url+serverName+":"+portNumber+";databaseName="+databaseName+";selectMethod="+selectMethod+";";
private java.sql.Connection getConnection()
try
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
con = java.sql.DriverManager.getConnection(getConnectionUrl(),userName,password);
if(con!=null)
System.out.println("Connection Successful!");
catch(Exception e)
e.printStackTrace();
System.out.println("Error Trace in getConnection() : " + e.getMessage());
return con;
Display the driver properties, database details
public void displayDbProperties()
java.sql.DatabaseMetaData dm = null;
java.sql.ResultSet rs = null;
try
con= this.getConnection();
if(con!=null)
dm = con.getMetaData();
System.out.println("Driver Information");
System.out.println("\tDriver Name: "+ dm.getDriverName());
System.out.println("\tDriver Version: "+ dm.getDriverVersion ());
System.out.println("\nDatabase Information ");
System.out.println("\tDatabase Name: "+ dm.getDatabaseProductName());
System.out.println("\tDatabase Version: "+ dm.getDatabaseProductVersion());
System.out.println("Avalilable Catalogs ");
rs = dm.getCatalogs();
while(rs.next())
System.out.println("\tcatalog: "+ rs.getString(1));
rs.close();
rs = null;
closeConnection();
else
System.out.println("Error: No active Connection");
catch(Exception e)
e.printStackTrace();
dm=null;
private void closeConnection()
try
if(con!=null)
con.close();
con=null;
catch(Exception e)
e.printStackTrace();
public static void main(String[] args) throws Exception
Connect myDbTest = new Connect();
myDbTest.displayDbProperties();
but, I received the error that ClassNotFoundException: com.microsoft.jdbc.sqlserver.SQLServerDriver, No active Connection.
I added the 3 .jar files msbase.jar,mssqlserver.jar and msutil.jar to the System variables but it is not working. Is there any syntax for adding these .jar files to the System Variables?
Please, help me and give me the solution for establishing the connection and loading the driver class. If I am doing anything wrong then please, tell me the right step.
I am developing a project on Java and I have very little time left to accomplish it. Please help me.
Thankyou.I had already given the .jar files to the User variables and System Variables but the driver class is still not loading. I had simply given the .jar file name for instance, msbase.jar;mssqlserver.jar;msutil.jar and also tried the path of .jar files i.e., C:\Microsoft SQL Server\-----------\lib\msbase.jar;C:\-------------lib\mssqlserver.jar;C:\----------------\lib\msutil.jar; but, both ways are not working. When I installed the MS SQL Server 2000 then in the lib folder, the 3 JAR files were not installed then, I downloaded a driver for MS SQL Server 2000 Driver for JDBC sp2, then, the JAR files were installed. Then, I copied those files to the lib folder of MS SQL Server and gave that path to the User and System Variables but it didn't work then I gave the original path of files where they are installed i.e., of the Driver's path which I downloaded from Microsoft but still now, my problem is not solved. Please help me.
-
Basic Deployment problem, SQL Server 2000 and wanna create setup
I have just finished making a small app using Java and using JDBC driver to connect to an SQL Server 2000 that is installed on my PC.
I now want to create a setup (using NSIS) of this app and distribute among friends. But my problem is that I have created the database on my PC on the SQL Server 2000. Do all the people who want to use my app have to have Sql Server 2000 installed ?? How do they get the data from the database if they dont have Sql Server installed??
I really havent tried much of apps that use databases...soo dont know much, but then any help would be appreciated!!They have to connect to an instance of SQL Server 2000 that has the database and schema that your app requires, so the host machine has to be visible in their network, with SQL Server installed, listening on the port in your URL connection string (default is 1433), with a username and password that you've set up for a user with the appropriate permissions GRANTed.
As you can see, it's not trivial.
If all the people you're distributing the program to can see your machine's IP address, they can simply connect to your database.
If not, you should provide all the scripts necessary to create the database and create the tables, set up the permissions, and populate the data.
% -
Error Establishing Socket with SQL Server 2000
I have a java application that uses JDBC to connect to a source of data.
The application has been installed on many platforms using many different data sources, but one combination has beaten me.
I am using Windows Server 2003 and SQL Server 2000 Enterprise, when the application starts up it fails to connect to the database with the following message:
[Microsoft][SQL Server 2000 Driver for JDBC] Error Establishing Socket
I have looked at a lot of forums and tried many things but nothing has fixed the problem for me:
To summarise:
The URL I am using is jdbc:microsoft:sqlserver://locahost:1433
I have also tried using the name of the machine and it's actual IP address
I have checked that TCP/IP is enabled and using the correct port (1433)
Both SQL Server and Windows authentication are enabled and I can connect using both method from ODBC
I can connect to it and use it with c#.net, vb.net and ODBC from the same machine
I have installed the latest SQL Server 2000 service pack
The application works with SQL Server 2000 Developer on Windows XP
If anyone has any other suggestions, I would love to hear from you.If you printed out the SQL state and error code that would be a bit more info:
catch (SQLException e)
e.printStackTrace();
System.err.println("SQL state: " + e.getSQLState());
System.err.println("SQL error: " + e.getErrorCode());
}Maybe that will give you more detail as to exactly why this is happening.
The only other thought I had was security. Maybe there's a permission to access the port that would have to be granted explicitly as part of M$'s new emphasis on security. You did say it was Windoze Server 2003. Maybe that's the difference between all the other installs and this one.
No joy from me, sorry. - MOD -
Access denial on connecting SQL server 2000 with Microsoft JDBC driver
Hi guys,
I am developping a BMP invoking procedures stored in a SQL server 2000 instance on the Sun RI platform. I am using the Microsoft type 4 JDBC driver.
the connection pattern is something like
jdbc:microsoft:sqlserver://ambassador:1433;User=sa;Password;DataBase=Forethought;SelectMethod=cursor
An type-like "access denied" exception is raised when trying to get the connection from the DataSource object with some code similar to :
DataSource objDS = (DataSource)objCtx.lookup("jdbc/Forethought");
Connection objConn = ds.getConnection();
I have realised a CMP to access the database and everything works fine.
It seems that the SunRI tries to get the db connection with an "impersonated " user even if i have specified the user name and password in the connection string.
Does anyone have an idea how to force the connection with SQL Server user name and password ??I come accorss the same problem too,
my URL jdbc:microsoft:sqlserver://ambassador:1433;User=sa;Password=123;DatabaseName=pubs
and the password is right.I can establish connection to SQL server 2000 by JDBC Driver Manager,the code as follow:
Class.forName("com.microsoft.jdbc.sqlserver.SQLServerDriver");
Connection conn = DriverManager.getConnection
("jdbc:microsoft:sqlserver://localhost:1433;User=sa;Password=123"); -
How to reduce transaction log in SQL Server 2000
Dear All gurus/experts,
I need your help. The problem is that the time to take to reduce transaction log in SQL server 2000 when I use shrink method. Are there another way to do that beside shrink database (right click : all tasks --> shrink database) ?
I appreciate your answers. TIA
Rgds,Hi Steve,
Is this for a test system or a production system?
For a test system, as per Ad's post, setting the recovery model to simple should do the trick.
For a production system, I'd recommend you leave the recovery model at full and set up transaction log backups. This will keep the log file at a reasonable size and you will gain point in time recovery (eg if you back up the logs on an hourly basis, you can recover the database to the last log backup, meaning you would never lose more than an hour's work).
Kind Regards,
Owen
Maybe you are looking for
-
File Adapter - anonymous login (or )User name ,password login - Efficient?
Hi Folks, In File Adapter processing , anonymous login (or) proper user name password based login is recommended ? Because we have faced many issue while using username based login in File adapter . Which one is best ? Regards., Shiva
-
TS1424 i tunes is lock or on a disk i get this error any help?
i get this error i tunes libary is lock can not access help?
-
Hi, we are going to upgrade our DI 11.7.3 to DS3 - 12.2.3.3 in Sep. I found out there are different ways to upgrade the local repository from the SAP doc and tech support. I try to find a best and safe way to do it. If anyone had experince and inputs
-
I am experiencing a problem with the quality of the jpegs I get when exporting from Aperture. What I want to do is export adjusted NEF files to jpeg at the highest quality but at a reduced size to fit within 950x950. I have a preset arranged and the
-
Compiled JSPs With Jasper - Now Includes don't work
I am using a template page (index.jsp) that includes other jsp pages to fill the body of the page. Previously, I had my index.jsp page as the root document and the other jsp's in a 'jsp' subfolder. To include the other jsp's, I was using hyperlinks l