Showing posts with label linked. Show all posts
Showing posts with label linked. Show all posts

Monday, March 26, 2012

Invalid Object Name When linking to SQL Table from access!

After Upsizing a table to sql I linked to that table using access db

Now when i use one of my forms i get a [Invalid Object name "tablename''], not sure why but i am clearly link and the table is in sql!

Can you help!

If I recall correctly, when you link to external tables in MS Access, the linked table names are not the same as the underlying table so for example a table named foo in SQL Server could become linked as dbo_foo in Access.

I suggest you look at the Tables view in Access and rename the table to match what you want it to be or modify your forms to accept the linked table name.

Regards,

Uwa.

Wednesday, March 21, 2012

Invalid identifier/column names after Upsize Access data to SQL Se

I have been asked to maintain an Access 2000 database which is a code front
end linked by ODBC to a SQL Server 2005 back end. (Originally the data was
in an Access database but was later moved to SQL Server 2005 by the Upsizing
tools.)
Some tables have column names which do not conform to the rules given in SQL
Books Online - there are field names with embedded spaces, first character
not a-z or A-Z, name contains '/' and two names which are T-SQL reserved
words. When the tables are viewed via Management Studio, these 'odd' names
are enclosed in square brackets.
The production system is working in this state, but when I try to set up a
test environment on a stand-alone PC, I cannot access these tables. If I try
to link them I get 'ODBC -- Call failed', and if I try to import them I get
error messages about various column names. I can only link to, or import
other tables which do not have these 'odd' field names. If I rename the
columns in SQL server then I can import or link them with no problem.
(My PC has the latest service packs for SQL Server 2005 and Office 2003, and
MDAC 2.8 SP1.)
Somehow the production system works with this data but my test PC doesn't.
What do I need to do on my test PC to use this data with the original 'odd'
column names?
How are you linking the tables? You can write DAO/VBA code to pass the
correctly-delimited table names.
Frankly, you'd be better off just changing the names to conform to
SQLS identifier rules. Having non-compliant names is just going to
cause more headaches down the road. Take the hit now before you've
deployed the app.
-mary
On Fri, 22 Jun 2007 07:54:04 -0700, didub
<didub@.discussions.microsoft.com> wrote:

>I have been asked to maintain an Access 2000 database which is a code front
>end linked by ODBC to a SQL Server 2005 back end. (Originally the data was
>in an Access database but was later moved to SQL Server 2005 by the Upsizing
>tools.)
>Some tables have column names which do not conform to the rules given in SQL
>Books Online - there are field names with embedded spaces, first character
>not a-z or A-Z, name contains '/' and two names which are T-SQL reserved
>words. When the tables are viewed via Management Studio, these 'odd' names
>are enclosed in square brackets.
>The production system is working in this state, but when I try to set up a
>test environment on a stand-alone PC, I cannot access these tables. If I try
>to link them I get 'ODBC -- Call failed', and if I try to import them I get
>error messages about various column names. I can only link to, or import
>other tables which do not have these 'odd' field names. If I rename the
>columns in SQL server then I can import or link them with no problem.
>(My PC has the latest service packs for SQL Server 2005 and Office 2003, and
>MDAC 2.8 SP1.)
>Somehow the production system works with this data but my test PC doesn't.
>What do I need to do on my test PC to use this data with the original 'odd'
>column names?
|||I agree that the column names should be changed to satisfy SQL naming rules,
and I plan to do that, but that is not my first priority.
This app. was created and deployed several years ago by someone who is no
longer with the company. On the live server and desktops it is working with
these invalid names.
My first objective was to install a copy of the system on my own PC so I can
take it apart and plan some major changes and bug fixes. So ideally I would
just like to get my test system working as the live system does.
My guess is that there are some ODBC related settings that I need to change.
Or perhaps there is something I need to do on the SQL Server database. I
have searched Knowledgebase and the forums but I haven't found anything
helpful yet.
"Mary Chipman [MSFT]" wrote:

> How are you linking the tables? You can write DAO/VBA code to pass the
> correctly-delimited table names.
> Frankly, you'd be better off just changing the names to conform to
> SQLS identifier rules. Having non-compliant names is just going to
> cause more headaches down the road. Take the hit now before you've
> deployed the app.
> -mary
> On Fri, 22 Jun 2007 07:54:04 -0700, didub
> <didub@.discussions.microsoft.com> wrote:
>
|||As I recommended earlier, write code so that you can specify the
delimiters. If you're using UI tools then you have no way of knowing
what the unspoken assumptions are - i.e., what is being passed to ODBC
and then the server. Another option is to put a Profiler trace on it
and see what the server is receiving from the client. It's hard to
tell from a distance what's actually going on under the covers with an
app, especially if someone else wrote it.
-mary
On Fri, 22 Jun 2007 15:09:01 -0700, didub
<didub@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>I agree that the column names should be changed to satisfy SQL naming rules,
>and I plan to do that, but that is not my first priority.
>This app. was created and deployed several years ago by someone who is no
>longer with the company. On the live server and desktops it is working with
>these invalid names.
>My first objective was to install a copy of the system on my own PC so I can
>take it apart and plan some major changes and bug fixes. So ideally I would
>just like to get my test system working as the live system does.
>My guess is that there are some ODBC related settings that I need to change.
>Or perhaps there is something I need to do on the SQL Server database. I
>have searched Knowledgebase and the forums but I haven't found anything
>helpful yet.
>
>"Mary Chipman [MSFT]" wrote:

Invalid identifier/column names after Upsize Access data to SQL Se

I have been asked to maintain an Access 2000 database which is a code front
end linked by ODBC to a SQL Server 2005 back end. (Originally the data was
in an Access database but was later moved to SQL Server 2005 by the Upsizing
tools.)
Some tables have column names which do not conform to the rules given in SQL
Books Online - there are field names with embedded spaces, first character
not a-z or A-Z, name contains '/' and two names which are T-SQL reserved
words. When the tables are viewed via Management Studio, these 'odd' names
are enclosed in square brackets.
The production system is working in this state, but when I try to set up a
test environment on a stand-alone PC, I cannot access these tables. If I try
to link them I get 'ODBC -- Call failed', and if I try to import them I get
error messages about various column names. I can only link to, or import
other tables which do not have these 'odd' field names. If I rename the
columns in SQL server then I can import or link them with no problem.
(My PC has the latest service packs for SQL Server 2005 and Office 2003, and
MDAC 2.8 SP1.)
Somehow the production system works with this data but my test PC doesn't.
What do I need to do on my test PC to use this data with the original 'odd'
column names?How are you linking the tables? You can write DAO/VBA code to pass the
correctly-delimited table names.
Frankly, you'd be better off just changing the names to conform to
SQLS identifier rules. Having non-compliant names is just going to
cause more headaches down the road. Take the hit now before you've
deployed the app.
-mary
On Fri, 22 Jun 2007 07:54:04 -0700, didub
<didub@.discussions.microsoft.com> wrote:

>I have been asked to maintain an Access 2000 database which is a code front
>end linked by ODBC to a SQL Server 2005 back end. (Originally the data was
>in an Access database but was later moved to SQL Server 2005 by the Upsizin
g
>tools.)
>Some tables have column names which do not conform to the rules given in SQ
L
>Books Online - there are field names with embedded spaces, first character
>not a-z or A-Z, name contains '/' and two names which are T-SQL reserved
>words. When the tables are viewed via Management Studio, these 'odd' names
>are enclosed in square brackets.
>The production system is working in this state, but when I try to set up a
>test environment on a stand-alone PC, I cannot access these tables. If I tr
y
>to link them I get 'ODBC -- Call failed', and if I try to import them I get
>error messages about various column names. I can only link to, or import
>other tables which do not have these 'odd' field names. If I rename the
>columns in SQL server then I can import or link them with no problem.
>(My PC has the latest service packs for SQL Server 2005 and Office 2003, an
d
>MDAC 2.8 SP1.)
>Somehow the production system works with this data but my test PC doesn't.
>What do I need to do on my test PC to use this data with the original 'odd'
>column names?sql

Friday, March 9, 2012

Invalid authorization specification

Hi,
I am trying to run some queries across the servers.
I have admin rights on both the boxes, I have linked the server.
But whenever i run a query on the remote server, I get the following error
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error.
[OLE/DB provider returned message: Invalid authorization specification]
The query is a basic one like
SELECT distinct [name] FROM remoteserver.sms_rdm.dbo.v_r_system.
Any suggestions pls ?
Hi Arun,
Possible reasons...
* Check whether you have added your login id in the remote sql server. If
you haven't added the login id, use sp_addremotelogin system stored procedure
to add your local login in the remote server and give appropriate access
rights.
"Arun" wrote:

> Hi,
> I am trying to run some queries across the servers.
> I have admin rights on both the boxes, I have linked the server.
> But whenever i run a query on the remote server, I get the following error
> --
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'SQLOLEDB' reported an error.
> [OLE/DB provider returned message: Invalid authorization specification]
> --
> The query is a basic one like
> SELECT distinct [name] FROM remoteserver.sms_rdm.dbo.v_r_system.
> Any suggestions pls ?
|||Shri,
Thanks for the reply. But i can run the query successfully when i dirctly
connect to remoteserver via q/a. and have full rights on the remoteserver.
Arun
"Shri.DBA" wrote:
[vbcol=seagreen]
> Hi Arun,
> Possible reasons...
> * Check whether you have added your login id in the remote sql server. If
> you haven't added the login id, use sp_addremotelogin system stored procedure
> to add your local login in the remote server and give appropriate access
> rights.
> "Arun" wrote:
|||The issue was simple ( now that i figured it out ;))
I was getting the error below because the security tab of the linked server
was set to 'connection to be made without security context' once it was
changed to 'use current context' it worked fine
Thanks for the reply
Arun
"Arun" wrote:
[vbcol=seagreen]
> Shri,
> Thanks for the reply. But i can run the query successfully when i dirctly
> connect to remoteserver via q/a. and have full rights on the remoteserver.
> Arun
> "Shri.DBA" wrote:

Wednesday, March 7, 2012

Invalid authorization specification

Hi,
I am trying to run some queries across the servers.
I have admin rights on both the boxes, I have linked the server.
But whenever i run a query on the remote server, I get the following error
--
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error.
[OLE/DB provider returned message: Invalid authorization specification]
--
The query is a basic one like
SELECT distinct [name] FROM remoteserver.sms_rdm.dbo.v_r_system.
Any suggestions pls ?Hi Arun,
Possible reasons...
* Check whether you have added your login id in the remote sql server. If
you haven't added the login id, use sp_addremotelogin system stored procedure
to add your local login in the remote server and give appropriate access
rights.
"Arun" wrote:
> Hi,
> I am trying to run some queries across the servers.
> I have admin rights on both the boxes, I have linked the server.
> But whenever i run a query on the remote server, I get the following error
> --
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'SQLOLEDB' reported an error.
> [OLE/DB provider returned message: Invalid authorization specification]
> --
> The query is a basic one like
> SELECT distinct [name] FROM remoteserver.sms_rdm.dbo.v_r_system.
> Any suggestions pls ?|||Shri,
Thanks for the reply. But i can run the query successfully when i dirctly
connect to remoteserver via q/a. and have full rights on the remoteserver.
Arun
"Shri.DBA" wrote:
> Hi Arun,
> Possible reasons...
> * Check whether you have added your login id in the remote sql server. If
> you haven't added the login id, use sp_addremotelogin system stored procedure
> to add your local login in the remote server and give appropriate access
> rights.
> "Arun" wrote:
> > Hi,
> > I am trying to run some queries across the servers.
> > I have admin rights on both the boxes, I have linked the server.
> > But whenever i run a query on the remote server, I get the following error
> > --
> > Server: Msg 7399, Level 16, State 1, Line 1
> > OLE DB provider 'SQLOLEDB' reported an error.
> > [OLE/DB provider returned message: Invalid authorization specification]
> > --
> > The query is a basic one like
> > SELECT distinct [name] FROM remoteserver.sms_xxx.dbo.v_r_system.
> >
> > Any suggestions pls ?|||The issue was simple ( now that i figured it out ;))
I was getting the error below because the security tab of the linked server
was set to 'connection to be made without security context' once it was
changed to 'use current context' it worked fine
Thanks for the reply
Arun
"Arun" wrote:
> Shri,
> Thanks for the reply. But i can run the query successfully when i dirctly
> connect to remoteserver via q/a. and have full rights on the remoteserver.
> Arun
> "Shri.DBA" wrote:
> > Hi Arun,
> >
> > Possible reasons...
> >
> > * Check whether you have added your login id in the remote sql server. If
> > you haven't added the login id, use sp_addremotelogin system stored procedure
> > to add your local login in the remote server and give appropriate access
> > rights.
> >
> > "Arun" wrote:
> >
> > > Hi,
> > > I am trying to run some queries across the servers.
> > > I have admin rights on both the boxes, I have linked the server.
> > > But whenever i run a query on the remote server, I get the following error
> > > --
> > > Server: Msg 7399, Level 16, State 1, Line 1
> > > OLE DB provider 'SQLOLEDB' reported an error.
> > > [OLE/DB provider returned message: Invalid authorization specification]
> > > --
> > > The query is a basic one like
> > > SELECT distinct [name] FROM remoteserver.sms_xxx.dbo.v_r_system.
> > >
> > > Any suggestions pls ?

Invalid authorization specification

Hi,
I am trying to run some queries across the servers.
I have admin rights on both the boxes, I have linked the server.
But whenever i run a query on the remote server, I get the following error
--
Server: Msg 7399, Level 16, State 1, Line 1
OLE DB provider 'SQLOLEDB' reported an error.
[OLE/DB provider returned message: Invalid authorization specification]
--
The query is a basic one like
SELECT distinct [name] FROM remoteserver.sms_rdm.dbo.v_r_system.
Any suggestions pls ?Hi Arun,
Possible reasons...
* Check whether you have added your login id in the remote sql server. If
you haven't added the login id, use sp_addremotelogin system stored procedur
e
to add your local login in the remote server and give appropriate access
rights.
"Arun" wrote:

> Hi,
> I am trying to run some queries across the servers.
> I have admin rights on both the boxes, I have linked the server.
> But whenever i run a query on the remote server, I get the following error
> --
> Server: Msg 7399, Level 16, State 1, Line 1
> OLE DB provider 'SQLOLEDB' reported an error.
> [OLE/DB provider returned message: Invalid authorization specification
]
> --
> The query is a basic one like
> SELECT distinct [name] FROM remoteserver.sms_rdm.dbo.v_r_system.
> Any suggestions pls ?|||Shri,
Thanks for the reply. But i can run the query successfully when i dirctly
connect to remoteserver via q/a. and have full rights on the remoteserver.
Arun
"Shri.DBA" wrote:
[vbcol=seagreen]
> Hi Arun,
> Possible reasons...
> * Check whether you have added your login id in the remote sql server. If
> you haven't added the login id, use sp_addremotelogin system stored proced
ure
> to add your local login in the remote server and give appropriate access
> rights.
> "Arun" wrote:
>|||The issue was simple ( now that i figured it out ;))
I was getting the error below because the security tab of the linked server
was set to 'connection to be made without security context' once it was
changed to 'use current context' it worked fine
Thanks for the reply
Arun
"Arun" wrote:
[vbcol=seagreen]
> Shri,
> Thanks for the reply. But i can run the query successfully when i dirctly
> connect to remoteserver via q/a. and have full rights on the remoteserve
r.
> Arun
> "Shri.DBA" wrote:
>