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

Wednesday, March 28, 2012

Help! Users can't connect to database

Hello -
I am new to Sql Server 2005 and most probably screwed something up. I am
getting an error "The user is not associated with a trusted Sql Server
connection" when accessing my app using a regular user login.
Is NT Authority\System supposed to be both under Security/Users in MyDB and
also under the Server Security\Logins? i.e.
MyServer\DatabasesMyDatabase\Security\Us
ers\NT AUTHORITY\SYSTEM
and
MyServer\Security\Logins\NT AUTHORITY\SYSTEM
Also, is there a quick tutorial somewhere on EXACTLY how to set up users and
their rights?
Any help will be greatly appreciated! I am supposed to have this out
tomorrow --
YIKES!!
--
SandyThis normally when sql server is not able to authentic the connection to a
domain account. This can happen when the user connecting to sql server has
not logged there machine onto the domain prior to connecting to the domain
where SQL Server lives. Or you are trying to connect to SQL Server via an
application that lives on a different machine then the user, and the databas
e
server, so you your command is taking a double hoop to get to sql server.
Have you tried to connect via SQL Server authentication? "Sandy" wrote:

> Hello -
> I am new to Sql Server 2005 and most probably screwed something up. I am
> getting an error "The user is not associated with a trusted Sql Server
> connection" when accessing my app using a regular user login.
> Is NT Authority\System supposed to be both under Security/Users in MyDB an
d
> also under the Server Security\Logins? i.e.
> MyServer\DatabasesMyDatabase\Security\Us
ers\NT AUTHORITY\SYSTEM
> and
> MyServer\Security\Logins\NT AUTHORITY\SYSTEM
> Also, is there a quick tutorial somewhere on EXACTLY how to set up users a
nd
> their rights?
> Any help will be greatly appreciated! I am supposed to have this out
> tomorrow --
> YIKES!!
> --
> Sandy|||Hi Greg -
Thanks so much for your response!
I am at home now and don't have access to the database or Sql Server at work
presently, but from my recollection, I have the NT Authority\System as the
login for both the Server and the database. I think that's wrong and I
should probably delete the NT Authority\System from the database part.
At any rate, the application resides on a server on the K drive. All users
are members of AAA\CustomerService in the Active Directory. Sql Server
resides on Machine DAO401235. All users obviously have their own machines.
I thought this would be simple -- just Windows authentication, then set the
role so that Windows user account can have access to all the stored
procedures and are denied access to the tables. I also thought it would be
something that could be easily done through the GUI and not code.
I have purchased several books since this post (yes, just a couple of hours
ago -- that's how frantic I am) and all of them are oriented towards setting
Sql Server logins, instead of using Windows Authority. I would suspect they
don't even cover the Windows stuff because it's too simplistic. I can't,
however figure it out myself and apparently need it "spoon fed."
Can you give me clues on how to set this up?
Thanks again for your reply and please stay with me on this, if you can!
--
Sandy
"Greg Larsen" wrote:
> This normally when sql server is not able to authentic the connection to a
> domain account. This can happen when the user connecting to sql server h
as
> not logged there machine onto the domain prior to connecting to the domain
> where SQL Server lives. Or you are trying to connect to SQL Server via an
> application that lives on a different machine then the user, and the datab
ase
> server, so you your command is taking a double hoop to get to sql server.
> Have you tried to connect via SQL Server authentication? "Sandy" wrote:
>|||Sandy,
After the user is added to SQL add the user to the database in which
they need access. Check to make sure that the default database for the user
is set to the database for the application. Once given rights to log into
SQL the user will then go to their default database or the database within
the connection string. Authentication fails if the user does not have right
s
within the specified database.
"Sandy" wrote:
> Hi Greg -
> Thanks so much for your response!
> I am at home now and don't have access to the database or Sql Server at wo
rk
> presently, but from my recollection, I have the NT Authority\System as the
> login for both the Server and the database. I think that's wrong and I
> should probably delete the NT Authority\System from the database part.
> At any rate, the application resides on a server on the K drive. All user
s
> are members of AAA\CustomerService in the Active Directory. Sql Server
> resides on Machine DAO401235. All users obviously have their own machines
.
> I thought this would be simple -- just Windows authentication, then set th
e
> role so that Windows user account can have access to all the stored
> procedures and are denied access to the tables. I also thought it would b
e
> something that could be easily done through the GUI and not code.
> I have purchased several books since this post (yes, just a couple of hour
s
> ago -- that's how frantic I am) and all of them are oriented towards setti
ng
> Sql Server logins, instead of using Windows Authority. I would suspect th
ey
> don't even cover the Windows stuff because it's too simplistic. I can't,
> however figure it out myself and apparently need it "spoon fed."
> Can you give me clues on how to set this up?
> Thanks again for your reply and please stay with me on this, if you can!
> --
> Sandy
>
> "Greg Larsen" wrote:
>|||What exactly do you mean by when you say "I have the NT Authority\System as
the login for both the Server and the database"? The "NT Authority\System"
account known as the "Local System" account, or the Local "Administrator"
account on a computer. This account can only be used to access resource
locally on the machine, and not network resources. So basically this is not
an account any user might connect to your database with. The "NT
Authority\System" account might only be used if you where to login to your
sql server machine locally as "Administrator".
In order for your users to connect using windows authentication, you would
need to add the users domain\user account to sql server. Or grant a windows
group in which the users reside to sql server. The users would then also
need to be given permissions to the database for which you want to give them
access.
"Sandy" wrote:
> Hi Greg -
> Thanks so much for your response!
> I am at home now and don't have access to the database or Sql Server at wo
rk
> presently, but from my recollection, I have the NT Authority\System as the
> login for both the Server and the database. I think that's wrong and I
> should probably delete the NT Authority\System from the database part.
> At any rate, the application resides on a server on the K drive. All user
s
> are members of AAA\CustomerService in the Active Directory. Sql Server
> resides on Machine DAO401235. All users obviously have their own machines
.
> I thought this would be simple -- just Windows authentication, then set th
e
> role so that Windows user account can have access to all the stored
> procedures and are denied access to the tables. I also thought it would b
e
> something that could be easily done through the GUI and not code.
> I have purchased several books since this post (yes, just a couple of hour
s
> ago -- that's how frantic I am) and all of them are oriented towards setti
ng
> Sql Server logins, instead of using Windows Authority. I would suspect th
ey
> don't even cover the Windows stuff because it's too simplistic. I can't,
> however figure it out myself and apparently need it "spoon fed."
> Can you give me clues on how to set this up?
> Thanks again for your reply and please stay with me on this, if you can!
> --
> Sandy
>
> "Greg Larsen" wrote:
>|||Thanks for your response, Derekman!

> After the user is added to SQL add the user to the database in which
> they need access.
"After the user is added to SQL" - Do you mean something like:
Create Login [AAA\jcpracti] from Windows;
"add the user to the database in which they need access" - Do you mean:
Use MyDatabase
Create User [AAA\jcpracti]

> Check to make sure that the default database for the user
> is set to the database for the application.
How do I do this?
Also, I am puzzled by the fact that NT Authority\System keeps being put unde
r
MyDatabase\Security\Users\NT AUTHORITY\SYSTEM when I create a new user. I
didn't think it belonged here, but Sql Server keeps throwing it in.
It's already under the Security folder for the Sql Server Instance.
Any help will be greatly appreciated!
Sandy
"Derekman" wrote:
> Sandy,
> After the user is added to SQL add the user to the database in which
> they need access. Check to make sure that the default database for the us
er
> is set to the database for the application. Once given rights to log into
> SQL the user will then go to their default database or the database within
> the connection string. Authentication fails if the user does not have rig
hts
> within the specified database.
> "Sandy" wrote:
>|||Hi -
I misspoke - I meant to refer to the folders on the left in Management
Studio --
Under the Server\Security\Logins is an icon that says NT AUTHORITY\SYSTEM an
d
also under MyDatabase\Security\Users is another icon that says NT
AUTHORITY\SYSTEM. Should both of these be there?

>In order for your users to connect using windows authentication, you would
>need to add the users domain\user account to sql server. Or grant a window
s
>group in which the users reside to sql server.
Where and how would I do this? Also, what do you mean by "...add....TO SQL
SERVER" and "...grant...TO SQL SERVER? That brings up connotations to me of
using Sql Server authentication.
I am sooooo completely with the language used in this security thin
g!
Sandy
"Greg Larsen" wrote:
> What exactly do you mean by when you say "I have the NT Authority\System a
s
> the login for both the Server and the database"? The "NT Authority\System
"
> account known as the "Local System" account, or the Local "Administrator"
> account on a computer. This account can only be used to access resource
> locally on the machine, and not network resources. So basically this is n
ot
> an account any user might connect to your database with. The "NT
> Authority\System" account might only be used if you where to login to your
> sql server machine locally as "Administrator".
> In order for your users to connect using windows authentication, you would
> need to add the users domain\user account to sql server. Or grant a windo
ws
> group in which the users reside to sql server. The users would then also
> need to be given permissions to the database for which you want to give th
em
> access.
> "Sandy" wrote:
>|||You can add user in Management Studio under the "Security\Login
folder. To do this right click on the Logins folder and select "New
Login..." in the "New Login" page enter the <domain>\<user> in the "Login
Name" field with the "Windows Authentication" button set. Then under "User
Mappings" give them access to the correct database and role. Hope this make
sense.
For SQL Server examples check out my website at:
http://www.geocities.com/sqlserverexamples
"Sandy" wrote:
> Hi -
> I misspoke - I meant to refer to the folders on the left in Management
> Studio --
> Under the Server\Security\Logins is an icon that says NT AUTHORITY\SYSTEM
and
> also under MyDatabase\Security\Users is another icon that says NT
> AUTHORITY\SYSTEM. Should both of these be there?
>
> Where and how would I do this? Also, what do you mean by "...add....TO S
QL
> SERVER" and "...grant...TO SQL SERVER? That brings up connotations to me
of
> using Sql Server authentication.
> I am sooooo completely with the language used in this security th
ing!
> --
> Sandy
>
> "Greg Larsen" wrote:
>|||Thanks, Greg.
I tried it and I'm still getting the message
Login failed for user ". The user is not associated with
a trusted SQL Server connection.
BTW, isn't the user name normally in the error message?
At any rate, I'm at my wits end and probably at the end of this job (as in
fired). Any other ideas about what could be causing this?
Thanks again for your patience!
Sandy
"Greg Larsen" wrote:
> You can add user in Management Studio under the "Security\Login
> folder. To do this right click on the Logins folder and select "New
> Login..." in the "New Login" page enter the <domain>\<user> in the "Login
> Name" field with the "Windows Authentication" button set. Then under "Us
er
> Mappings" give them access to the correct database and role. Hope this ma
ke
> sense.
> --
> For SQL Server examples check out my website at:
> http://www.geocities.com/sqlserverexamples
> "Sandy" wrote:
>|||Sandy,
Follow Greg's instructions and that should fix it. You can also use
T-SQL to do the same task, but this way is definitely easier.
You had also asked about training. the below link takes you to on
demand web casts. Kimberly Tripp recently completed an 11 part web series,
TechNet Webcast: SQL Server 2005 for the IT Professional, that would
definitely help along with numerous other webcasts that are available.
You can also go to http://www.microsoft.com/sql/eval/e-learn.mspx which will
provide more free courses from Microsofton SQL 2005.
Good Luck
"Greg Larsen" wrote:
> You can add user in Management Studio under the "Security\Login
> folder. To do this right click on the Logins folder and select "New
> Login..." in the "New Login" page enter the <domain>\<user> in the "Login
> Name" field with the "Windows Authentication" button set. Then under "Us
er
> Mappings" give them access to the correct database and role. Hope this ma
ke
> sense.
> --
> For SQL Server examples check out my website at:
> http://www.geocities.com/sqlserverexamples
> "Sandy" wrote:
>sql

Monday, March 26, 2012

HELP! sp_send_dbmail error

I'm having trouble sending an email through DBMail. I'm logged in a a SQL Login user named "ServiceUser". I have added this user to the msdb database and as a rolemember to "DatabaseMailUserRole"

USE [msdb]

GO

CREATEUSER [ServiceUser] FORLOGIN [ServiceUser] WITHDEFAULT_SCHEMA=[guest]

GO

USE [msdb]

GO

EXEC sp_addrolemember N'DatabaseMailUserRole', N'ServiceUser'

GO

When I try to send the email:

exec msdb.dbo.sp_send_dbmail

@.profile_name=@.DatabaseMailProfileToUse,

@.recipients=@.EmailAddress,

@.subject=@.Subject,

@.body=@.MessageBody,

@.mailitem_id=@.MYmailitem_id OUTPUT

I get the following error:

Msg 15404, Level 16, State 10, Procedure xp_logininfo, Line 62

Could not obtain information about Windows NT group/user 'ServiceUser', error code 0xffff0002.

I executed the following on msdb and it didn't help:

execsp_changedbowner'sa'

xp_logininfo also returns the error:

EXECxp_logininfo'ServiceUser'

What is wrong? HELP!

My database mail profile was not public! It needs to be public or set to private for the user that is going to access it.

Help! sp_dboption

I was trying to set a database to single user only but it
was taking some time (about a minute) so I cancelled the
query.
It is still attempting to cancel 6 mintes later...
any ideas?
Hi ,
If it is sql 2000, execute:-
Alter database <dbname> set single_user with rollback immediate
If it is SQL 7 or older version:-
Kill all the users connected to the database first then use sp_dboption
sp_dboption 'dbname','single user',true
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
> I was trying to set a database to single user only but it
> was taking some time (about a minute) so I cancelled the
> query.
> It is still attempting to cancel 6 mintes later...
> any ideas?
|||i eventually got a connection broken error message.
problem is I can't access the database now either through
query analyser or enterprise manager.

>--Original Message--
>Hi ,
>If it is sql 2000, execute:-
>Alter database <dbname> set single_user with rollback
immediate
>If it is SQL 7 or older version:-
>Kill all the users connected to the database first then
use sp_dboption[vbcol=seagreen]
>sp_dboption 'dbname','single user',true
>--
>Thanks
>Hari
>MCDBA
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
it
>
>.
>
|||There may be someone else, who is the single user... Do an sp_who and see
who that is and perhaps kill them
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
<anonymous@.discussions.microsoft.com> wrote in message
news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...[vbcol=seagreen]
> i eventually got a connection broken error message.
> problem is I can't access the database now either through
> query analyser or enterprise manager.
> immediate
> use sp_dboption
> it
|||no other users except me...i can;t access the database at
all now.
>--Original Message--
>There may be someone else, who is the single user... Do
an sp_who and see
>who that is and perhaps kill them
>--
>Wayne Snyder, MCDBA, SQL Server MVP
>Mariner, Charlotte, NC
>www.mariner-usa.com
>(Please respond only to the newsgroups.)
>I support the Professional Association of SQL Server
(PASS) and it's[vbcol=seagreen]
>community of SQL Server professionals.
>www.sqlpass.org
><anonymous@.discussions.microsoft.com> wrote in message
>news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
through[vbcol=seagreen]
but[vbcol=seagreen]
the
>
>.
>
|||anon,
What error do you get? What status is the database in? Run this in master:
select status from sysdatabases where name = <yourdbname>
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:[vbcol=seagreen]
> no other users except me...i can;t access the database at
> all now.
>
> an sp_who and see
>
> (PASS) and it's
>
> through
>
> but
>
> the
|||OK, now what error do you get when you type in
use <mydb>
in Query Analyzer?
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:[vbcol=seagreen]
> status is 12
> BTW I am using SQL 7.0
>
> Run this in master:
>
> at
>
> then
|||takes a while to run this, so i stopped it - the database
is a test db, but it is sitting on the production server.
i don't want to run anything that might crash the server.
what is the 'safest' thing to do?
[vbcol=seagreen]
>--Original Message--
>OK, now what error do you get when you type in
>use <mydb>
>in Query Analyzer?
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
<yourdbname>[vbcol=seagreen]
Do[vbcol=seagreen]
rollback[vbcol=seagreen]
message[vbcol=seagreen]
cancelled
>.
>
|||Can you try detaching and attaching the database? You can do this in EM,
or using sp_detach_db, sp_attach_db - look them up in BOL.
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:
> takes a while to run this, so i stopped it - the database
> is a test db, but it is sitting on the production server.
> i don't want to run anything that might crash the server.
> what is the 'safest' thing to do?
>
|||just checked the SQL logs, and the following error
appeared first:
Could not open FCB for invalid file ID 49154 in database
<dbname>. Table or database may be corrupted..
Since then, getting the following error:
Time out occurred while waiting for buffer latch type 2,
bp 0x14b7be40, page (49154:-1325224958), stat 0x405,
object ID 10:641697634:0, waittime 5000. Continuing to
wait.

>--Original Message--
>Can you try detaching and attaching the database? You can
do this in EM,[vbcol=seagreen]
>or using sp_detach_db, sp_attach_db - look them up in BOL.
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
database[vbcol=seagreen]
server.[vbcol=seagreen]
server.
>.
>

Help! sp_dboption

I was trying to set a database to single user only but it
was taking some time (about a minute) so I cancelled the
query.
It is still attempting to cancel 6 mintes later...
any ideas?Hi ,
If it is sql 2000, execute:-
Alter database <dbname> set single_user with rollback immediate
If it is SQL 7 or older version:-
Kill all the users connected to the database first then use sp_dboption
sp_dboption 'dbname','single user',true
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:2810701c46417$0328d6d0$a401280a@.phx
.gbl...
> I was trying to set a database to single user only but it
> was taking some time (about a minute) so I cancelled the
> query.
> It is still attempting to cancel 6 mintes later...
> any ideas?|||i eventually got a connection broken error message.
problem is I can't access the database now either through
query analyser or enterprise manager.

>--Original Message--
>Hi ,
>If it is sql 2000, execute:-
>Alter database <dbname> set single_user with rollback
immediate
>If it is SQL 7 or older version:-
>Kill all the users connected to the database first then
use sp_dboption
>sp_dboption 'dbname','single user',true
>--
>Thanks
>Hari
>MCDBA
>
><anonymous@.discussions.microsoft.com> wrote in message
> news:2810701c46417$0328d6d0$a401280a@.phx
.gbl...
it[vbcol=seagreen]
>
>.
>|||There may be someone else, who is the single user... Do an sp_who and see
who that is and perhaps kill them
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
<anonymous@.discussions.microsoft.com> wrote in message
news:27fb401c46419$10b11fe0$a501280a@.phx
.gbl...[vbcol=seagreen]
> i eventually got a connection broken error message.
> problem is I can't access the database now either through
> query analyser or enterprise manager.
>
> immediate
> use sp_dboption
> it|||no other users except me...i can;t access the database at
all now.
>--Original Message--
>There may be someone else, who is the single user... Do
an sp_who and see
>who that is and perhaps kill them
>--
>Wayne Snyder, MCDBA, SQL Server MVP
>Mariner, Charlotte, NC
>www.mariner-usa.com
>(Please respond only to the newsgroups.)
>I support the Professional Association of SQL Server
(PASS) and it's
>community of SQL Server professionals.
>www.sqlpass.org
><anonymous@.discussions.microsoft.com> wrote in message
> news:27fb401c46419$10b11fe0$a501280a@.phx
.gbl...
through[vbcol=seagreen]
but[vbcol=seagreen]
the[vbcol=seagreen]
>
>.
>|||anon,
What error do you get? What status is the database in? Run this in master:
select status from sysdatabases where name = <yourdbname>
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:[vbcol=seagreen]
> no other users except me...i can;t access the database at
> all now.
>
> an sp_who and see
>
> (PASS) and it's
>
> through
>
> but
>
> the
>|||OK, now what error do you get when you type in
use <mydb>
in Query Analyzer?
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:[vbcol=seagreen]
> status is 12
> BTW I am using SQL 7.0
>
> Run this in master:
>
> at
>
> then
>|||takes a while to run this, so i stopped it - the database
is a test db, but it is sitting on the production server.
i don't want to run anything that might crash the server.
what is the 'safest' thing to do?

>--Original Message--
>OK, now what error do you get when you type in
>use <mydb>
>in Query Analyzer?
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
<yourdbname>[vbcol=seagreen]
Do[vbcol=seagreen]
rollback[vbcol=seagreen]
message[vbcol=seagreen]
cancelled[vbcol=seagreen]
>.
>|||Can you try detaching and attaching the database? You can do this in EM,
or using sp_detach_db, sp_attach_db - look them up in BOL.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:
> takes a while to run this, so i stopped it - the database
> is a test db, but it is sitting on the production server.
> i don't want to run anything that might crash the server.
> what is the 'safest' thing to do?
>|||just checked the SQL logs, and the following error
appeared first:
Could not open FCB for invalid file ID 49154 in database
<dbname>. Table or database may be corrupted..
Since then, getting the following error:
Time out occurred while waiting for buffer latch type 2,
bp 0x14b7be40, page (49154:-1325224958), stat 0x405,
object ID 10:641697634:0, waittime 5000. Continuing to
wait.

>--Original Message--
>Can you try detaching and attaching the database? You can
do this in EM,
>or using sp_detach_db, sp_attach_db - look them up in BOL.
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
database[vbcol=seagreen]
server.[vbcol=seagreen]
server.[vbcol=seagreen]
>.
>

Help! sp_dboption

I was trying to set a database to single user only but it
was taking some time (about a minute) so I cancelled the
query.
It is still attempting to cancel 6 mintes later...
any ideas?Hi ,
If it is sql 2000, execute:-
Alter database <dbname> set single_user with rollback immediate
If it is SQL 7 or older version:-
Kill all the users connected to the database first then use sp_dboption
sp_dboption 'dbname','single user',true
--
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
> I was trying to set a database to single user only but it
> was taking some time (about a minute) so I cancelled the
> query.
> It is still attempting to cancel 6 mintes later...
> any ideas?|||i eventually got a connection broken error message.
problem is I can't access the database now either through
query analyser or enterprise manager.
>--Original Message--
>Hi ,
>If it is sql 2000, execute:-
>Alter database <dbname> set single_user with rollback
immediate
>If it is SQL 7 or older version:-
>Kill all the users connected to the database first then
use sp_dboption
>sp_dboption 'dbname','single user',true
>--
>Thanks
>Hari
>MCDBA
>
><anonymous@.discussions.microsoft.com> wrote in message
>news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
>> I was trying to set a database to single user only but
it
>> was taking some time (about a minute) so I cancelled the
>> query.
>> It is still attempting to cancel 6 mintes later...
>> any ideas?
>
>.
>|||There may be someone else, who is the single user... Do an sp_who and see
who that is and perhaps kill them
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
<anonymous@.discussions.microsoft.com> wrote in message
news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
> i eventually got a connection broken error message.
> problem is I can't access the database now either through
> query analyser or enterprise manager.
> >--Original Message--
> >Hi ,
> >
> >If it is sql 2000, execute:-
> >
> >Alter database <dbname> set single_user with rollback
> immediate
> >
> >If it is SQL 7 or older version:-
> >
> >Kill all the users connected to the database first then
> use sp_dboption
> >
> >sp_dboption 'dbname','single user',true
> >
> >--
> >Thanks
> >Hari
> >MCDBA
> >
> >
> ><anonymous@.discussions.microsoft.com> wrote in message
> >news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
> >> I was trying to set a database to single user only but
> it
> >> was taking some time (about a minute) so I cancelled the
> >> query.
> >>
> >> It is still attempting to cancel 6 mintes later...
> >>
> >> any ideas?
> >
> >
> >.
> >|||no other users except me...i can;t access the database at
all now.
>--Original Message--
>There may be someone else, who is the single user... Do
an sp_who and see
>who that is and perhaps kill them
>--
>Wayne Snyder, MCDBA, SQL Server MVP
>Mariner, Charlotte, NC
>www.mariner-usa.com
>(Please respond only to the newsgroups.)
>I support the Professional Association of SQL Server
(PASS) and it's
>community of SQL Server professionals.
>www.sqlpass.org
><anonymous@.discussions.microsoft.com> wrote in message
>news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
>> i eventually got a connection broken error message.
>> problem is I can't access the database now either
through
>> query analyser or enterprise manager.
>> >--Original Message--
>> >Hi ,
>> >
>> >If it is sql 2000, execute:-
>> >
>> >Alter database <dbname> set single_user with rollback
>> immediate
>> >
>> >If it is SQL 7 or older version:-
>> >
>> >Kill all the users connected to the database first then
>> use sp_dboption
>> >
>> >sp_dboption 'dbname','single user',true
>> >
>> >--
>> >Thanks
>> >Hari
>> >MCDBA
>> >
>> >
>> ><anonymous@.discussions.microsoft.com> wrote in message
>> >news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
>> >> I was trying to set a database to single user only
but
>> it
>> >> was taking some time (about a minute) so I cancelled
the
>> >> query.
>> >>
>> >> It is still attempting to cancel 6 mintes later...
>> >>
>> >> any ideas?
>> >
>> >
>> >.
>> >
>
>.
>|||anon,
What error do you get? What status is the database in? Run this in master:
select status from sysdatabases where name = <yourdbname>
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:
> no other users except me...i can;t access the database at
> all now.
>>--Original Message--
>>There may be someone else, who is the single user... Do
> an sp_who and see
>>who that is and perhaps kill them
>>--
>>Wayne Snyder, MCDBA, SQL Server MVP
>>Mariner, Charlotte, NC
>>www.mariner-usa.com
>>(Please respond only to the newsgroups.)
>>I support the Professional Association of SQL Server
> (PASS) and it's
>>community of SQL Server professionals.
>>www.sqlpass.org
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
>>i eventually got a connection broken error message.
>>problem is I can't access the database now either
> through
>>query analyser or enterprise manager.
>>
>>--Original Message--
>>Hi ,
>>If it is sql 2000, execute:-
>>Alter database <dbname> set single_user with rollback
>>immediate
>>If it is SQL 7 or older version:-
>>Kill all the users connected to the database first then
>>use sp_dboption
>>sp_dboption 'dbname','single user',true
>>--
>>Thanks
>>Hari
>>MCDBA
>>
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
>>I was trying to set a database to single user only
> but
>>it
>>was taking some time (about a minute) so I cancelled
> the
>>query.
>>It is still attempting to cancel 6 mintes later...
>>any ideas?
>>
>>.
>>
>>.|||status is 12
BTW I am using SQL 7.0
>--Original Message--
>anon,
>What error do you get? What status is the database in?
Run this in master:
>select status from sysdatabases where name = <yourdbname>
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
>> no other users except me...i can;t access the database
at
>> all now.
>>--Original Message--
>>There may be someone else, who is the single user... Do
>> an sp_who and see
>>who that is and perhaps kill them
>>--
>>Wayne Snyder, MCDBA, SQL Server MVP
>>Mariner, Charlotte, NC
>>www.mariner-usa.com
>>(Please respond only to the newsgroups.)
>>I support the Professional Association of SQL Server
>> (PASS) and it's
>>community of SQL Server professionals.
>>www.sqlpass.org
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
>>i eventually got a connection broken error message.
>>problem is I can't access the database now either
>> through
>>query analyser or enterprise manager.
>>
>>--Original Message--
>>Hi ,
>>If it is sql 2000, execute:-
>>Alter database <dbname> set single_user with rollback
>>immediate
>>If it is SQL 7 or older version:-
>>Kill all the users connected to the database first
then
>>use sp_dboption
>>sp_dboption 'dbname','single user',true
>>--
>>Thanks
>>Hari
>>MCDBA
>>
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
>>I was trying to set a database to single user only
>> but
>>it
>>was taking some time (about a minute) so I cancelled
>> the
>>query.
>>It is still attempting to cancel 6 mintes later...
>>any ideas?
>>
>>.
>>
>>.
>.
>|||OK, now what error do you get when you type in
use <mydb>
in Query Analyzer?
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:
> status is 12
> BTW I am using SQL 7.0
>>--Original Message--
>>anon,
>>What error do you get? What status is the database in?
> Run this in master:
>>select status from sysdatabases where name = <yourdbname>
>>--
>>Mark Allison, SQL Server MVP
>>http://www.markallison.co.uk
>>Looking for a SQL Server replication book?
>>http://www.nwsu.com/0974973602.html
>>
>>anonymous@.discussions.microsoft.com wrote:
>>no other users except me...i can;t access the database
> at
>>all now.
>>
>>--Original Message--
>>There may be someone else, who is the single user... Do
>>an sp_who and see
>>
>>who that is and perhaps kill them
>>--
>>Wayne Snyder, MCDBA, SQL Server MVP
>>Mariner, Charlotte, NC
>>www.mariner-usa.com
>>(Please respond only to the newsgroups.)
>>I support the Professional Association of SQL Server
>>(PASS) and it's
>>
>>community of SQL Server professionals.
>>www.sqlpass.org
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
>>
>>i eventually got a connection broken error message.
>>problem is I can't access the database now either
>>through
>>
>>query analyser or enterprise manager.
>>
>>--Original Message--
>>Hi ,
>>If it is sql 2000, execute:-
>>Alter database <dbname> set single_user with rollback
>>immediate
>>
>>If it is SQL 7 or older version:-
>>Kill all the users connected to the database first
> then
>>use sp_dboption
>>
>>sp_dboption 'dbname','single user',true
>>--
>>Thanks
>>Hari
>>MCDBA
>>
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
>>
>>>I was trying to set a database to single user only
>>but
>>
>>it
>>
>>>was taking some time (about a minute) so I cancelled
>>the
>>
>>>query.
>>>
>>>It is still attempting to cancel 6 mintes later...
>>>
>>>any ideas?
>>
>>.
>>
>>.
>>
>>.|||takes a while to run this, so i stopped it - the database
is a test db, but it is sitting on the production server.
i don't want to run anything that might crash the server.
what is the 'safest' thing to do?
>--Original Message--
>OK, now what error do you get when you type in
>use <mydb>
>in Query Analyzer?
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
>> status is 12
>> BTW I am using SQL 7.0
>>--Original Message--
>>anon,
>>What error do you get? What status is the database in?
>> Run this in master:
>>select status from sysdatabases where name =<yourdbname>
>>--
>>Mark Allison, SQL Server MVP
>>http://www.markallison.co.uk
>>Looking for a SQL Server replication book?
>>http://www.nwsu.com/0974973602.html
>>
>>anonymous@.discussions.microsoft.com wrote:
>>no other users except me...i can;t access the database
>> at
>>all now.
>>
>>--Original Message--
>>There may be someone else, who is the single user...
Do
>>an sp_who and see
>>
>>who that is and perhaps kill them
>>--
>>Wayne Snyder, MCDBA, SQL Server MVP
>>Mariner, Charlotte, NC
>>www.mariner-usa.com
>>(Please respond only to the newsgroups.)
>>I support the Professional Association of SQL Server
>>(PASS) and it's
>>
>>community of SQL Server professionals.
>>www.sqlpass.org
>><anonymous@.discussions.microsoft.com> wrote in message
>>news:27fb401c46419$10b11fe0$a501280a@.phx.gbl...
>>
>>i eventually got a connection broken error message.
>>problem is I can't access the database now either
>>through
>>
>>query analyser or enterprise manager.
>>
>>>--Original Message--
>>>Hi ,
>>>
>>>If it is sql 2000, execute:-
>>>
>>>Alter database <dbname> set single_user with
rollback
>>immediate
>>
>>>If it is SQL 7 or older version:-
>>>
>>>Kill all the users connected to the database first
>> then
>>use sp_dboption
>>
>>>sp_dboption 'dbname','single user',true
>>>
>>>--
>>>Thanks
>>>Hari
>>>MCDBA
>>>
>>>
>>><anonymous@.discussions.microsoft.com> wrote in
message
>>>news:2810701c46417$0328d6d0$a401280a@.phx.gbl...
>>>
>>>
>>>I was trying to set a database to single user only
>>but
>>
>>it
>>
>>>was taking some time (about a minute) so I
cancelled
>>the
>>
>>>query.
>>>
>>>It is still attempting to cancel 6 mintes later...
>>>
>>>any ideas?
>>>
>>>
>>>.
>>>
>>
>>.
>>
>>.
>.
>|||Can you try detaching and attaching the database? You can do this in EM,
or using sp_detach_db, sp_attach_db - look them up in BOL.
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
anonymous@.discussions.microsoft.com wrote:
> takes a while to run this, so i stopped it - the database
> is a test db, but it is sitting on the production server.
> i don't want to run anything that might crash the server.
> what is the 'safest' thing to do?
>|||just checked the SQL logs, and the following error
appeared first:
Could not open FCB for invalid file ID 49154 in database
<dbname>. Table or database may be corrupted..
Since then, getting the following error:
Time out occurred while waiting for buffer latch type 2,
bp 0x14b7be40, page (49154:-1325224958), stat 0x405,
object ID 10:641697634:0, waittime 5000. Continuing to
wait.
>--Original Message--
>Can you try detaching and attaching the database? You can
do this in EM,
>or using sp_detach_db, sp_attach_db - look them up in BOL.
>--
>Mark Allison, SQL Server MVP
>http://www.markallison.co.uk
>Looking for a SQL Server replication book?
>http://www.nwsu.com/0974973602.html
>
>anonymous@.discussions.microsoft.com wrote:
>> takes a while to run this, so i stopped it - the
database
>> is a test db, but it is sitting on the production
server.
>> i don't want to run anything that might crash the
server.
>> what is the 'safest' thing to do?
>>
>.
>|||Hi,
It seems the database is corrupted. You have to restore from the last known
good backup file.
Thanks
Hari
MCDBA
<anonymous@.discussions.microsoft.com> wrote in message
news:2859d01c4643c$cbcb4c10$a401280a@.phx.gbl...
> just checked the SQL logs, and the following error
> appeared first:
> Could not open FCB for invalid file ID 49154 in database
> <dbname>. Table or database may be corrupted..
> Since then, getting the following error:
> Time out occurred while waiting for buffer latch type 2,
> bp 0x14b7be40, page (49154:-1325224958), stat 0x405,
> object ID 10:641697634:0, waittime 5000. Continuing to
> wait.
> >--Original Message--
> >Can you try detaching and attaching the database? You can
> do this in EM,
> >or using sp_detach_db, sp_attach_db - look them up in BOL.
> >--
> >Mark Allison, SQL Server MVP
> >http://www.markallison.co.uk
> >
> >Looking for a SQL Server replication book?
> >http://www.nwsu.com/0974973602.html
> >
> >
> >
> >anonymous@.discussions.microsoft.com wrote:
> >> takes a while to run this, so i stopped it - the
> database
> >> is a test db, but it is sitting on the production
> server.
> >> i don't want to run anything that might crash the
> server.
> >> what is the 'safest' thing to do?
> >>
> >>
> >.
> >

HELP! sp or other tool to help diagnose recent record deletion?

I'm trying to trouble shoot an app that after two years of running
more or less fine has suddenly had a problem. An average user was
filling out a web form and clicked save, only to have their entire
multi page report form get obliterated. This user has no delete
rights, and even if they had pressed cancel the ASP page would simply
not write that page...but would not delete the entire series of
records.
I am stepping through ASP code and trying to recreate the problem but
I'm relatively new to SQL and not sure what sytem stored procedures or
functions might help me...records of recent deletes (within the last
few hours), userinfo (who really deleted the record)? Etc.
Coincidentally (perhaps) this server was nearly full (aprox 700 megs
left). I know...this is terrible. I've been harping my sysadmin to get
some non DB related stuff off my SQL server and we cleared a few Gigs
off this morning! Anyway, it's very likely the cause...again...could
someone point me to what logs or functions or documentation I should
be looking at that might help me verify this?
Many thanks!!
This might help you -- these guys have some good tools. I recommend,
though, that you restore the database to another area on the server and
compare the data with some custom queries to see what's missing...
http://www.red-gate.com/products/SQL_Log_Rescue/index.htm?gclid=CK-roqn2mIoCFRyVFQodbFaonQ
mahalie@.gmail.com wrote:
> I'm trying to trouble shoot an app that after two years of running
> more or less fine has suddenly had a problem. An average user was
> filling out a web form and clicked save, only to have their entire
> multi page report form get obliterated. This user has no delete
> rights, and even if they had pressed cancel the ASP page would simply
> not write that page...but would not delete the entire series of
> records.
> I am stepping through ASP code and trying to recreate the problem but
> I'm relatively new to SQL and not sure what sytem stored procedures or
> functions might help me...records of recent deletes (within the last
> few hours), userinfo (who really deleted the record)? Etc.
> Coincidentally (perhaps) this server was nearly full (aprox 700 megs
> left). I know...this is terrible. I've been harping my sysadmin to get
> some non DB related stuff off my SQL server and we cleared a few Gigs
> off this morning! Anyway, it's very likely the cause...again...could
> someone point me to what logs or functions or documentation I should
> be looking at that might help me verify this?
> Many thanks!!
>
-Dave Markle
http://www.markleconsulting.com/blog
sql

HELP! sp or other tool to help diagnose recent record deletion?

I'm trying to trouble shoot an app that after two years of running
more or less fine has suddenly had a problem. An average user was
filling out a web form and clicked save, only to have their entire
multi page report form get obliterated. This user has no delete
rights, and even if they had pressed cancel the ASP page would simply
not write that page...but would not delete the entire series of
records.
I am stepping through ASP code and trying to recreate the problem but
I'm relatively new to SQL and not sure what sytem stored procedures or
functions might help me...records of recent deletes (within the last
few hours), userinfo (who really deleted the record)? Etc.
Coincidentally (perhaps) this server was nearly full (aprox 700 megs
left). I know...this is terrible. I've been harping my sysadmin to get
some non DB related stuff off my SQL server and we cleared a few Gigs
off this morning! Anyway, it's very likely the cause...again...could
someone point me to what logs or functions or documentation I should
be looking at that might help me verify this?
Many thanks!!This might help you -- these guys have some good tools. I recommend,
though, that you restore the database to another area on the server and
compare the data with some custom queries to see what's missing...
http://www.red-gate.com/products/SQL_Log_Rescue/index.htm?gclid=CK-roqn2mIoCFRyVFQodbFaonQ
mahalie@.gmail.com wrote:
> I'm trying to trouble shoot an app that after two years of running
> more or less fine has suddenly had a problem. An average user was
> filling out a web form and clicked save, only to have their entire
> multi page report form get obliterated. This user has no delete
> rights, and even if they had pressed cancel the ASP page would simply
> not write that page...but would not delete the entire series of
> records.
> I am stepping through ASP code and trying to recreate the problem but
> I'm relatively new to SQL and not sure what sytem stored procedures or
> functions might help me...records of recent deletes (within the last
> few hours), userinfo (who really deleted the record)? Etc.
> Coincidentally (perhaps) this server was nearly full (aprox 700 megs
> left). I know...this is terrible. I've been harping my sysadmin to get
> some non DB related stuff off my SQL server and we cleared a few Gigs
> off this morning! Anyway, it's very likely the cause...again...could
> someone point me to what logs or functions or documentation I should
> be looking at that might help me verify this?
> Many thanks!!
>
-Dave Markle
http://www.markleconsulting.com/blog

HELP! sp or other tool to help diagnose recent record deletion?

I'm trying to trouble shoot an app that after two years of running
more or less fine has suddenly had a problem. An average user was
filling out a web form and clicked save, only to have their entire
multi page report form get obliterated. This user has no delete
rights, and even if they had pressed cancel the ASP page would simply
not write that page...but would not delete the entire series of
records.
I am stepping through ASP code and trying to recreate the problem but
I'm relatively new to SQL and not sure what sytem stored procedures or
functions might help me...records of recent deletes (within the last
few hours), userinfo (who really deleted the record)? Etc.
Coincidentally (perhaps) this server was nearly full (aprox 700 megs
left). I know...this is terrible. I've been harping my sysadmin to get
some non DB related stuff off my SQL server and we cleared a few Gigs
off this morning! Anyway, it's very likely the cause...again...could
someone point me to what logs or functions or documentation I should
be looking at that might help me verify this?
Many thanks!!This might help you -- these guys have some good tools. I recommend,
though, that you restore the database to another area on the server and
compare the data with some custom queries to see what's missing...
http://www.red-gate.com/products/SQ...br />
odbFaonQ
mahalie@.gmail.com wrote:
> I'm trying to trouble shoot an app that after two years of running
> more or less fine has suddenly had a problem. An average user was
> filling out a web form and clicked save, only to have their entire
> multi page report form get obliterated. This user has no delete
> rights, and even if they had pressed cancel the ASP page would simply
> not write that page...but would not delete the entire series of
> records.
> I am stepping through ASP code and trying to recreate the problem but
> I'm relatively new to SQL and not sure what sytem stored procedures or
> functions might help me...records of recent deletes (within the last
> few hours), userinfo (who really deleted the record)? Etc.
> Coincidentally (perhaps) this server was nearly full (aprox 700 megs
> left). I know...this is terrible. I've been harping my sysadmin to get
> some non DB related stuff off my SQL server and we cleared a few Gigs
> off this morning! Anyway, it's very likely the cause...again...could
> someone point me to what logs or functions or documentation I should
> be looking at that might help me verify this?
> Many thanks!!
>
-Dave Markle
http://www.markleconsulting.com/blog

Friday, March 23, 2012

help! report users permission on a SQL 2000 server

hi
There are over 10 databases on my SQL server. I would like to have a report
that shows the user's permission on each database including tables, views an
d
stored procedures. At this stage, I want to know which user can run or not
stored procedures on each database. Is it possible to find permission using
system stored procedures? I read the online book of SQL server for 3 days.
But I still don't find the system stored procedures.
If this stored produres doesn't exist, I have to write a stored proceduce to
display these user's permission. Could you tell which system tables need to
be used?
Waiting for you
Million thanks in adv
Wen OUYou can use sp_helprotect, it is ran as follows:
use db1
sp_helprotect @.username = 'Username'
use db2
sp_helprotect @.username = 'Username'|||thank you for your reply
if there are more than 1 database, i have to use a cursor to access each
database and read the info.
do you have another idea?
waiting for you
thanks in adv
Wen OU
"Fany Vargas" wrote:

> You can use sp_helprotect, it is ran as follows:
> use db1
> sp_helprotect @.username = 'Username'
> use db2
> sp_helprotect @.username = 'Username'
>|||If you need to get this info for each database then you will indeed need to
loop through each database. So using a cursor to loop through each database
is a good option.
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|||thank you
I have another question. If a domain user belongs to a domain user group, is
it possible to find if this user get permissions to execute a stored
procedure? At the moment, the stored procedure i wrote only shows the
permisssion of user groups or independent users. what system stored
procedure can I use?
million thanks in adv
wen ou
"Fany Vargas [MSFT]" wrote:

> If you need to get this info for each database then you will indeed need t
o
> loop through each database. So using a cursor to loop through each databas
e
> is a good option.
> 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
>|||Look into the PERMISSIONS function. It returns a value containing a bitmap
that indicates the statement, object, or column permissions for the current
user. So you can run something like:
SELECT PERMISSIONS(OBJECT_ID('nameofobject'))
For details on how to decipher the bitmap you will need to reference BOL
article: "PERMISSIONS"
(mk:@.MSITStore:C:\Program%20Files\Micros
oft%20SQL%20Server\80\Tools\Books\ts
qlref.chm::/ts_pa-pz_6f78.htm) - in BOL, select Go->Url...
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|||Also look at the BOL topic: SETUSER
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|||thank you for your help
it's very useful for me
"Fany Vargas [MSFT]" wrote:

> Also look at the BOL topic: SETUSER
> 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
>sql

HELP! Problem with data selection.

Hi,
People, help me with problem to make the query qExpectedRESULT
I will accept any suggestion and suppositions!
Possibly use of User Defined Functions it is a right way ?
-- START of DB Objects CREATE scripts --
CREATE TABLE [dbo].[Customers] (
[AG_ID] [int] IDENTITY (1, 1) NOT NULL ,
[AG_TYPE] [tinyint] NULL ,
[AG_STATE] [tinyint] NULL ,
[AG_CODE] [smallint] NULL ,
[AG_REG_NO] [varchar] (10) COLLATE Latin1_General_CI_AS NULL ,
[AG_REG_NAME] [varchar] (200) COLLATE Latin1_General_CI_AS NULL ,
[AG_REG_DATE] [datetime] NULL ,
[AG_PRINT_NAME] [varchar] (100) COLLATE Latin1_General_CI_AS NULL ,
[AG_SEARCH_NAME] [varchar] (100) COLLATE Latin1_General_CI_AS NULL ,
[AG_CR_DATE] [datetime] NULL ,
[AG_MD_DATE] [datetime] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[DealPRICE] (
[DP_ID] [int] IDENTITY (1, 1) NOT NULL ,
[AG_ID] [int] NULL ,
[ART_ID] [int] NULL ,
[DP_DATE] [datetime] NULL ,
[DEAL_PRICE] [money] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Items] (
[ART_ID] [int] IDENTITY (1, 1) NOT NULL ,
[ART_TYPE] [tinyint] NULL ,
[ART_STATE] [tinyint] NULL ,
[ART_FOLDER_ID] [int] NULL ,
[ART_MSK_ID] [int] NULL ,
[ART_DIN_ID] [int] NULL ,
[ART_LEVEL] [tinyint] NULL ,
[ART_INDEX] [smallint] NULL ,
[ART_NO] [varchar] (12) COLLATE Latin1_General_CI_AS NULL ,
[ART_NAME] [varchar] (150) COLLATE Latin1_General_CI_AS NULL ,
[ART_V1] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
[ART_V2] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
[ART_V3] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
[ART_V4] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
[ART_V5] [varchar] (5) COLLATE Latin1_General_CI_AS NULL ,
[ART_CR_DATE] [datetime] NULL ,
[ART_MD_DATE] [datetime] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[ItemsDIN] (
[DIN_ID] [int] IDENTITY (1, 1) NOT NULL ,
[DIN_TYPE] [tinyint] NULL ,
[DIN_INDEX] [tinyint] NULL ,
[DIN_GROUP] [int] NULL ,
[DIN_NAME] [varchar] (150) COLLATE Latin1_General_CI_AS NULL ,
[DIN_ALTER] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[DIN_TEXT] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[DIN_TEXT_STR] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[DIN_PRICE_TYPE] [tinyint] NULL ,
[DIN_PRICE_UP] [money] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[ItemsMASK] (
[MSK_ID] [int] IDENTITY (1, 1) NOT NULL ,
[MSK_TYPE] [tinyint] NULL ,
[MSK_INDEX] [smallint] NULL ,
[MSK_MAIN] [varchar] (3) COLLATE Latin1_General_CI_AS NULL ,
[MSK_DESCRIPTION] [varchar] (150) COLLATE Latin1_General_CI_AS NULL ,
[MSK_MASK] [varchar] (50) COLLATE Latin1_General_CI_AS NULL ,
[MSK_PART1] [int] NULL ,
[MSK_PART2] [int] NULL ,
[MSK_PART3] [int] NULL ,
[MSK_PART4] [int] NULL ,
[MSK_PART5] [int] NULL
) ON [PRIMARY]
GO
CREATE TABLE [dbo].[Stores] (
[SKD_ID] [int] IDENTITY (1, 1) NOT NULL ,
[SKD_TYPE] [tinyint] NULL ,
[SKD_STATE] [tinyint] NULL ,
[SKD_ART_ID] [int] NULL ,
[SKD_UPDATED] [bit] NULL ,
[SKD_NOW_QUANT] [money] NULL ,
[SKD_NOW_REZRV] [money] NULL ,
[SKD_NOW_PREP] [money] NULL ,
[SKD_NOW_UNREG] [money] NULL ,
[SKD_NOW_MOD] [money] NULL ,
[SKD_NOW_NED] [money] NULL ,
[SKD_LIMIT_MIN] [money] NULL ,
[SKD_LIMIT_MAX] [money] NULL ,
[SKD_PRICE] [money] NULL ,
[SKD_LAST_SALE] [datetime] NULL ,
[SKD_CHG_DATE] [datetime] NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Customers] WITH NOCHECK ADD
CONSTRAINT [PK_Customers] PRIMARY KEY CLUSTERED
(
[AG_ID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DealPRICE] WITH NOCHECK ADD
CONSTRAINT [PK_DealPRICE] PRIMARY KEY CLUSTERED
(
[DP_ID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Items] WITH NOCHECK ADD
CONSTRAINT [PK_Items] PRIMARY KEY CLUSTERED
(
[ART_ID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemsDIN] WITH NOCHECK ADD
CONSTRAINT [PK_ItemsDIN] PRIMARY KEY CLUSTERED
(
[DIN_ID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[ItemsMASK] WITH NOCHECK ADD
CONSTRAINT [PK_ItemsMASK] PRIMARY KEY CLUSTERED
(
[MSK_ID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[Stores] WITH NOCHECK ADD
CONSTRAINT [PK_Stores] PRIMARY KEY CLUSTERED
(
[SKD_ID]
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[DealPRICE] ADD
CONSTRAINT [FK_DealPRICE_Customers] FOREIGN KEY
(
[AG_ID]
) REFERENCES [dbo].[Customers] (
[AG_ID]
),
CONSTRAINT [FK_DealPRICE_Items] FOREIGN KEY
(
[ART_ID]
) REFERENCES [dbo].[Items] (
[ART_ID]
)
GO
ALTER TABLE [dbo].[Items] ADD
CONSTRAINT [FK_Items_ItemsDIN] FOREIGN KEY
(
[ART_DIN_ID]
) REFERENCES [dbo].[ItemsDIN] (
[DIN_ID]
),
CONSTRAINT [FK_Items_ItemsMASK] FOREIGN KEY
(
[ART_MSK_ID]
) REFERENCES [dbo].[ItemsMASK] (
[MSK_ID]
)
GO
ALTER TABLE [dbo].[Stores] ADD
CONSTRAINT [FK_Stores_Items] FOREIGN KEY
(
[SKD_ART_ID]
) REFERENCES [dbo].[Items] (
[ART_ID]
)
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.qBaseQUERY
AS
SELECT dbo.Items.*, dbo.Stores.*, dbo.ItemsDIN.DIN_NAME AS DIN_NAME,
dbo.ItemsMASK.MSK_PART1 AS MSK_PART1,
dbo.ItemsMASK.MSK_PART2 AS MSK_PART2,
dbo.ItemsMASK.MSK_PART3 AS MSK_PART3, dbo.ItemsMASK.MSK_PART4 AS MSK_PART4,
dbo.ItemsMASK.MSK_PART5 AS MSK_PART5
FROM dbo.Items LEFT OUTER JOIN
dbo.ItemsDIN ON dbo.Items.ART_DIN_ID =
dbo.ItemsDIN.DIN_ID LEFT OUTER JOIN
dbo.ItemsMASK ON dbo.Items.ART_MSK_ID =
dbo.ItemsMASK.MSK_ID LEFT OUTER JOIN
dbo.Stores ON dbo.Items.ART_ID = dbo.Stores.SKD_ART_ID
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
SET QUOTED_IDENTIFIER ON
GO
SET ANSI_NULLS ON
GO
CREATE VIEW dbo.qExpectedRESULT
AS
SELECT ART_ID, ART_NAME, SKD_NOW_QUANT, SKD_PRICE, 'from DealPRICE
table' AS DEAL_PRICE
FROM dbo.qBaseQUERY
GO
SET QUOTED_IDENTIFIER OFF
GO
SET ANSI_NULLS ON
GO
-- END of DB Objects CREATE scripts --
-- Fill Tables ----
INSERT INTO Customers(AG_REG_NAME, AG_PRINT_NAME, AG_SEARCH_NAME)
VALUES('CustomerA','CustomerA','Customer
A')
INSERT INTO Customers(AG_REG_NAME, AG_PRINT_NAME, AG_SEARCH_NAME)
VALUES('CustomerB','CustomerB','Customer
B')
INSERT INTO Customers(AG_REG_NAME, AG_PRINT_NAME, AG_SEARCH_NAME)
VALUES('CustomerC','CustomerC','Customer
C')
INSERT INTO Customers(AG_REG_NAME, AG_PRINT_NAME, AG_SEARCH_NAME)
VALUES('CustomerD','CustomerD','Customer
D')
INSERT INTO Customers(AG_REG_NAME, AG_PRINT_NAME, AG_SEARCH_NAME)
VALUES('CustomerE','CustomerE','Customer
E')
INSERT INTO Items(ART_NAME) VALUES('ItemA')
INSERT INTO Items(ART_NAME) VALUES('ItemB')
INSERT INTO Items(ART_NAME) VALUES('ItemC')
INSERT INTO Items(ART_NAME) VALUES('ItemD')
INSERT INTO Items(ART_NAME) VALUES('ItemE')
INSERT INTO Stores(SKD_ART_ID,SKD_NOW_QUANT,SKD_PRIC
E) VALUES(1,453,10.95)
INSERT INTO Stores(SKD_ART_ID,SKD_NOW_QUANT,SKD_PRIC
E) VALUES(3,675,15.95)
INSERT INTO Stores(SKD_ART_ID,SKD_NOW_QUANT,SKD_PRIC
E) VALUES(5,134,20.95)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(1,1,GETDATE(),10.55)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(1,2,GETDATE(),13)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(1,3,GETDATE(),13.5)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(2,3,GETDATE(),14.3)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(3,4,GETDATE(),15)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(4,5,GETDATE(),18.9)
INSERT INTO DealPRICE(AG_ID,ART_ID,DP_DATE,DEAL_PRIC
E)
VALUES(5,5,GETDATE(),19.1)
-- END of Fill Tables ---
Query qExpectedRESULT for Customers.AG_ID=1 must return the next list:
1 ItemA 453 10,95 10,55
2 ItemB NULL NULL 13
3 ItemC 675 15,95 13,5
4 ItemD NULL NULL NULL
5 ItemE 134 20,95 NULL
for Customers.AG_ID=2:
1 ItemA 453 10,95 NULL
2 ItemB NULL NULL NULL
3 ItemC 675 15,95 14.3
4 ItemD NULL NULL NULL
5 ItemE 134 20,95 NULL
In a real DB like:
Customers - 30 000 rows
Items - 25 000 rows
Stores - 15 000 rows
DealPRICE - 1 000 rows
im not select all 25000 rows:
SELECT qBaseQUERY.* -- base query
FROM qBaseQUERY -- about 25 000 rows
next text added on clients terminals depended on their needs, like:
WHERE qBaseQUERY.ART_MSK_ID=13 -- return 10...30 rows
AND ((((qBaseQUERY.MSK_PART1) = 1))
AND (((qBaseQUERY.ART_V1) = '100')))
AND ((((qBaseQUERY.MSK_PART2) = 3))
AND (((qBaseQUERY.ART_V2) = '050')))
AND ((((qBaseQUERY.MSK_PART3) = 12))
AND (((qBaseQUERY.ART_V3) = '058')))
AND ((((qBaseQUERY.MSK_PART4) = 11))
AND (((qBaseQUERY.ART_V4) = '001')))
AND ((((qBaseQUERY.MSK_PART5) = 36))
AND (((qBaseQUERY.ART_V5) = '105')))
AND (((qBaseQUERY.SKD_NOW_QUANT)>0) OR ((qBaseQUERY.SKD_NOW_UNREG)>0) )
ORDER BY qBaseQUERY.ART_FOLDER_ID, qBaseQUERY.ART_LEVEL,
qBaseQUERY.ART_INDEX
--
What do you think about it ?"Kachmaryk Yuriy" <kachya@.ua.fm> wrote in message
news:O39Wii2HGHA.648@.TK2MSFTNGP14.phx.gbl...
> Hi,
> People, help me with problem to make the query qExpectedRESULT
> I will accept any suggestion and suppositions!
> Possibly use of User Defined Functions it is a right way ?
>
How about
SELECT B.ART_ID, B.ART_NAME, B.SKD_NOW_QUANT, B.SKD_PRICE, DP.DEAL_PRICE
FROM dbo.qBaseQUERY B
LEFT JOIN dbo.dealPRICE DP
ON B.ART_ID = DP.ART_ID
and AG_ID = 1
?
David

Wednesday, March 21, 2012

HELP! Linked Server Problem

I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005 instanc
e
on a 64bit Win 2003 Server. Both systems are using the same user id &
password.
Both instances use windows authentication mode.
In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
linked server to the SQL 2000 instance. I used the login as the current logi
n
context.
From the server itself, I can execute queries from the linked server.
My problems lies when I use the SQL Server Enterprise Manager in my computer
(I am in the admin group on both machines and I have sysadmin roles on both)
when executing the same query I get:
OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
"Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18456, Level 14, State 1, Line 0
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
I dont understand this as I'm using Windows Autherntication on everything.Have you tried to use Named Pipes on your client network configuration?
"Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
>I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005
>instance
> on a 64bit Win 2003 Server. Both systems are using the same user id &
> password.
> Both instances use windows authentication mode.
> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> linked server to the SQL 2000 instance. I used the login as the current
> login
> context.
> From the server itself, I can execute queries from the linked server.
> My problems lies when I use the SQL Server Enterprise Manager in my
> computer
> (I am in the admin group on both machines and I have sysadmin roles on
> both)
> when executing the same query I get:
> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> "Communication link failure".
> Msg 10054, Level 16, State 1, Line 0
> TCP Provider: An existing connection was forcibly closed by the remote
> host.
> Msg 18456, Level 14, State 1, Line 0
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> I dont understand this as I'm using Windows Autherntication on everything.|||Tried Pipes, but not the issue.
For some reason, the windows authentication mode is not working properly.
"Immy" wrote:

> Have you tried to use Named Pipes on your client network configuration?
> "Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
> news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
>
>|||Howard Carr wrote:[vbcol=seagreen]
> Tried Pipes, but not the issue.
> For some reason, the windows authentication mode is not working properly.
> "Immy" wrote:
>
You might take a look at Security Account Delegation in Books On Line.
In order to use Windows authentication you must enable the servers for
Account Delegation, and also the SQL server usr account must be enabled
for delegation. I think the problem is that when you try from your own
machine, you use an account and computer that isn't trusted.
Regards
Steen|||I believe you are experincing the two-hop problem? You can't pass Windows
authentication credentials across a link in SQL Server. If you define a
static SQL ID for the link and use that, you should be fine
"Howard Carr" wrote:

> I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005 insta
nce
> on a 64bit Win 2003 Server. Both systems are using the same user id &
> password.
> Both instances use windows authentication mode.
> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> linked server to the SQL 2000 instance. I used the login as the current lo
gin
> context.
> From the server itself, I can execute queries from the linked server.
> My problems lies when I use the SQL Server Enterprise Manager in my comput
er
> (I am in the admin group on both machines and I have sysadmin roles on bot
h)
> when executing the same query I get:
> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> "Communication link failure".
> Msg 10054, Level 16, State 1, Line 0
> TCP Provider: An existing connection was forcibly closed by the remote hos
t.
> Msg 18456, Level 14, State 1, Line 0
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> I dont understand this as I'm using Windows Autherntication on everything.

HELP! Linked Server Problem

I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005 instance
on a 64bit Win 2003 Server. Both systems are using the same user id &
password.
Both instances use windows authentication mode.
In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
linked server to the SQL 2000 instance. I used the login as the current login
context.
From the server itself, I can execute queries from the linked server.
My problems lies when I use the SQL Server Enterprise Manager in my computer
(I am in the admin group on both machines and I have sysadmin roles on both)
when executing the same query I get:
OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
"Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18456, Level 14, State 1, Line 0
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
I dont understand this as I'm using Windows Autherntication on everything.
Have you tried to use Named Pipes on your client network configuration?
"Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
>I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005
>instance
> on a 64bit Win 2003 Server. Both systems are using the same user id &
> password.
> Both instances use windows authentication mode.
> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> linked server to the SQL 2000 instance. I used the login as the current
> login
> context.
> From the server itself, I can execute queries from the linked server.
> My problems lies when I use the SQL Server Enterprise Manager in my
> computer
> (I am in the admin group on both machines and I have sysadmin roles on
> both)
> when executing the same query I get:
> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> "Communication link failure".
> Msg 10054, Level 16, State 1, Line 0
> TCP Provider: An existing connection was forcibly closed by the remote
> host.
> Msg 18456, Level 14, State 1, Line 0
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> I dont understand this as I'm using Windows Autherntication on everything.
|||Tried Pipes, but not the issue.
For some reason, the windows authentication mode is not working properly.
"Immy" wrote:

> Have you tried to use Named Pipes on your client network configuration?
> "Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
> news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
>
>
|||Howard Carr wrote:[vbcol=seagreen]
> Tried Pipes, but not the issue.
> For some reason, the windows authentication mode is not working properly.
> "Immy" wrote:
You might take a look at Security Account Delegation in Books On Line.
In order to use Windows authentication you must enable the servers for
Account Delegation, and also the SQL server usr account must be enabled
for delegation. I think the problem is that when you try from your own
machine, you use an account and computer that isn't trusted.
Regards
Steen
|||I believe you are experincing the two-hop problem? You can't pass Windows
authentication credentials across a link in SQL Server. If you define a
static SQL ID for the link and use that, you should be fine
"Howard Carr" wrote:

> I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005 instance
> on a 64bit Win 2003 Server. Both systems are using the same user id &
> password.
> Both instances use windows authentication mode.
> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> linked server to the SQL 2000 instance. I used the login as the current login
> context.
> From the server itself, I can execute queries from the linked server.
> My problems lies when I use the SQL Server Enterprise Manager in my computer
> (I am in the admin group on both machines and I have sysadmin roles on both)
> when executing the same query I get:
> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> "Communication link failure".
> Msg 10054, Level 16, State 1, Line 0
> TCP Provider: An existing connection was forcibly closed by the remote host.
> Msg 18456, Level 14, State 1, Line 0
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> I dont understand this as I'm using Windows Autherntication on everything.

HELP! Linked Server Problem

I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005 instance
on a 64bit Win 2003 Server. Both systems are using the same user id &
password.
Both instances use windows authentication mode.
In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
linked server to the SQL 2000 instance. I used the login as the current login
context.
From the server itself, I can execute queries from the linked server.
My problems lies when I use the SQL Server Enterprise Manager in my computer
(I am in the admin group on both machines and I have sysadmin roles on both)
when executing the same query I get:
OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
"Communication link failure".
Msg 10054, Level 16, State 1, Line 0
TCP Provider: An existing connection was forcibly closed by the remote host.
Msg 18456, Level 14, State 1, Line 0
Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
I dont understand this as I'm using Windows Autherntication on everything.Have you tried to use Named Pipes on your client network configuration?
"Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
>I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005
>instance
> on a 64bit Win 2003 Server. Both systems are using the same user id &
> password.
> Both instances use windows authentication mode.
> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> linked server to the SQL 2000 instance. I used the login as the current
> login
> context.
> From the server itself, I can execute queries from the linked server.
> My problems lies when I use the SQL Server Enterprise Manager in my
> computer
> (I am in the admin group on both machines and I have sysadmin roles on
> both)
> when executing the same query I get:
> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> "Communication link failure".
> Msg 10054, Level 16, State 1, Line 0
> TCP Provider: An existing connection was forcibly closed by the remote
> host.
> Msg 18456, Level 14, State 1, Line 0
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> I dont understand this as I'm using Windows Autherntication on everything.|||Tried Pipes, but not the issue.
For some reason, the windows authentication mode is not working properly.
"Immy" wrote:
> Have you tried to use Named Pipes on your client network configuration?
> "Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
> news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
> >I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005
> >instance
> > on a 64bit Win 2003 Server. Both systems are using the same user id &
> > password.
> > Both instances use windows authentication mode.
> >
> > In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> > linked server to the SQL 2000 instance. I used the login as the current
> > login
> > context.
> > From the server itself, I can execute queries from the linked server.
> >
> > My problems lies when I use the SQL Server Enterprise Manager in my
> > computer
> > (I am in the admin group on both machines and I have sysadmin roles on
> > both)
> > when executing the same query I get:
> > OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> > "Communication link failure".
> > Msg 10054, Level 16, State 1, Line 0
> > TCP Provider: An existing connection was forcibly closed by the remote
> > host.
> > Msg 18456, Level 14, State 1, Line 0
> > Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> >
> > I dont understand this as I'm using Windows Autherntication on everything.
>
>|||Howard Carr wrote:
> Tried Pipes, but not the issue.
> For some reason, the windows authentication mode is not working properly.
> "Immy" wrote:
>> Have you tried to use Named Pipes on your client network configuration?
>> "Howard Carr" <HowardCarr@.discussions.microsoft.com> wrote in message
>> news:BB430B53-5AA8-47FA-B8EB-215ABF91BB49@.microsoft.com...
>> I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005
>> instance
>> on a 64bit Win 2003 Server. Both systems are using the same user id &
>> password.
>> Both instances use windows authentication mode.
>> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
>> linked server to the SQL 2000 instance. I used the login as the current
>> login
>> context.
>> From the server itself, I can execute queries from the linked server.
>> My problems lies when I use the SQL Server Enterprise Manager in my
>> computer
>> (I am in the admin group on both machines and I have sysadmin roles on
>> both)
>> when executing the same query I get:
>> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
>> "Communication link failure".
>> Msg 10054, Level 16, State 1, Line 0
>> TCP Provider: An existing connection was forcibly closed by the remote
>> host.
>> Msg 18456, Level 14, State 1, Line 0
>> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
>> I dont understand this as I'm using Windows Autherntication on everything.
>>
You might take a look at Security Account Delegation in Books On Line.
In order to use Windows authentication you must enable the servers for
Account Delegation, and also the SQL server usr account must be enabled
for delegation. I think the problem is that when you try from your own
machine, you use an account and computer that isn't trusted.
Regards
Steen|||I believe you are experincing the two-hop problem? You can't pass Windows
authentication credentials across a link in SQL Server. If you define a
static SQL ID for the link and use that, you should be fine
"Howard Carr" wrote:
> I have a SQL 2000 instance on a 32 bit Win2000 server and a SQL 2005 instance
> on a 64bit Win 2003 Server. Both systems are using the same user id &
> password.
> Both instances use windows authentication mode.
> In the SQL Server Enterprise Manager on the SQL 2005 instance I created a
> linked server to the SQL 2000 instance. I used the login as the current login
> context.
> From the server itself, I can execute queries from the linked server.
> My problems lies when I use the SQL Server Enterprise Manager in my computer
> (I am in the admin group on both machines and I have sysadmin roles on both)
> when executing the same query I get:
> OLE DB provider "SQLNCLI" for linked server "SQL2000" returned message
> "Communication link failure".
> Msg 10054, Level 16, State 1, Line 0
> TCP Provider: An existing connection was forcibly closed by the remote host.
> Msg 18456, Level 14, State 1, Line 0
> Login failed for user 'NT AUTHORITY\ANONYMOUS LOGON'.
> I dont understand this as I'm using Windows Autherntication on everything.

Monday, March 19, 2012

HELP! How get user NT login

Hi,
I want to retrieve reports that use the Windwos authentication to filter
data linked to the user (e.g.: only sales for a specific user)
I tried to use a parameter which uses the property
system.security.principal.WindowsIdentity.GetCurrent.name,
It works fine when I run it from the designer, but when I deploy the report
on the ReportManager, I go an error:
Error during processing of 'login' report parameter.
(rsReportParameterProcessingError)
Any idea about this problem, or how to get the login by using another way?
Thanks,
StéphanieYou can use the built in RS parameter User!UserID.Value. This returns the
Windows login name, pre-Windows 2000 style.
If you need to strip of the domain name, I've written a post on how to do it
here
http://blogs.spipp.net/kaisa/archive/2005/04/15/255.aspx
Kaisa
"StephyB" <ssss@.zz.fr> wrote in message
news:%23GBha18zFHA.800@.TK2MSFTNGP12.phx.gbl...
> Hi,
> I want to retrieve reports that use the Windwos authentication to filter
> data linked to the user (e.g.: only sales for a specific user)
> I tried to use a parameter which uses the property
> system.security.principal.WindowsIdentity.GetCurrent.name,
> It works fine when I run it from the designer, but when I deploy the
> report on the ReportManager, I go an error:
> Error during processing of 'login' report parameter.
> (rsReportParameterProcessingError)
> Any idea about this problem, or how to get the login by using another way?
> Thanks,
> Stéphanie
>

Help! How do I set a function as a default?

Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
HeidiTry:
alter table MyTable
add constraint MyDefault default (dbo.MyFunc (123)) for MyColumn
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Heidi" <anonymous@.discussions.microsoft.com> wrote in message
news:cd6601c4394d$7a0f3ae0$a101280a@.phx.gbl...
Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi

Help! How do I set a function as a default?

Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
HeidiTry:
alter table MyTable
add constraint MyDefault default (dbo.MyFunc (123)) for MyColumn
Tom
----
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
.
"Heidi" <anonymous@.discussions.microsoft.com> wrote in message
news:cd6601c4394d$7a0f3ae0$a101280a@.phx.gbl...
Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi

Help! How do I set a function as a default?

Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi
Try:
alter table MyTable
add constraint MyDefault default (dbo.MyFunc (123)) for MyColumn
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com/sql
..
"Heidi" <anonymous@.discussions.microsoft.com> wrote in message
news:cd6601c4394d$7a0f3ae0$a101280a@.phx.gbl...
Help
I want to set a user defined function as the default for a
column.
How do I do that?
I think you in advance,
Heidi

Monday, March 12, 2012

Help! First timer with SQL

I am trying to write my first app using SQL Server. I am not able to even open a connection. I get the following error message:

Login failed for user '(null)'. Reason: Not associated with a trusted SQL Server connection.

I am not sure first of all why the user is listed as null. I hard coded a user name in for test purposes. Second, how DO I establish a trusted connection with a SQL Server. The SQL Server is located on an internal domain controller.

Also, is it necessary to have anything special installed on my remote machine? As I said, I am VERY new to Microsoft SQL ServerCan you post your conn string?|||Sure... here is the connection string. It was generated by default by the system.

data source=ERICSERVER;initial catalog=Northwind;integrated security=SSPI;persist security info=False;workstation id=ERIC;packet size=4096

Any ideas?|||ejcrammer I 2 am also in your shoes. I am new to SQL Server and ASP.NET. I also am trying to connect to a database and am receving the same error message you are. I have looked at your connection string but their does not seem to be one specific way to write the connection string because I have seen about 7 different versions all of which are not good and no one really explains them in detail. some ask for password and username some dont, I dont know. Anyway since were both in the same shoes I was wondering if you figure out this answere to this question you could post and let me know and I as well will post back if I figure out the answere to this problem we seem to be haveing.
Thanks

Friday, March 9, 2012

Help! Cant Connect - db offline

OK, so I took one of my db's offline for maintenance, then realized that I wanted to be logged in as another user, so I logged out.

Now SS won't let me log in, because every time I try to connect I get:

A connection could not be established...
Reason: Cannot open user default database. Login failed..

The db I took offline is the default db for every single privileged account on the server. Why do I feel like I just locked my keys in the car?

Any help would be greatly appreciated! TIA!Never mind, I figured it out. Logged in via ISQL, and issued:

exec sp_defaultdb '<my sa account>', '<a db known to be online>'

ISQL let me log in, and simply used 'master' instead of the default db that was offline. What reason in the world could there be for EM behaving differently?|||In the future you should set master to be the default database for all users.|||Why? I only do this for the admin group.|||In the future you should set master to be the default database for all users.
Why in the world would you want to do that for application users ?|||Enterprise manager is a good tool to start learning about SQL Server with, but as you get to more and more advanced things, it helps more to use Query Analyzer, or if you are super-hard-core isql or osql. However, in this case, I am not certain how you did get around this. This may take a bit of experimentation for me to figure out. I had thought that any login is sent to the default database, even if just fr a moment, when you have the -d switch set in isql, or a database name set in your connection string. I could very well be wrong.

But essentially, yes. If you drop the database that all of the admin users have as their default database, then you have effectively "locked the keys in the server".|||In the future you should set master to be the default database for all users.

He's just drunk...

and I'm jealous...

Help! Call a code block based on parameter name

I have a column heading that needs to call a function based on the value
contained in the heading (which is a parameter selected by the user).
Example: they can choose system, database, network or application. I have
functions which do different translations and the functions are named
translateSystem, translateApplication, translateDatabase, etc.
I tried to do this by adding a textbox (which I named tbResType) with the
following code in it:
IIF(Parameters!ResType.value = "nw interface", "translateNetwork",
IIF(Parameters!ResType.value = "process",
"translateProcess",IIF(Parameters!ResType.value = "database",
"translateDatabase", IIF(Parameters!ResType.value = "application",
"translateApplication", "translateSystem"))))
Then I tried to use that value in the column heading to call the appropriate
code block (the function translates into multiple languages so its parm is
the language value the user chooses)
=code.(ReportItems!tbResType.Value)( Parameters!Language.Value)
anyway ... the translation for the first textbox works fine and I see
translateProcess when I entered process for the ResType parm but the column
heading gives me an error ==> The value expression for the textbox â'textbox6â'
contains an error: [BC30203] Identifier expected.
Any clues?You may have to write a wrapper around you actual calls within your code
block. This wrapper will accept the bResType parameter and the sub call the
appropriate routines from there.
Craig
"MJT" <MJT@.discussions.microsoft.com> wrote in message
news:C65EE9E3-506A-46EE-A362-02862013E6BC@.microsoft.com...
>I have a column heading that needs to call a function based on the value
> contained in the heading (which is a parameter selected by the user).
> Example: they can choose system, database, network or application. I have
> functions which do different translations and the functions are named
> translateSystem, translateApplication, translateDatabase, etc.
> I tried to do this by adding a textbox (which I named tbResType) with the
> following code in it:
> IIF(Parameters!ResType.value = "nw interface", "translateNetwork",
> IIF(Parameters!ResType.value = "process",
> "translateProcess",IIF(Parameters!ResType.value = "database",
> "translateDatabase", IIF(Parameters!ResType.value = "application",
> "translateApplication", "translateSystem"))))
> Then I tried to use that value in the column heading to call the
> appropriate
> code block (the function translates into multiple languages so its parm is
> the language value the user chooses)
> =code.(ReportItems!tbResType.Value)( Parameters!Language.Value)
> anyway ... the translation for the first textbox works fine and I see
> translateProcess when I entered process for the ResType parm but the
> column
> heading gives me an error ==> The value expression for the textbox
> 'textbox6'
> contains an error: [BC30203] Identifier expected.
> Any clues?
>|||Thanks Craig ... I am not sure how to do that. Is there an example somewhere
(simple example...) I am very new with vb .net
"Craig" wrote:
> You may have to write a wrapper around you actual calls within your code
> block. This wrapper will accept the bResType parameter and the sub call the
> appropriate routines from there.
> Craig
> "MJT" <MJT@.discussions.microsoft.com> wrote in message
> news:C65EE9E3-506A-46EE-A362-02862013E6BC@.microsoft.com...
> >I have a column heading that needs to call a function based on the value
> > contained in the heading (which is a parameter selected by the user).
> > Example: they can choose system, database, network or application. I have
> > functions which do different translations and the functions are named
> > translateSystem, translateApplication, translateDatabase, etc.
> >
> > I tried to do this by adding a textbox (which I named tbResType) with the
> > following code in it:
> > IIF(Parameters!ResType.value = "nw interface", "translateNetwork",
> > IIF(Parameters!ResType.value = "process",
> > "translateProcess",IIF(Parameters!ResType.value = "database",
> > "translateDatabase", IIF(Parameters!ResType.value = "application",
> > "translateApplication", "translateSystem"))))
> >
> > Then I tried to use that value in the column heading to call the
> > appropriate
> > code block (the function translates into multiple languages so its parm is
> > the language value the user chooses)
> >
> > =code.(ReportItems!tbResType.Value)( Parameters!Language.Value)
> >
> > anyway ... the translation for the first textbox works fine and I see
> > translateProcess when I entered process for the ResType parm but the
> > column
> > heading gives me an error ==> The value expression for the textbox
> > 'textbox6'
> > contains an error: [BC30203] Identifier expected.
> >
> > Any clues?
> >
>
>|||Put this in your code...
Public Function GetTranslation(ByVal Application As String, ByVal Language
As String) As String
Select Case Application
Case "nw Interface"
Return translateNetwork(Language)
Case "process"
Return translateProcess(Language)
Case "database"
Return translateDatabase(Language)
Case "application"
Return translateApplication(Language)
End Select
Return ""
End Function
Then in your header just put
=code.GetTranslation(Parameters!Language.Value)
Craig
"MJT" <MJT@.discussions.microsoft.com> wrote in message
news:D673084A-5BCF-4D12-95F0-B897C11290DA@.microsoft.com...
> Thanks Craig ... I am not sure how to do that. Is there an example
> somewhere
> (simple example...) I am very new with vb .net
> "Craig" wrote:
>> You may have to write a wrapper around you actual calls within your code
>> block. This wrapper will accept the bResType parameter and the sub call
>> the
>> appropriate routines from there.
>> Craig
>> "MJT" <MJT@.discussions.microsoft.com> wrote in message
>> news:C65EE9E3-506A-46EE-A362-02862013E6BC@.microsoft.com...
>> >I have a column heading that needs to call a function based on the value
>> > contained in the heading (which is a parameter selected by the user).
>> > Example: they can choose system, database, network or application. I
>> > have
>> > functions which do different translations and the functions are named
>> > translateSystem, translateApplication, translateDatabase, etc.
>> >
>> > I tried to do this by adding a textbox (which I named tbResType) with
>> > the
>> > following code in it:
>> > IIF(Parameters!ResType.value = "nw interface", "translateNetwork",
>> > IIF(Parameters!ResType.value = "process",
>> > "translateProcess",IIF(Parameters!ResType.value = "database",
>> > "translateDatabase", IIF(Parameters!ResType.value = "application",
>> > "translateApplication", "translateSystem"))))
>> >
>> > Then I tried to use that value in the column heading to call the
>> > appropriate
>> > code block (the function translates into multiple languages so its parm
>> > is
>> > the language value the user chooses)
>> >
>> > =code.(ReportItems!tbResType.Value)( Parameters!Language.Value)
>> >
>> > anyway ... the translation for the first textbox works fine and I see
>> > translateProcess when I entered process for the ResType parm but the
>> > column
>> > heading gives me an error ==> The value expression for the textbox
>> > 'textbox6'
>> > contains an error: [BC30203] Identifier expected.
>> >
>> > Any clues?
>> >
>>|||Sorry fogot one other parameter in the call...
you need...
=code.GetTranslation(Parameters!ResType.Value,Parameters!Language.Value)
Craig
"Craig" <craigm_richardson@.hotmail.com> wrote in message
news:eEjrgGaPGHA.3460@.TK2MSFTNGP15.phx.gbl...
> Put this in your code...
> Public Function GetTranslation(ByVal Application As String, ByVal Language
> As String) As String
> Select Case Application
> Case "nw Interface"
> Return translateNetwork(Language)
> Case "process"
> Return translateProcess(Language)
> Case "database"
> Return translateDatabase(Language)
> Case "application"
> Return translateApplication(Language)
> End Select
> Return ""
> End Function
> Then in your header just put
> =code.GetTranslation(Parameters!Language.Value)
>
> Craig
> "MJT" <MJT@.discussions.microsoft.com> wrote in message
> news:D673084A-5BCF-4D12-95F0-B897C11290DA@.microsoft.com...
>> Thanks Craig ... I am not sure how to do that. Is there an example
>> somewhere
>> (simple example...) I am very new with vb .net
>> "Craig" wrote:
>> You may have to write a wrapper around you actual calls within your code
>> block. This wrapper will accept the bResType parameter and the sub call
>> the
>> appropriate routines from there.
>> Craig
>> "MJT" <MJT@.discussions.microsoft.com> wrote in message
>> news:C65EE9E3-506A-46EE-A362-02862013E6BC@.microsoft.com...
>> >I have a column heading that needs to call a function based on the
>> >value
>> > contained in the heading (which is a parameter selected by the user).
>> > Example: they can choose system, database, network or application. I
>> > have
>> > functions which do different translations and the functions are named
>> > translateSystem, translateApplication, translateDatabase, etc.
>> >
>> > I tried to do this by adding a textbox (which I named tbResType) with
>> > the
>> > following code in it:
>> > IIF(Parameters!ResType.value = "nw interface", "translateNetwork",
>> > IIF(Parameters!ResType.value = "process",
>> > "translateProcess",IIF(Parameters!ResType.value = "database",
>> > "translateDatabase", IIF(Parameters!ResType.value = "application",
>> > "translateApplication", "translateSystem"))))
>> >
>> > Then I tried to use that value in the column heading to call the
>> > appropriate
>> > code block (the function translates into multiple languages so its
>> > parm is
>> > the language value the user chooses)
>> >
>> > =code.(ReportItems!tbResType.Value)( Parameters!Language.Value)
>> >
>> > anyway ... the translation for the first textbox works fine and I see
>> > translateProcess when I entered process for the ResType parm but the
>> > column
>> > heading gives me an error ==> The value expression for the textbox
>> > 'textbox6'
>> > contains an error: [BC30203] Identifier expected.
>> >
>> > Any clues?
>> >
>>
>|||I'm sorry ... I forgot to reply that it worked! Thank you very much and I
have rated it as such.
"Craig" wrote:
> Sorry fogot one other parameter in the call...
> you need...
> =code.GetTranslation(Parameters!ResType.Value,Parameters!Language.Value)
> Craig
> "Craig" <craigm_richardson@.hotmail.com> wrote in message
> news:eEjrgGaPGHA.3460@.TK2MSFTNGP15.phx.gbl...
> > Put this in your code...
> >
> > Public Function GetTranslation(ByVal Application As String, ByVal Language
> > As String) As String
> >
> > Select Case Application
> >
> > Case "nw Interface"
> >
> > Return translateNetwork(Language)
> >
> > Case "process"
> >
> > Return translateProcess(Language)
> >
> > Case "database"
> >
> > Return translateDatabase(Language)
> >
> > Case "application"
> >
> > Return translateApplication(Language)
> >
> > End Select
> >
> > Return ""
> >
> > End Function
> >
> > Then in your header just put
> >
> > =code.GetTranslation(Parameters!Language.Value)
> >
> >
> > Craig
> >
> > "MJT" <MJT@.discussions.microsoft.com> wrote in message
> > news:D673084A-5BCF-4D12-95F0-B897C11290DA@.microsoft.com...
> >> Thanks Craig ... I am not sure how to do that. Is there an example
> >> somewhere
> >> (simple example...) I am very new with vb .net
> >>
> >> "Craig" wrote:
> >>
> >> You may have to write a wrapper around you actual calls within your code
> >> block. This wrapper will accept the bResType parameter and the sub call
> >> the
> >> appropriate routines from there.
> >>
> >> Craig
> >>
> >> "MJT" <MJT@.discussions.microsoft.com> wrote in message
> >> news:C65EE9E3-506A-46EE-A362-02862013E6BC@.microsoft.com...
> >> >I have a column heading that needs to call a function based on the
> >> >value
> >> > contained in the heading (which is a parameter selected by the user).
> >> > Example: they can choose system, database, network or application. I
> >> > have
> >> > functions which do different translations and the functions are named
> >> > translateSystem, translateApplication, translateDatabase, etc.
> >> >
> >> > I tried to do this by adding a textbox (which I named tbResType) with
> >> > the
> >> > following code in it:
> >> > IIF(Parameters!ResType.value = "nw interface", "translateNetwork",
> >> > IIF(Parameters!ResType.value = "process",
> >> > "translateProcess",IIF(Parameters!ResType.value = "database",
> >> > "translateDatabase", IIF(Parameters!ResType.value = "application",
> >> > "translateApplication", "translateSystem"))))
> >> >
> >> > Then I tried to use that value in the column heading to call the
> >> > appropriate
> >> > code block (the function translates into multiple languages so its
> >> > parm is
> >> > the language value the user chooses)
> >> >
> >> > =code.(ReportItems!tbResType.Value)( Parameters!Language.Value)
> >> >
> >> > anyway ... the translation for the first textbox works fine and I see
> >> > translateProcess when I entered process for the ResType parm but the
> >> > column
> >> > heading gives me an error ==> The value expression for the textbox
> >> > 'textbox6'
> >> > contains an error: [BC30203] Identifier expected.
> >> >
> >> > Any clues?
> >> >
> >>
> >>
> >>
> >
> >
>
>