Showing posts with label serverinvalid. Show all posts
Showing posts with label serverinvalid. Show all posts

Saturday, February 25, 2012

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name on Linked Server

Hi Folks,
I'm having a strange situation here between 2 Linked MS SQL 2K servers.
One of the servers died recently and I rebuilt it.
All seems to be working fine, except that when I create views that access tables on the other (linked) server, I can not modify any data, because I get the [Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name server.database.dbo.TableName error.
The View does work fine otherwise, ie displays the data in it, I just can't modify.
The Linked Servers are done with the sa user between these 2 servers.

Any ideas what could be causing this error?
Thanks!-- bump --
no one ideas on this?|||I'm also having problems with this - mine is in relation to a labeler printer, it is present in my ODBC and the test is successful. However, when I go to print I get the following error: [microsoft][ODBC SQL Server Driver][SQL SERVER] Invalid object name 'table name' ODBC -- call failed

I can't seem to see what the problem is as my project server works from this client.

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

hi
i m connect to the sQL SERVER using system DSN in JREPORT
but it is not working
get the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

Quote:

Originally Posted by daxter

hi
i m connect to the sQL SERVER using system DSN in JREPORT
but it is not working
get the following error
[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name


Try using

\Control Panel\Administrative Tools\Data Sources (ODBC)

And System DNS tab up the top of that window

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

From Enterpise Manager I create a user, giving all available rights. I have created a DB and set this user to be everything for it (except deny). I create tables as this user on the above DB. When I try to access these tables with an app using ODBC, the specific error appears.
Please assist fellas - situation critical.
Thanx.Refer to this KBA (http://support.microsoft.com/default.aspx?scid=http://support.microsoft.com:80/support/kb/articles/Q218/9/95.asp&NoWebContent=1) to resolve the issue.|||Thanx for the info but it didn't work.|||If you created the objects as the user, then they are owned by the user, and will be named [ownername].[objectname].

If your sql code does not specify a ownername sqlserver assumes dbo ownership, and your objects don't exists as dbo.[objectname].

Either specify the owner name when you reference the objects,
or instead of granting all individual rights to the user just grant it dbo access to the database. Then any objects it creates will be dbo owned and will not need to be fully referenced.

blindman

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name

I have a ms sqlserver 2000 database installed on my Windows NT4 PC.

I want to access this database from a java program using JDBC - ODBC

Here are the relavent lines of code from my java source code file.

Note : I am attempting to access the sample database "Northwind Traders" that came with the installation.

Class.forName("sun.jdbc.odbc.JdbcOdbcDriver").newInstance();
datasource = "NORTHDS";
url = "jdbc:odbc:" + datasource;
con = DriverManager.getConnection(url,username,password) ;
query = "SELECT * from " + datasource + "." + username + "." + tablename;
ResultSet rs = stmt.executeQuery(query);

The connection succeeds but the query fails with :
java.sql.SQLException: [Microsoft][ODBC SQL Server Driver][SQL
Server]Invalid object name 'NORTHDS.username.Customers'.

Using the program "Microsoft Access" I was able to verify that the "Customers" table is intact.

Any ideas ?Take a look at the following:

In your select statement there are a couple of potential problems that you need to verify.

select * from datasource.username.table ... which is returning 'NORTHDS.username.Customers'

should be

select * from Northwind.dbo.Customers ... (unless you renamed the database ...)

In other words, check to make sure your are referencing the correct database/owner/table in your select statement. It appears that the variables you are using are incorrect. tablename appears to be ok, but the username variable is returning username. Also, the datasource variable may not be your database name.