Showing posts with label user. Show all posts
Showing posts with label user. Show all posts

Friday, March 23, 2012

invalid object name (sql server

I am attempting to call a user defined function from a stored procedure in the same database, and I get the following error:

Invalid object name 'dbo.fn_NewSplit'.

I've tried calling it as dbo.fn_NewSplit, fn_NewSplit etc. I also setup another that had my DB login IE ihomesm_maindb.fn_NewSplit and get the same results.

Interestingly there is another previously built stored procedure calling the same function with apparantly no problems.

Also, I have tried to execute this stored procedure with both my .net application and within the query analyzer with the same error.

Can you post the function code as well as your TSQL calling the function?

|||

jmhooten:

I am attempting to call a user defined function from a stored procedure in the same database, and I get the following error:

Invalid object name 'dbo.fn_NewSplit'.

I've tried calling it as dbo.fn_NewSplit, fn_NewSplit etc. I also setup another that had my DB login IE ihomesm_maindb.fn_NewSplit and get the same results.

Interestingly there is another previously built stored procedure calling the same function with apparantly no problems.

Also, I have tried to execute this stored procedure with both my .net application and within the query analyzer with the same error.

Well, thank you Sql Server developers, my issue wasn't that the object name wasn't valid, it was that I was not calling it correctly (I should have called the function within a SELECT statement in my case) the last question lead me to the answer.

Invalid Object Name

I have a database from a client that I am trying to restore. I am
restoring it when logged in as the user 'PDBA'. The client alos has a
user on the database called 'PDBA' and 'PDBA' is the owner o the
tables when I finish restoring the database.
The problem is when I execute 'SELECT * FROM TABLE_A' I get back the
'Invalid Object Name' error. When I execute it as 'SELECT * FROM
PDBA.TABLE_A' it works fine and I get the results.
I am trying to run this from an application which uses the first SQL
without the PDBA reference and I cannot chnage the application.
Is there a way for me to correct this?
Is there a script I need to run?
TIA
SteveRead about sp_change_users_login in Books Online and make sure that you
operate as the PDBA user name. And, let the developers know that it is
recommended to always owner-qualify object names.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Steve" <seytonjones@.hotmail.com> wrote in message
news:89f27d82.0403110836.56e5837d@.posting.google.com...
> I have a database from a client that I am trying to restore. I am
> restoring it when logged in as the user 'PDBA'. The client alos has a
> user on the database called 'PDBA' and 'PDBA' is the owner o the
> tables when I finish restoring the database.
> The problem is when I execute 'SELECT * FROM TABLE_A' I get back the
> 'Invalid Object Name' error. When I execute it as 'SELECT * FROM
> PDBA.TABLE_A' it works fine and I get the results.
> I am trying to run this from an application which uses the first SQL
> without the PDBA reference and I cannot chnage the application.
> Is there a way for me to correct this?
> Is there a script I need to run?
>
> TIA
>
> Steve

Monday, March 12, 2012

invalid cursor state

I am unable to save modifications to changes in a database. I get the following error:
- Unable to preserve security settings for user 'RIMSUser'.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state
Any suggestions?
Hi Dslaby,
From your description, I understand that you would like to make your
modifications successfully without error message "Invalid cursor state".
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
Before we go any further, I would like to collect more information from you:
1. Could you let me know what the front-end program that you ran the your
query is? Access or others?
2. Which SQL Statement you run? Did you try other SQL statements? Such as
Select, Insert into, Update, etc.. Will they get the same results?
3. Do you have the correct security authority to do modifications in SQL
Server? Could you login SQL Server as 'RIMSUser' in Query Analyzer and make
modifications for database?
4. Have you updated to the latest service pack for SQL Server and ODBC
Driver?
Moreover, you could get the latest updates from
Microsoft Data Access Components (MDAC) 2.8
http://www.microsoft.com/downloads/d...fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Microsoft SQL Server 2000 Service Pack 3a
http://www.microsoft.com/downloads/d...52c-0488-4e46-
afbf-acace5369fa3&DisplayLang=en
Please apply my questions and suggestions above and let me know the
results, and feel free to post it in the group.
Sincerely yours,
Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.
|||1. I'm using Enterprise Manager
2. I've tried to modify the database fields in Enterprise Manager
3. I'm an administrator and logged on in using integrated security
4. I've kept the service packs up to date in SQL
Thanks.
|||Hi Dslaby,
I don't know what your means about 'database fields', Does it mean
'datatype of the coloumn'?
In this case, it is an known issue especially when you are trying to change
it from FLOAT to INTEGER. We have an hotfix, however, This fix is not
publicly available through the Microsoft website as it has not gone through
full Microsoft regression testing. If you would like confirmation that
this fix is designed to address your specific problem, or if you would like
to confirm whether there are any special compatibility or installation
issues associated with this fix, you are encouraged to speak to a Support
Professional in Product Support Services, by contacting us at
1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/default...d=sz;en-us;top
As a workaround, you could make your change by Query Analyzer
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.
|||I was trying to change the length of a varchar from 250 to 1000. Now I get this message:
- Unable to create index 'PK_tblJobBoard'.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state
I am unable to do any modifications to any of the database objects in Enterprise Manager. I'll try reinstalling SQL 2000.
|||Hi Dslaby,
ThereYou could try to do modification by Query Analyzer and you should
using ALTER statement like this if you want to alter column attribute
ALTER TABLE tableName ALTER COLUMN columnName columnType
(tableName, columnName and columnType should be changed according to your
own database settings)
More information about ALTER statement could be found at BooksOnline title
"ALTER TABLE" or MSDN Online:
ALTER TABLE
http://msdn.microsoft.com/library/de...us/tsqlref/ts_
aa-az_3ied.asp
After you apply SQL Server 2000 Service Pack 3 (SP3) hotfix build versions
between 8.00.0859 and 8.00.0875, you will encounter this kind of message
when using SQL Enterprise Manager to alter table column. Based on my
testing, a SQL Server without service pack (build version 8.00.0194) and
latest hotfix (builder version 8.00.0927) will not encounter this kind of
issue.
(You could use select @.@.version to find your SQL Server Versions by using
Query Analyzer)
In Summary, I recommand you using Query Analyzer to modify table column or
contact Product Support Services for latest update.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.
|||PS. Does the technet CD subscription have the latest version?
Thanks.
|||I have build .859 from SP3a installed. How do I know the latest build versions on PSS?
Also, I installed SQL Reporting. Did this install require a re-install of SP3a?
Thanks.
|||Hi Dslaby,
System Requirements for Reporting Services could be found at:
http://www.microsoft.com/sql/reporti...fo/sysreqs.asp
from which you could see that you must update to Service Pace 3a or higher
to install SQL Server Reporting Services
However, The hotfix I have mentioned is not publicly available through the
Microsoft website as it has not gone through full Microsoft regression
testing. If you would like confirmation that this fix is designed to
address your specific problem, or if you would like to confirm whether
there are any special compatibility or installation issues associated with
this fix, you are encouraged to speak to a Support Professional in Product
Support Services, by contacting us at 1-(800)936-5800 or by choosing one of
the options listed at
http://support.microsoft.com/default...d=sz;en-us;top
Based on my test, build 927 has eliminate this kind of issue.
Bottom line - have a good backup strategy.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Support
************************************************** *********
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.
|||I called the support number and they are unable to send me the patch without an article number. Could you email the patch? Thanks.

invalid cursor state

I am unable to save modifications to changes in a database. I get the follow
ing error:
- Unable to preserve security settings for user 'RIMSUser'.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state
Any suggestions?Hi Dslaby,
From your description, I understand that you would like to make your
modifications successfully without error message "Invalid cursor state".
Have I fully understood you? If there is anything I misunderstood, please
feel free to let me know.
Before we go any further, I would like to collect more information from you:
1. Could you let me know what the front-end program that you ran the your
query is? Access or others?
2. Which SQL Statement you run? Did you try other SQL statements? Such as
Select, Insert into, Update, etc.. Will they get the same results?
3. Do you have the correct security authority to do modifications in SQL
Server? Could you login SQL Server as 'RIMSUser' in Query Analyzer and make
modifications for database?
4. Have you updated to the latest service pack for SQL Server and ODBC
Driver?
Moreover, you could get the latest updates from
Microsoft Data Access Components (MDAC) 2.8
http://www.microsoft.com/downloads/...0fe3-c795-4b7d-
b037-185d0506396c&DisplayLang=en
Microsoft SQL Server 2000 Service Pack 3a
http://www.microsoft.com/downloads/...d52c-0488-4e46-
afbf-acace5369fa3&DisplayLang=en
Please apply my questions and suggestions above and let me know the
results, and feel free to post it in the group.
Sincerely yours,
Michael Cheng
Microsoft Online Support
****************************************
*******************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.|||1. I'm using Enterprise Manager
2. I've tried to modify the database fields in Enterprise Manager
3. I'm an administrator and logged on in using integrated security
4. I've kept the service packs up to date in SQL
Thanks.|||Hi Dslaby,
I don't know what your means about 'database fields', Does it mean
'datatype of the coloumn'?
In this case, it is an known issue especially when you are trying to change
it from FLOAT to INTEGER. We have an hotfix, however, This fix is not
publicly available through the Microsoft website as it has not gone through
full Microsoft regression testing. If you would like confirmation that
this fix is designed to address your specific problem, or if you would like
to confirm whether there are any special compatibility or installation
issues associated with this fix, you are encouraged to speak to a Support
Professional in Product Support Services, by contacting us at
1-(800)936-5800 or by choosing one of the options listed at
http://support.microsoft.com/defaul...id=sz;en-us;top
As a workaround, you could make your change by Query Analyzer
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Support
****************************************
*******************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.|||I was trying to change the length of a varchar from 250 to 1000. Now I get
this message:
- Unable to create index 'PK_tblJobBoard'.
ODBC error: [Microsoft][ODBC SQL Server Driver]Invalid cursor state
I am unable to do any modifications to any of the database objects in Enterp
rise Manager. I'll try reinstalling SQL 2000.|||Hi Dslaby,
ThereYou could try to do modification by Query Analyzer and you should
using ALTER statement like this if you want to alter column attribute
ALTER TABLE tableName ALTER COLUMN columnName columnType
(tableName, columnName and columnType should be changed according to your
own database settings)
More information about ALTER statement could be found at BooksOnline title
"ALTER TABLE" or MSDN Online:
ALTER TABLE
http://msdn.microsoft.com/library/d...-us/tsqlref/ts_
aa-az_3ied.asp
After you apply SQL Server 2000 Service Pack 3 (SP3) hotfix build versions
between 8.00.0859 and 8.00.0875, you will encounter this kind of message
when using SQL Enterprise Manager to alter table column. Based on my
testing, a SQL Server without service pack (build version 8.00.0194) and
latest hotfix (builder version 8.00.0927) will not encounter this kind of
issue.
(You could use select @.@.version to find your SQL Server Versions by using
Query Analyzer)
In Summary, I recommand you using Query Analyzer to modify table column or
contact Product Support Services for latest update.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Support
****************************************
*******************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.|||PS. Does the technet CD subscription have the latest version?
Thanks.|||I have build .859 from SP3a installed. How do I know the latest build versio
ns on PSS?
Also, I installed SQL Reporting. Did this install require a re-install of SP
3a?
Thanks.|||Hi Dslaby,
System Requirements for Reporting Services could be found at:
http://www.microsoft.com/sql/report...nfo/sysreqs.asp
from which you could see that you must update to Service Pace 3a or higher
to install SQL Server Reporting Services
However, The hotfix I have mentioned is not publicly available through the
Microsoft website as it has not gone through full Microsoft regression
testing. If you would like confirmation that this fix is designed to
address your specific problem, or if you would like to confirm whether
there are any special compatibility or installation issues associated with
this fix, you are encouraged to speak to a Support Professional in Product
Support Services, by contacting us at 1-(800)936-5800 or by choosing one of
the options listed at
http://support.microsoft.com/defaul...id=sz;en-us;top
Based on my test, build 927 has eliminate this kind of issue.
Bottom line - have a good backup strategy.
Thank you for your patience and cooperation. If you have any questions or
concerns, don't hesitate to let me know. We are here to be of assistance!
Sincerely yours,
Michael Cheng
Microsoft Online Support
****************************************
*******************
Get Secure! - www.microsoft.com/security
This posting is provided "as is" with no warranties and confers no rights.
Please reply to newsgroups only, many thanks.|||I called the support number and they are unable to send me the patch without
an article number. Could you email the patch? Thanks.

Wednesday, March 7, 2012

intrusion detection, etc. for sql server

Does SQL Server 2000 Enterprise Edition have any built-in security features
for account management, such as logging user logins and locking an account w
hen a user uses the wrong password X number of times. If there is no built i
n functionality, has anyone
implemented these kinds of security features?
Thanks,
KatieThe only thing that SQL has is auditing for successfull and failed logins.
To protect your SQL Server and/or restrict access to it, you could put it
behind ISA server and only allow certain computers to connect.
We don't check for NT policies on password attempts.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.|||Hi! The functionality you are looking for (account lockouts) is already avai
lable on the OS side which I think is why it is no longer built into SQL Ser
ver. Just use Windows authentication if you need this functionality, but of
course you already knew tha
t..... HTH. =)|||Ricky - With the OS security, it can detect when someone tries to access SQL
Server with a SQL login and fails? I am not so worried about Windows logins
, but I want to prevent people opening up QA and trying to run a script on a
database using their appli
cation's SQL login.
Kevin - I found the SQL Server security feature on the Security tab of Serve
r Properties in EM, and I have checked the box to audit failed logins, but w
here do the failed logins get logged?
Thanks for all your help guys!|||Failed logins would be logged to the SQL Errorlogs and the NT Application
Event log. But you'll need to restart MSSQLServer to enable the changes.
Thanks,
Kevin McDonnell
Microsoft Corporation
This posting is provided AS IS with no warranties, and confers no rights.

Friday, February 24, 2012

Intranet, windows authentication, Sql Server Login Failed for user (null)

Hi--

I am building an intRAnet website using windows authentication for website access and SQL Server access ( Trusted_Connection = true ).

In IIS I have these settings:

Allow Anonymous = unchecked (false)Windows Authentication = Checked (true)Digest windows = checked (true)

In my Web.Config file:

authentication="windows"impersonate="true"allowusers="*"

When I pull up the page these are my credentials:

Security.Principal.Windows: mydomain\myuserid (this is correct what it shows on my page)

Me.User.Identity: mydomain\myuserid (this is correct what it shows on my page)

Threading.currentThread.currentUser mydomain\myuserid (this is correct what it shows on my page)

So the ASP.NET page recognizes it is me and my domain. However, when i click a button to pull some data from a database I get the error message: Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

My data access on SQL Server works fine. The weird thing is when I debug on my machine it pulls data fine. but when I copy the files to the windows 2003 server it doesn't work.

Do i have to do something with delegation?

some guys and i did some research and we think that kerberos delegation is not enabled on our domain in active directory.

When i take off digest, and select basic authentication the credentials pass...but i don't want that.

Sunday, February 19, 2012

Internet URL Access

I am creating a web appliction to access Reporting Service, but I got some
problem
1. User loges on web application via Forms Authentication
2. User types in report parameters.
3. Program gets all parameters, then call Reporting Server URL to get report.
It works fine with intranet, but it doesn't work with internet, because the
reporting service uses Windows Authentication. I don't want allow Anonymous
access Reporing service.
What should I do?Can you use the RS web service to render your reports? The user can log
into your app as normal, and in your code, you supply credentials (that will
authenticate) to the RS web service and return the report as PDF, etc.
Or you can set the RS up to use Forms Authentication and have your users go
directly there:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dnsql2k/html/ufairs.asp
--
Adrian M.
MCP
"pepcag" <pepcag@.discussions.microsoft.com> wrote in message
news:6F030717-3E37-40D2-B5D4-3AF49338DF27@.microsoft.com...
>I am creating a web appliction to access Reporting Service, but I got some
> problem
> 1. User loges on web application via Forms Authentication
> 2. User types in report parameters.
> 3. Program gets all parameters, then call Reporting Server URL to get
> report.
> It works fine with intranet, but it doesn't work with internet, because
> the
> reporting service uses Windows Authentication. I don't want allow
> Anonymous
> access Reporing service.
> What should I do?