Quantcast
Channel: SQL Server Data Access forum
Viewing all 4164 articles
Browse latest View live

is it supported to use Microsoft JDBC driver use in Java 7 (and 8) multithreaded applications?

$
0
0

Hello everone

is it supported to use Microsoft JDBC driver (the latest version) with Java 7 multithreaded application?

I am planning to use standard Java 7 threads library and use separate JDBC objects per each thread, i.e. Java threads will not share any JDBC objects among them, only the thread-safe Java collections/data structures will be shared between threads (such as ConcurrentHashMap etc). The JDBC connections, resultsets, statements, etc will be created and dedicated per each individual thread.

If it is supported - do you expect this design to scale-up well or am I better off using multiple but single-threaded Java/JBDC programs to access SQL Server 2012/2014 from Microsoft JDBC driver?

Thanks

Yuri Budilov


Yuri Budilov Melbourne Australia


Connection failed: SQL State: '28000'

$
0
0

I have an Access2013 .accdb database, which connection to DQL server via ODBC dsn file. I have no issue to open the file and do anything there, and other developers can too. But when end users try to test it, they can't connect to the backend sql server database. The message is:

Microsoft SQL Server Login

SQLstate: '28000'

SQL Server Error:18456

[Microsoft][ODBC SQL Server Driver][SQL Server] Login failed for user 'xxx'

I was thinking to create a sql login in sql server for the users, but that doesn't sound a good solution, I can't create sql login for every user. Actually, we have a group login 'VBDUser' with a password, and in odbc setting, I used the windows authentication. But users just can't get connected to sql server. Please help!

Issue with INSERT INTO, throws primary key violation error even if the target table is empty

$
0
0

Hi,

I am running a simple

INSERT INTO Table 1 (column 1, column 2, ....., column n)

SELECT column 1, column 2, ....., column n FROM Table 2

Table 1 and Table 2 have same definition(schema).

Table 1 is empty and Table 2 has all the data. Column 1 is primary key and there is NO identity column.

This statement still throws Primary key violation error. Am clueless about this? 

How can this happen when the target table is totally empty? 


Chintu


Linked server works for sa but not for user

$
0
0

I have a linked server to an Oracle database. It works fine for me logged in as DBA but not for the user. The linked server uses the same account regardless of who's using it.

When the user tries it the following error is thrown:

Cannot initialize the data source object of OLE DB provider "OraOLEDB.Oracle" for linked server

I have granted public access to MSDB and execute on the xp_prop_oledb_provider object to the user.

SQL import wizard error

$
0
0

Hello,

Trying to import data from a MySQL table to MS SQL using system DSN and MySQL ODBC 5.3 ANSI Driver. I am getting an error when I go through the steps and I am not sure what is going on. I am using the automatic SQL generator from the wizard. can you please give me an idea on what is the problem here.

You can see the error message below.

Regards,

Farid

Could not connect source component.

Error 0xc02020ff: Source - tbltmp [1]: The Source - tbltmp was unable to retrieve column information for the SQL command. The following error occurred: ERROR [42000] [MySQL][ODBC 5.3(a) Driver][mysqld-5.6.16]You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near '"tbltmp"' at line 1
 (SQL Server Import and Export Wizard)

===================================

Pipeline component has returned HRESULT error code 0xC02020FF from a method call. (Microsoft.SqlServer.DTSPipelineWrap)

------------------------------
Program Location:

   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HandleUserException(Exception e)
   at Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.HostReinitializeMetaData(IDTSManagedComponentWrapper100 wrapper)
   at Microsoft.SqlServer.Dts.Pipeline.Wrapper.CManagedComponentWrapperClass.ReinitializeMetaData()
   at Microsoft.SqlServer.Dts.DtsWizard.Execute.SetSourceConnection(Exception& ex, TransformInfo ti)

Combining tables of 2 separate databases for ODBC use

$
0
0

Hi,

Currently we have one customer database containing various tables. As part of requirements for a new client, we need to manage their data in a totally separate database. The tables and structure are exactly the same but we would be loading data into a separate database.

I am looking for a way to combine tables with the same name in each database when I run queries, rather than having to query each database separately. Currently we actually have many queries set up in MS Access which use an ODBC link to query the data off SQL server. I am aware it is possible to apply a UNION SELECT in Access from 2 separate ODBC connections, but this is extremely slow.

So my initial question is - is there a way to provide access to the tables from both databases over the same ODBC link? If this cannot be done over ODBC I guess we can consider more "modern" methods, but ideally we want to keep this in MS Access as that is where our existing queries are based. I was hoping that some kind of view can be treated as an ODBC connection but I am relying on very wishful thinking. Any other suggestions are welcome, but as I mentioned ideally we want to keep the reporting queries in MS Access.

Many thanks for you help

R

SQL State S0001 error code 18456 for named sql server : jdbc errors

$
0
0
When I try to connect to named instance of SQL Server 2005,the error I get it
The database user has data reader and writer rights.
I have used sqljdbc4.jar

url is jdbc:sqlserver://SERVER_NAME:1433;databaseName=DATABSE_NAME;user=USERNAME;password=USER_PASSWORD

I also tried using the jtds driver and I get State 28000 error

Error 40: Could not open a connection to SQL Server

$
0
0

Hey 

i am getting following error can any one give a suggestionError 40: Could not open a connection to SQL Server 

Thanks in Advance :)


order by and minus in char fields

$
0
0

I have a test query that i have ordered by the expected result order.

select t from (
select cast('1' as nvarchar(20)) as t
union all select '1---qa'
union all select '1q'
union all select '1q1'
union all select '1qz'
union all select 'a'
union all select 'A'
union all select 'č'
union all select 'Č'
union all select 'g'
union all select 'G'
union all select 'ž'
union all select 'Ž'
) q
order by t --collate latin1_general_bin

and the question is... why is minus character (at 3rd line in '1---qa' string) ignored by "order by" clause? That row is put after '1q1' and not after '1'.

When you replace '-' with '+' or any other special char it works as expected but not with '-'. It is just ignored no matter if there is one or more of them.

Don't mind local chars like čž, they are for testing purposes with collate (thus commented) and with bin collation that is not doing proper sorting but minus order is ok in that case.

Tested on SQL 2008 R2 and SQL express 2012, database collation is 'Croatian_CI_AS'.

Is it a bug?

Linux - SQL Server Native Client : Unable to locate driver dynamic library. BCP cannot continue.

$
0
0

Hi all.

I've been trying for a while now to get BCP working on Linux but with no success.


The error message I'm getting i

Unable to locate driver dynamic library. BCP cannot continue..

I saw one historic post on this topic but it was related to the installation being on the incorrect version of Linux.

Please see version details below for our installation.

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

cat /etc/*-release

LSB_VERSION=base-4.0-amd64:base-4.0-noarch:core-4.0-amd64:core-4.0-noarch
Red Hat Enterprise Linux Server release 6.5 (Santiago)
Red Hat Enterprise Linux Server release 6.5 (Santiago)

uname -a

Linux rhabsqlvt1 2.6.32-431.el6.x86_64 #1 SMP Sun Nov 10 22:19:54 EST 2013 x86_64 x86_64 x86_64 GNU/Linux

>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>

sqlcmd works without issue

The following directories are included in PATH

/usr/local/bin:/bin:/usr/bin:/usr/local/sbin:/usr/sbin:/sbin:/opt/microsoft:/opt/microsoft/msodbcsql/lib64

BCP is symbolic linked as follows 

lrwxrwxrwx. 1 root root 44 Apr 24 10:57 bcp -> /opt/microsoft/msodbcsql/bin/bcp-11.0.2270.0

Any suggestions or assistance would be much appreciated.

Many thanks.

Ruairi

Cannot stablish a Database NEW connection with SQL Server Express 2008 R2 and Netbeans 8

$
0
0


Hi I appreciate it if someone could help to this case: I AM TRYING TO MAKE A CONNECTION TO MY SQL SERVER EXPRESS 2008 WITH MY NETBEANS 8 And I get ERROR ... APPARENTLY IS MY USER AND KEY BUT I AM PUTTING THE CORRECT USER AND KEY IN WHICH I CONNECT WITH MY SQL SERVER EXPRESS 2008. I HAVE PUT IN PORT THE 1433 TCP / IP PORT. THE HOST, THE NAME OF MY DATABASE.

NO PASSING OR ERROR WHICH CAN BE ...


Legacy MDAC problem on Windows 7

$
0
0

I have a problem with on one of the old legacy programs my company uses.
We no longer have the source code for the program so I cannot change the MDAC 2.5 requirement.

The program will not run without MDAC 2.5 or greater installed (gives an error message to that effect).
I am running Windows 7 Pro, with Visual Studio 2010 Professional and the program runs fine, but only on my computer.

I want to know what I can do to make the program work in Windows 7 without needing to install Visual Studio on everyone's computers.

I know XP VM is an option, but it is kind of a pain.  Since it works with Visual Studio installed there should be a way to make it work outside of an XP VM.

programma presente

$
0
0
xkè un gioco premio mi dice di istallare il Programma ma ce l'ho istallato? grazie

dataset designer

$
0
0
<AdventureWorks2014.Person.Address>
User-defined types(UDTs)are not supported in the Dataset Designer.

JDBC Java 8

$
0
0

Hello,

I tried JDBC 4.0 with Java 8 and apparently it doesn't work (due to internal API changes it seems).

According to http://msdn.microsoft.com/en-us/data/ff928484, JDBC 4.0 supports Java 7, but there is not mention of Java 8.

Is there any planed release for Java 8? If not, are there any alternatives in the meanwhile?

Regards


SQL 2012 becomes unresponsive to VIEWS

$
0
0

We have a dire situation on a SQL 2012 sp2 database. Intermittently, the database becomes unresponsive to any VIEW.

Here's what we know:

- there are NO sql or system log events generated whatsoever

- queries and ODBC table access work fine

- there are no performance issues ( out of resources etc.)

- VIEWS to other databases work fine

- the problem is immediately resolved when the SQL instance service is restarted

- it is not a front application issue as we wrote a TEST app that performs a simple table access, record post, query, and view

Any help would be greatly appreciated

Job in SQL 2008 worked, now fails in 2012 & 2014

$
0
0

Job in SQL 2008 worked, now fails in 2012 & 2014

Owner:  CMS00S;  has access to data and privileges to run jobs;  link set to use windows authentication for this user;

Receive error:   Executed as user: NTDOM01\CMS00S. Linked servers cannot be used under impersonation without a mapping for the impersonated login. [SQLSTATE 42000] (Error 7437).  The step failed.

If the sysadm acct changes the owner to NTDOM01\SQLSVCADM and tries to run the job get: Executed as user: NT SERVICE\SQLSERVERAGENT. Login failed for user 'NTDOM01\T0000SQ4$'. [SQLSTATE 28000] (Error 18456).  The step failed.

Sometimes see this error in log: Login failed for user NTDOM01\CMS00S: Reason: Attempting to use an NT account name with SQL server Authentication.  Error 18456, Severity: 14, State: 6

Did not have problems coming from SQL 2008 to SQL 2008 .  Now have problems from SQL 2012 to SQL 2008 and SQL 2014 to SQL 2008. 

Ideas? 

Dana Stitt

Accessing oracle DB through c# shows 'Exception occured :Attempt to load Oracle client libraries threw BadImageFormatE xception. This problem will occur when running in 64 bit mode with the 32 bit O racle client components installed.'

$
0
0

Hi,

i am using windows7, 64 bit OS and installed oracle client 11g 64 bit.

I am trying connect to oracle database through c#. The same code was working before reimaging my system. Now i am getting  

Exception occured :Attempt to load Oracle client libraries threw BadImageFormatE
xception.  This problem will occur when running in 64 bit mode with the 32 bit O
racle client components installed.

I tried changing the platform to x86 and

i tried connecting oracle DB using sql developer and that time i am getting missing 'msvcr17.dll error.

SQL Server Slowly ?

$
0
0

Hello

I have a project. It is a Winfrom project. 30 users use my project. When i use my project, It works good. Fast. But some users tell me that sometimes they wait for 5 minute. They tell me that so slowly. There are a lot of forms at my project. If users use my project at same time, my project can be work slowly ? Why ? Now, some tables no have index. I should index all tables ?

Server Computer is that have below skills.

Intel Xeon CPU E31220 3.10 GHz

4 G Ram

Select after check previous records

$
0
0

I have two tables. Users and records.

I need to select only the users that not has lines recorded in the other table.

How could I do that?

Example:

ID| Name| Access 1|Access 2|
----------------------------
1 | Axel   | True         |False   |
2 | Ivan  | False        |False   |
3 | Bob  | True          |False   |
4 | Sue  | False         |False   |



ID| Points| Month| Year|User_1|User_2|
--------------------------------------
1 |  2      |    5 | 2015|   2  |   1  |
2 |  5      |    5 | 2015|   2  |   1  |
3 |  1      |    5 | 2015|   3  |   1  |


Them I want to run a select in the users table, only with the users that hasn't records in the second table.
In the example, the second table has User_1 as the user who receives the points and the User_2 is the user who give the points.
Them I would know what user didn't receive 'points' yet.


Valdirnm



Viewing all 4164 articles
Browse latest View live


<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>