Showing posts with label ole. Show all posts
Showing posts with label ole. Show all posts

Friday, March 23, 2012

Invalid object name please help

When i enter http://akor.alternatifim.com/
i get the error below

Microsoft OLE DB Provider for ODBC Drivers error '80040e37'

[Microsoft][ODBC SQL Server Driver][SQL Server]Invalid object name 'tblSARKICIM'.

The SQL statement is so simple like

Select * from tblSARKICIM

However when i change the SQL statement Select * from lyric.tblSARKICIM

lyric is username and owner of the tables.

Problem is solved. I transfer the My SQL Server and then this problem occurs and i don't want change all my SQL statements.

What can i do?Going to need to see the code.|||Can I ask, why does anyone feel the need to create database objects under any owner other than dbo?

I've always seen it cause more trouble than it's worth.

And if you want tables with the same name, why not just create another database?|||I am running that SQL Server with hosting firm, and can not see user of dbo.
What can i do for that? If administrators give Database Creators privilage to user lyric, is the problem solved? Or i need to change the owner of the tables to dbo?

I don't think there is a wrong with the code, because it was running without problem before transfering db.

Thanks for your helps.|||then the only work around is to instruct your web application (as I can see) to connect to the database server with that user (lyric) credentials.

This is the way that SQLServer works: when you specify an incomplete object qulificator (eg. DBname.Owner.ObjectName), then SQL first tries with current db, and current user as a default. Then switch to dbo (in place of owner). If all tose failed, then an exception of "Invalid object name ..." is thrown.

So if all your objects have the lyric user as their owner, you have two options to query them:

First: select * from lyric.tbl1 (works for any authenticate user that has select permissions on that tbl1 table) or,

Second: select * from tbl1 (works only if the current user is lyric)|||then the only work around is to instruct your web application (as I can see) to connect to the database server with that user (lyric) credentials.

This is the way that SQLServer works: when you specify an incomplete object qulificator (eg. DBname.Owner.ObjectName), then SQL first tries with current db, and current user as a default. Then switch to dbo (in place of owner). If all tose failed, then an exception of "Invalid object name ..." is thrown.

So if all your objects have the lyric user as their owner, you have two options to query them:

First: select * from lyric.tbl1 (works for any authenticate user that has select permissions on that tbl1 table) or,

Second: select * from tbl1 (works only if the current user is lyric)

DB owner is lyric and if i perform the query with lyric.name_of_table it runs without any errors. However changing all query user_name.table_name will be very difficult for me.
For that reason, i want to use query like select blah blah from tbl1 not lyric.tbl1

Is there a way to determine and change the current user? Or i need to change the owner of the table. And What will be do if administrator give lyric to Database Creators privilage (Server Role)

Thanks for your help|||I use that command and change the owner of the db lyric to dbo
And it is working now, thanks for your help :)

EXEC sp_changeobjectowner 'lyric.tblSARKICIM', 'dbo'

Wednesday, March 21, 2012

Invalid File DSN

Please help me.
Recently I have been getting the following error more and more often:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General error: Invalid file dsn 'C:\Program Files\Common Files\ODBC\Data
Sources\"name of dsn"
This doesn't occur all the time jsut every now and then, but like I said
this has been happening more often now. If i run an IISRESET on the web
server making the call to the SQL server the error goes away and everything
works fine. I have done some research and everything I have found so far
says not to use File DSNs. However, the web server has over 60 sites on it
and every single one uses a file DSN or two. I am not the developer so I
can not force them to change their coding only make suggestions, but they
don't really like the suggestion to remove FIle DSNs and make calls
directly. If anyone has any other suggestions PLEASE!! let me know.
--sean.
Unfortunately, that's the price you pay with DSNs -- they often end up
being more trouble than they're worth. If you can prevail on your
developers to use direct connection strings instead, you'll all be
much happier in the long run. Valid ODBC connection strings can be
found at www.able-consulting.com/ADO_Conn.htm and
www.connectionstrings.com.
--Mary
On Tue, 8 Feb 2005 15:30:10 -0500, "Sean Kirby"
<sean.kirby@.blazenet.com> wrote:

>Please help me.
>Recently I have been getting the following error more and more often:
>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>General error: Invalid file dsn 'C:\Program Files\Common Files\ODBC\Data
>Sources\"name of dsn"
>This doesn't occur all the time jsut every now and then, but like I said
>this has been happening more often now. If i run an IISRESET on the web
>server making the call to the SQL server the error goes away and everything
>works fine. I have done some research and everything I have found so far
>says not to use File DSNs. However, the web server has over 60 sites on it
>and every single one uses a file DSN or two. I am not the developer so I
>can not force them to change their coding only make suggestions, but they
>don't really like the suggestion to remove FIle DSNs and make calls
>directly. If anyone has any other suggestions PLEASE!! let me know.
>--sean.
>

Monday, March 19, 2012

Invalid File DSN

Please help me.
Recently I have been getting the following error more and more often:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
General error: Invalid file dsn 'C:\Program Files\Common Files\ODBC\Data
Sources\"name of dsn"
This doesn't occur all the time jsut every now and then, but like I said
this has been happening more often now. If i run an IISRESET on the web
server making the call to the SQL server the error goes away and everything
works fine. I have done some research and everything I have found so far
says not to use File DSNs. However, the web server has over 60 sites on it
and every single one uses a file DSN or two. I am not the developer so I
can not force them to change their coding only make suggestions, but they
don't really like the suggestion to remove FIle DSNs and make calls
directly. If anyone has any other suggestions PLEASE!! let me know.
--sean.Unfortunately, that's the price you pay with DSNs -- they often end up
being more trouble than they're worth. If you can prevail on your
developers to use direct connection strings instead, you'll all be
much happier in the long run. Valid ODBC connection strings can be
found at www.able-consulting.com/ADO_Conn.htm and
www.connectionstrings.com.
--Mary
On Tue, 8 Feb 2005 15:30:10 -0500, "Sean Kirby"
<sean.kirby@.blazenet.com> wrote:

>Please help me.
>Recently I have been getting the following error more and more often:
>Microsoft OLE DB Provider for ODBC Drivers error '80004005'
>General error: Invalid file dsn 'C:\Program Files\Common Files\ODBC\Data
>Sources\"name of dsn"
>This doesn't occur all the time jsut every now and then, but like I said
>this has been happening more often now. If i run an IISRESET on the web
>server making the call to the SQL server the error goes away and everything
>works fine. I have done some research and everything I have found so far
>says not to use File DSNs. However, the web server has over 60 sites on it
>and every single one uses a file DSN or two. I am not the developer so I
>can not force them to change their coding only make suggestions, but they
>don't really like the suggestion to remove FIle DSNs and make calls
>directly. If anyone has any other suggestions PLEASE!! let me know.
>--sean.
>

Monday, March 12, 2012

Invalid connection string attribute

We have a development team that is having intermittant problems with
connecting to a server. They are receiving the following error:
Microsoft OLE DB Provider for SQL Server ... Error Message: Invalid
connection string attribute
for the following connection string:
Provider=SQLOLEDB;Data Source=SNLSQLDBD01;Initial
Catalog=WINTER;Trusted_Connection=Yes;DateFormat=m dy
I'd appreciate any insight - as I said the error is intermittant (love
those). I can't find any examples of DateFormat being used in a SQLOLEDB
provider so I am wondering about that.
thanks
Peter
We now think that the message was misleading - there may be something in the
conection string that it didn't like (DateFormat=mdy ?) but was able to
cope with. The job ran fine when scheduled to start at a different time when
there was lower activity.
"Peter Feakins" wrote:

> We have a development team that is having intermittant problems with
> connecting to a server. They are receiving the following error:
> Microsoft OLE DB Provider for SQL Server ... Error Message: Invalid
> connection string attribute
> for the following connection string:
> Provider=SQLOLEDB;Data Source=SNLSQLDBD01;Initial
> Catalog=WINTER;Trusted_Connection=Yes;DateFormat=m dy
> I'd appreciate any insight - as I said the error is intermittant (love
> those). I can't find any examples of DateFormat being used in a SQLOLEDB
> provider so I am wondering about that.
> thanks
> Peter
>
>
>
>
|||I couldn't find any reference in the docs on the provider
for the attribute DateFormat. I found some posts were a few
others were using it but they had the value in double quotes
and used formats such as "YYYY-MM-DD". DateFormat = mdy
looks more like a T-SQL thing. You may want to just execute
a set dateformat SQL statement if that's what you want to
set the format for the client entering datetime data.
-Sue
On Thu, 9 Sep 2004 14:59:13 -0700, "Peter Feakins"
<PeterFeakins@.discussions.microsoft.com> wrote:
[vbcol=seagreen]
>We now think that the message was misleading - there may be something in the
>conection string that it didn't like (DateFormat=mdy ?) but was able to
>cope with. The job ran fine when scheduled to start at a different time when
>there was lower activity.
>"Peter Feakins" wrote:

Friday, March 9, 2012

Invalid authorization specification

MS OLE DB Provider for SQL Server Error: Invalid authorization specification
This is a basic 3-tier system, front end, data broker, database. The front
end software is written in VB 6. There are many front end users. This
error is coming up on one computer only. No users can access the database
through the software from this machine. But, all users can access the
database through the software from all other machines. This machine is WinXP.
Any ideas where to look? The software and connection code is the same on
all machines. What could have changed on this one machine (because it did
work before) that would cause only it to stop working properly?
Thanks.
Does your application use a DSN to connect to SQL Server? If so ensure this
DSN is setup correctly on the client machine.
This error is similar to the "login failed for user <usr>" Thus you should
troubleshoot it similarly. For instrance, try connecting from this client
using both SQL and NT authentication. To simplify troubleshooting, try
taking your application out of the picture by testing UDL file connections
and from odbc administrator(test dsn). Is the same error displayed when
testing connectivity using these client tools?
Also see KB: How to troubleshoot connectivity issues in SQL Server 2000 -
ID: 827422 9available at http://support.microsoft.com)
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

Wednesday, March 7, 2012

Invalid authorization specification

MS OLE DB Provider for SQL Server Error: Invalid authorization specification
This is a basic 3-tier system, front end, data broker, database. The front
end software is written in VB 6. There are many front end users. This
error is coming up on one computer only. No users can access the database
through the software from this machine. But, all users can access the
database through the software from all other machines. This machine is WinX
P.
Any ideas where to look? The software and connection code is the same on
all machines. What could have changed on this one machine (because it did
work before) that would cause only it to stop working properly?
Thanks.Does your application use a DSN to connect to SQL Server? If so ensure this
DSN is setup correctly on the client machine.
This error is similar to the "login failed for user <usr>" Thus you should
troubleshoot it similarly. For instrance, try connecting from this client
using both SQL and NT authentication. To simplify troubleshooting, try
taking your application out of the picture by testing UDL file connections
and from odbc administrator(test dsn). Is the same error displayed when
testing connectivity using these client tools?
Also see KB: How to troubleshoot connectivity issues in SQL Server 2000 -
ID: 827422 9available at http://support.microsoft.com)
Fany Vargas
Microsoft Corporation
This posting is provided "AS IS" with no warranties, and confers no rights.
Are you secure? For information about the Strategic Technology Protection
Program and to order your FREE Security Tool Kit, please visit
http://www.microsoft.com/security.
Microsoft highly recommends that users with Internet access update their
Microsoft software to better protect against viruses and security
vulnerabilities. The easiest way to do this is to visit the following
websites:
http://www.microsoft.com/protect
http://www.microsoft.com/security/guidance/default.mspx

Sunday, February 19, 2012

Interrogating lock information...

I'm working on a PB / OLE DB / SQL2000 application architecture. Here is my requirement:

I need to find out if/how I can interrogate a SQL2000 database for its locking information, with a fairly high degree of granularity. That is to say I'd want to extract the following info:

TABLE LOCK:
--> The name of the table thats locked. (this I can get from SYS tables...)

PAGE LOCK:
--> The table and the row or range of rows that are locked.

ROW LOCK:
--> The table and the row (RId or physical key) that is locked.

My understanding is that rows that are locked as part of a page lock, or a row that is rowlocked, is managed internally within the DBMS. Any one of the three lock types will register e.g. on the SYSLOCKS table, but only specifies the name of the locked object (i.e. table name, index, etc...).

Is my only real solution to create my own custom locking info table(s)? I don't strongly favor that sort of solution, because the code to properly manage such a table would be pretty ambitious to write, and prone to corruption at some point no matter how well we build it.

Are there any inventive solutions out there?All the tools to do that are at your finguretips, - PerfMon, DBCC, Profiler, and QA. Look into sp_lock stored procedure that will point you to master.dbo.syslocks and master.dbo.syslockinfo. Look into perfmon counters as well as various profiler templates.