JDBC Connecting To Sqlserver2005 Problem
Oct 10, 2006
Hi,
I am trying to connecting Eclipse to SQLserver2005 on Win2000, and the driver I use is JDBC.
My problem is: No matter what kind of authentification I try, it always throws out the exception of:
The user is not associated with a trusted SQL Server connection.
I tried 2 ways for connection: one is the windows, and another is Sql server authentification
To the window authentification, I appended Trusted_Connection=yes to the URL, and omit the user and password fields, and it failed. But even I used the user and password options, it didn't work, either.
To the Sqlserver authentification, I tried with the user and password, but it failed. Before that, I also added the user account in the Security option and for the specified Database.. while failed again.
And also for example:
when using the windows authentification, I tried this:
String SERVANDDB ="jdbc:sqlserver://localhost:1433;DatabaseName=TestDB;Trusted_Connection=Yes";
....
con = DriverManager.getConnection(SERVANDDB);
This throw the exception of user' ' is not a trust_connection....blabla
when using the sqlserver authentification, I tried like this:(the user ABC is assigned authority to database TestDB)
String SERVANDDB ="jdbc:sqlserver://localhost;DatabaseName=TestDB";
String USER = "ABC";
String PWD = "CBA";
con = DriverManager.getConnection(SERVANDDB, USER,PWD);
(The server is runing on my computer)
Thank you.
View 3 Replies
ADVERTISEMENT
Jan 4, 2007
May I use the JDBC driver of SQLServer2000 to access SQLServer2005??
View 3 Replies
View Related
Feb 11, 2008
i have a Vb application on an client pc that has to connect with a sql databse file on the server.
the connection string is :
connectionString="Data Source=<servername>SQLEXPRESS,1433;Initial Catalog=TBSD.mdf; User Id=sa;Password=sa;integrated security=false;" />
</connectionStrings>
if i run the application i get the error message : "login failed for user 'sa'.
If i try to connect remotely to sql server express with sql server managment studio express i can connect without any problems.
is this a security problem ?
View 5 Replies
View Related
Jul 20, 2005
Hello to all,I am using windows 2000 and i want to connect to ms sql server withjdbc type 4 driver.can you give me sample code and few tips to get me through this.,thank you in advance,vishnu.
View 2 Replies
View Related
May 24, 2006
Hi,
I've found problems when executing
Class.forName("com.microsoft.sqlserver.jdbc.SQLServerDriver");
I get a java.lang.ClassNotFoundException, and I have done this steps:
1º I got the driver from msdn web page
2º I modified the classpath in Windows XP adding the path to the sqljdbc.jar, testing if there was any problems with blanks in the path, I tried to put the .jar file in a more simple folder, but it didn't work.
Perhaps I've to do something whith my policy.java or so archives to let applets do something about this but I have no idea.
Can someone help me? Thanks!
View 6 Replies
View Related
Jun 18, 2007
Hello,
I am developing an application which needs JDBC connection to a Named Instance of SQL Server 2000 (other than default instance). I am facing problem in this regard as my code gives an exception "Time Out" or "Connection Failed". However it works fine with the default named instance...The main driver class is "com.microsoft.sqlserver.jdbc.SQLServerDriver"
and Connection URL is
"jdbc: sqlserver://localhost;instanceName=Testing:1432;databaseName=testDB;"
It gives the exception that Unable to connect to named instance....
Please if any one have any knowledge in this regard....do let me know....I have read an article on MSDN according to which on MS SQL Server 2000 the named Instance other than default can be accessed only through named pipes.
http://msdn2.microsoft.com/en-us/library/aa224779(sql.80).aspx
if some body can tell me Connection string for JDBC driver which utilizes named pipes...the it will be very help full for me.........any help from MSDN Experts is really appreciated...
Thanks
View 4 Replies
View Related
May 12, 2007
hi
COMPUTER-1
IP ::::: 129.100.100.5
COMPUTER NAME IS ::::: HASH
MEMBER OF DOMAIN
in this computer sqlserver express edition is installed, i want to remove this express becoz in configuration manager it show two SQLSERVER'S are running. when i browse from COMPUTER - 2 for network servers it show server name as HASH/SQLEXPRESS, but not the main SQLSERVER.
COMPUTER -2
IP::::129.100.100.142
COMPUTER NAME::: FEROZ
MEMBER OF WORKGROUP
can anyone help me how to connect these two computers and remove this express edition
iam new to sqlserver configuration
thanks in advance
waiting for eager reply
View 1 Replies
View Related
Apr 14, 2008
I have read similar posts to this, but I am still having problems.
I am trying to use connection pooling to connect to a local SQL Server 2005 database. I am running my application using
MyEclipse Enterprise Workbench. I have verified that sqljdbc.jar resides in "WebRoot/WEB-INF/lib/"
"WebRoot/WEB-INF/web.xml":
<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.4" xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsichemaLocation="http://java.sun.com/xml/ns/j2ee
http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<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>
"WebRoot/META-INFcontext.xml":
<?xml version="1.0" encoding="UTF-8"?>
<Context>
<Resource name="jdbc/DefaultDS"
auth="Container"
type="javax.sql.DataSource"
username="tec"
password="tec"
driverClassName="com.microsoft.sqlserver.jdbc.SQLServerDrive"
url="jdbcqlserver://localhost:1433/tec;databaseName=tec;user=tec;password=test;"
validationQuery="select 1"
maxActive="10"
maxIdle="2"/>
</Context>
Classpath:
<?xml version="1.0" encoding="UTF-8"?>
<classpath>
<classpathentry kind="src" path="src"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="com.genuitec.eclipse.j2eedt.core.J2EE14_CONTAINER"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/dom.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxen-full.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jaxp-api.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jdbc2_0-stdext.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/sqljdbc.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jstl.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mail.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/sax.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/saxpath.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/standard.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/xalan.jar"/>
<classpathentry kind="lib" path="WebRoot/WEB-INF/lib/xercesImpl.jar"/>
<classpathentry kind="output" path="WebRoot/WEB-INF/classes"/>
</classpath>
Code to connect:
import java.io.Serializable;
import java.sql.*;
import javax.sql.*;
import javax.naming.*;
public int testConnect(){
Connection conn = null;
InitialContext ctx = null;
java.sql.Statement stmt = null;
try {
ctx = new InitialContext();
Context envCtx = (Context) ctx.lookup("java:comp/env");
DataSource ds = (DataSource) envCtx.lookup("jdbc/DefaultDS");/*This is generating the Cannot load JDBC driver class... error*/
conn = ds.getConnection();
stmt = conn.createStatement();
return CONSTANT.SUCCESS;
} catch (Exception e) {
return CONSTANT.FAILURE;
}finally {
try {
if (stmt != null)
stmt.close();
if (conn != null)
conn.close();
if (ctx != null)
ctx.close();
} catch (Exception ex) {
// do nothing
return CONSTANT.FAILURE;
}
}
}
Any ideas would be greatly appreciated.
View 17 Replies
View Related
Aug 8, 2006
Hi all,
We've just stumbled on a 1.0 version incompatibility with the JDBC specs.
Problem: A table with SMALLINT column. According to JDBC specs version 3.0
(p.B-179) and 4.0 (p.221)), the value should be converted to Integer type.
Unfortunatelly we get a Short object :(
Now, I remember, this case was also affecting old JSQLConnect driver from
DataDirect. Could that problem sneak to new MS driver too?
Please let me know any resolution to this problem if exists.
The issue has not been fixed in CTP 1.1 version. Any ideas if it can be fixed??
Cheers,
Piotr
View 1 Replies
View Related
Mar 12, 2008
I've got an import app written in Java. One table I'm importing from contains 22 million records. When I run the app in a 2000 environment, I have my max heap set at 512, and the table gets imported. When I run in a 2005 environment, I have to change the max heap to 1152 or it will error out with a similiar error:
com.microsoft.sqlserver.jdbc.SQLServerException: The system is out of memory. Use server side cursors for large result sets:Java heap space. Result set size:854,269,999. JVM total memory size:1,065,484,288. (<--this is with max heap at 1024)
what is the difference between the 2000 and 2005 JDBC that I have to set max heap in one and not the other?
View 3 Replies
View Related
Feb 9, 2006
hie
can i use sql server 2005 along with asp.net 1.1 as my front end ?
any idea of doing this ?
View 1 Replies
View Related
May 21, 2007
I have implemented a caching strategy using the sqlcachedependency and sql server 2005 backend using the broker service.This works fine and well when i am connecting to the SQL Server 2005 under service account that is in the role db_owner. In a production enivironment i am reluctant to do this so i created another service account that only has execute permissions on the stored procedures.When i use this limited service account for my ASP.net web application, the broker service does not send any messages to the web app to invalid the cache. When checking the event log and SQL profiler i get errors all relating to the user not having access to the SqlQueryNotificationService queue. So i did a lot of googling and tried running the grant scripts below with no luck using this limited service account. Keep in mind everything works fine if i use an account with db_owner priviledges. These are the grants i have tried based on numerious articles GRANT CREATE PROCEDURE TO three_d_ss_loginGRANT CREATE QUEUE TO three_d_ss_loginGRANT CREATE SERVICE TO three_d_ss_loginGRANT SUBSCRIBE QUERY NOTIFICATIONS TO three_d_ss_loginGRANT RECEIVE ON QueryNotificationErrorsQueue TO three_d_ss_loginGRANT REFERENCES ON CONTRACT::[http://schemas.microsoft.com/SQL/Notifications/PostQueryNotification] TO three_d_ss_login These are the grants i have tried that does not work GRANT SEND ON SERVICE::SqlQueryNotificationService TO three_d_ss_loginGRANT RECEIVE on SqlQueryNotificationService_DefaultQueue to three_d_ss_loginCan some one suggest what i need to do to get sqlcacheddependencies to work with a sql2005 backend under a limited priviledged service account? ThanksJim
View 4 Replies
View Related
Nov 22, 2006
I have the following XML in an XML column in a SQL 2005 Database.<DeliveryList xmlns="http://schemas.adventure-works.com/DeliverySchedule"><Delivery SalesOrderID="43659"><CustomerName>Steve Schmidt</CustomerName><Address>6126 North Sixth Street, Rockhampton</Address></Delivery><Delivery SalesOrderID="43660"><CustomerName>Tony Lopez</CustomerName><Address>6445 Cashew Street, Rockhampton</Address></Delivery></DeliveryList>I need to query that column using the value method to retreive the addressof the first delivery. I come up with this,SELECTDeliveryList.value('data((/DeliveryList/Delivery/Address)[1])','nvarchar(100)')DeliveryAddressFROM Sales.DeliverySchedulebut it tells meXQuery [Sales.DeliverySchedule.DeliveryList.value()]: There is no elementnamed 'DeliveryList'I have tried every permutation of the path and I can not seem to get it towork? Any ideas?
View 2 Replies
View Related
Feb 9, 2007
hi,
I'm using custom authorization in reporting services 2000 to restrict the users. To do this we created a dll customauthorization.dll and placed it in reportserver bin folder and performed changes in rsreportserver.config, rssrvpolicy.config, and web.config files. Now its time to upgrade our servers to SQLServer 2005. Now in SQLServer2005 what new enhancements were done with respect to security and what all extra steps should i follow to perform the upgradation with custom authorization. Please give me suggestions how to upgrade my reports to SQL2005 so that my custom authorization still works.
waiting for ur valuable inputs
uday
View 1 Replies
View Related
Jul 18, 2006
Hello,I installed sqlserver2005_express on my PC (localhost) and I try to execute a sql query with ASP.NET.Here's my page :Dim mySqlConnection as SqlConnection = new SqlConnection("server=JOE10155SQLEXPRESS;Trusted_Connection=yes;UID=sa;PWD=xxxx;database=xxxx") Dim mySqlDataAdapter as SqlDataAdapter = new SqlDataAdapter("SELECT * FROM Entreprise WHERE (EntrepriseNr =999)", mySqlConnection) Dim myDataSet as DataSet = new DataSet() mySqlDataAdapter.Fill(myDataSet,"Entreprise")The problem is :System.Data.SqlClient.SqlException: Autorisation SELECT refusée sur l'objet 'Entreprise', base de données 'xxxx', schéma dbo'.if someone have an idea?
View 1 Replies
View Related
Feb 23, 2008
hello,
What are the requirements to install sqlserver2005 in my pc.I am using windows xp sp2 in my pc.
One of my friend said, windows server2003 is compulsory(to get data base functionality in sqlserver 2005 and other features) in local pc .Is it correct?
And i am not getting database features in xp sp2.
Can any one help me?
View 2 Replies
View Related
Apr 9, 2008
hello everyone
i have created a table in sqlserver2005 named "Departments" - in this table different departments of a telephone ( landline ) company are to be stored,which deals with complaints registered to them by there users.
i want to know the name of these different departments which deals with complaints assigned to them like if i do have complaint from a user who has problem with his handset then that complaint will be assigned to "Maintance dept."
as i was never in indusrty , i need the help in filling the table.
just do write me name of departments and the nature of complaints wh they deal with!!!
thanks for the consideration
View 1 Replies
View Related
Apr 26, 2005
I had installed the sample database " AdventureWorks ",but i couldn't find it in SQL Server Management Studio,and I noticed than it was installed into "Microsoft SQL Server 2005 Samples" directory,but not "Microsoft SQL Server" directory,what can I do to find the datebase.
I am a beginner,and learning sqlserver by using tutorials,someone help me?
many many thanks.
View 1 Replies
View Related
Jun 29, 2007
Hi,
I have 0 experience with SQLMail, and I don't want to go too deep into it as I already am trying to learn more than I can with the other parts :) I'm wondering, is there an easy way to have SQL Email me when anything strange happens with the SQL server? It would be awesome to get alerts to my phone.
Thanks very much
mike123
View 4 Replies
View Related
Oct 20, 2006
(New to SQL Server Installs)I installed SQL Server 2005 Developer Edition on a WinXP-SP2workstation and can see some enterprise databases on the network justfine.My problem is I cannot register a local database on the local drive fortesting/education purposes.(I accepted all of the defaults on the install and thought all waswell.)There are a couple of small databases that are in development in ourgroup and I need to work on when offline from the network.Short of uninstalling the whole product and doing it over, what stepscan I take to remedy this so I will be able to work with DB's locally?Thanks.
View 3 Replies
View Related
May 6, 2006
How to install sqlserver2005?
View 3 Replies
View Related
Nov 11, 2007
hi all,
what is the best way to remove SQLSERVER2005 from my computer running XP-sp2
when i try to remove from tha ADD and Remove program from the control panel
it's start the wizard but going to stuck..
thankx
View 4 Replies
View Related
Dec 18, 2007
There is no prompt ' UPGRADE' when I install SqlServer2005
Also check select @@version after installed
Still be 'Microsoft SQL Server 2000 - 8.00.194 (Intel X86) Aug 6 2000 00:57:48 Copyright (c) 1988-2000 Microsoft Corporation Enterprise Edition on Windows NT 5.2 (Build 3790: Service Pack 2) '
Why does this happened?
OS is Windows2003 Server
Thanks
View 1 Replies
View Related
Sep 11, 2007
Hi,
Can any1 tell me how to connect to Sqlserver2000 from sqlserver2005 ...I cant see sqlserver2000 instance name when i try to search in database engine
With regards
mahender
View 1 Replies
View Related
Feb 11, 2006
Hi,
I've a problem with a created view in sqlserver2000 that I'm now using in sqlserver2005.
This is the view :
CREATE VIEW hsarti01_VD1 AS
SELECT TOP 100 PERCENT *
FROM hsarti01 WITH(index(hsarti01_PK))
ORDER BY 1,2 desc,3,4
When I do the "select * from hsarti01_VD1" in sql server 2000, I see in the result that the order by is been using. but in sql server 2005 it's just using the order of the primary key and not the order by !
Has anyone have a solution for it ?
Thanks
View 16 Replies
View Related
Jan 8, 2007
hi,
i must convert my SqlServer2000 to SqlServer2005. I just do it on my Computer and i run a component "SQL Server upgrade wizard" it convert my SQLServer. But now i must do it on my Server Web and if i run that component it give me an error : "must run SQL 6.5" and i don't installed it.
Can i download it with all right migration?
thank you
View 1 Replies
View Related
Jan 24, 2008
i am using sqlserver2005,in that i am not getting database mail even after enabling in surface area configuration of configaration tool.
what is the problem with my sqlserver.
Can any one help me ...
View 1 Replies
View Related
Feb 19, 2008
hi,
i am new in asp.net.
.i have used sqlserver2005.
in VS2005 file->new project->visual c#->Databse then select sqlserver project templates and click ok..
it shows new database reference dialog box
in that i selected server name,use sqlserver authentication and database file.
then click ok butoon it will shows the error that is
"The Sql Server specified by this connection properties does not support managed objects.please choose another Sql server"
suppose if u not able to understand above steps please refer this link
http://www.sqlteam.com/article/writing-clr-stored-procedures-in-charp-introduction-to-charp-part-1
please don't mistake me..
thanks
View 1 Replies
View Related
Apr 17, 2008
Hi,
I am using Sql Server 2005.
I want to place a LOCK, insert something in the table then return back to the code (with the ID of the inserted item) and then call FUNCTION_A and then based on the outcome of the function I either want to
I want to keep the inserted item and release the lock or
I want to delete the inserted item and release the lock
Any suggestion is greatly appreciated.
Regards
naimulah
View 3 Replies
View Related
Dec 13, 2005
ow can I change password of SQLServer2005/Expres ?
View 1 Replies
View Related
Mar 23, 2007
hello sir,
as u explained very well transfered data through Import& Export Wizard for creating destination table but sir i want append rows in the
destination table example. how should i append data in the destination table while copying or transfering data in the exsisting destination table
is there any specfic type of table structure or any setting is require for that if sir yes pls. let me know by my above email add.
as delete rows in the destination table option working properly in IMPORT & EXPORT Wizard only problem in append rows in the destination
table every time i am transfereing data or copying its showing double of exsisting rows its not appending exsising rows & as i want each time
the already exsist rows data should append & insert only new row below that exsisting one .
i hope sir u got my query if u have answer, sir pls revert back with soluntion on my above email add.
thanks & regards
Tamanna Shaikh
View 1 Replies
View Related
May 26, 2008
I m swagatika and working on a s/w company.I am facing some problem in MS SqlServer2005.
my problem is:-
My project is running on SqlServer2005 which is 32 bit support.
But i want to change my project on SqlServer2005 which will be support to 64 bit .
What are the steps i follow to change 32 bit to 64 bit.
can anybody help me?
View 4 Replies
View Related
Jun 3, 2008
I have changed my windows password on my workstation, and the result is that I cannot now access the local databases and services resident on my workstation. I can still access all remote servers, but all attempts to access the local machine have failed. I even changed the password back to the original password, but this has had no effect.
Has anyone had any experience similar to this one? I am at a loss for things to try at this point.
View 12 Replies
View Related