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

Thursday, March 29, 2012

Getting the latest dated Row for each user in a table

Hi all,
I want to have a query that will return me a single row for each userfrom a table where the table has many rows for each user. The singlereturned row for each user must be the most recently dated entry([I7-Change-Date]) for that user.
An example of the code I have so far is as follows, but it obviously doesn;t work.
select DISTINCT([I1-Customer-Ref]) AS Cust,
([i7-w-fixed-amnt]) as WaterFixedAmt,
([i7-w-rv-amnt]) as WaterRVAmt,
([i7-s-fixed-amnt]) as SewerageFixedAmt,
([I7-Change-Date]) AS [Date]
from r07UnMeasuredBills
ORDER BY Cust, [I7-Change-Date] DESC

I am using MS SQL Server 7 for this.
Thanks
Tryst
Have you tried aggregate functions?
i.e.
SELECT I1-Customer-Ref,Max(I7-Change-Date) FROM rO7UnMeasuredBills GROUP BY I1-Customer-Ref

|||

SELECT r.*

FROM r07UnMeasuredBills r

WHERE r.I7-Change-Date IN (SELECT I7-Change-DATE FROM r07UnMeasuredBills r2 WHERE r.I1-Customer-Ref=r2.I1-Customer-Ref)

|||No, I haven't tried that.
Will MAX work on dates (DATETIME)?
(I can't check it now as I am not in work)
Tryst
|||

Yes, infact I forgot to actually do that in my previous post, bad me... It should have been

SELECT r.*

FROM r07UnMeasuredBills r

WHERE r.I7-Change-Date IN (SELECT max(I7-Change-DATE) FROM r07UnMeasuredBills r2 WHERE r.I1-Customer-Ref=r2.I1-Customer-Ref)

|||Hi Motely, thanks for the reply.
Regarding the SQL query you provided, although it works (well, I hope, I haven't tried it yet :)), I am trying to get an understanding of how it works, but the sub-SELECT is confusing me a little. If your using the MAX function, won't that just bring back the row with the most recent date from all the rows and not for each user in the table? Would you be able to just break it down for me, so I can get an understanding of it?
Thanks once again.
Tryst
|||

It woul, however the table in the Sub Query is matched to the customer-ref in the where clause:

r.I1-Customer-Ref=r2.I1-Customer-Ref

Tuesday, March 27, 2012

Getting the Base Type from User Defined Data Types

Suppose I have a user defined data type in SQL Server 2000 called
USER_NAME which was created using:
sp_addtype USER_NAME, 'Char (10)'
Is there a query that I can use to display what the base type is? For
instance, I'd like to query a table like systypes and have it tell me
that USER_TYPE is Char(10).
I can see that systypes has an xtype field, but it contains a number.
Is there somewhere that maps that number to a physical datatype?You could also do this as a join...
SELECT s1.name, type = (SELECT name
FROM systypes s2
WHERE s2.xtype = s1.xtype
AND s2.xusertype<=256
),
s1.length
FROM systypes s1
where s1.xusertype > 256
"Janel E." <jmeichler@.oasvas.com> wrote in message
news:b5dd350d.0308060839.7dd690da@.posting.google.com...
> Suppose I have a user defined data type in SQL Server 2000 called
> USER_NAME which was created using:
> sp_addtype USER_NAME, 'Char (10)'
> Is there a query that I can use to display what the base type is? For
> instance, I'd like to query a table like systypes and have it tell me
> that USER_TYPE is Char(10).
> I can see that systypes has an xtype field, but it contains a number.
> Is there somewhere that maps that number to a physical datatype?

Monday, March 26, 2012

Getting System Time From SQL Server

I'm using an Access MDB as a front end to a SQL 7 database. When I place the
system time in a field in Access, it used the user's clock. I'd like to use
the SQL Server system time, so that the times will be synchronized. I
suppose I can just do a pass-through query with "select getdate()." But I
was wondering if there was some built-in method, either in Access or SQL
Server. I'm concerned about the overhead of running a pass-through query
every time I need the current time.

Thanks.Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

I'm using an Access MDB as a front end to a SQL 7 database. When I place
the system time in a field in Access, it used the user's clock. I'd like
to use the SQL Server system time, so that the times will be
synchronized. I suppose I can just do a pass-through query with "select
getdate()." But I was wondering if there was some built-in method,
either in Access or SQL Server. I'm concerned about the overhead of
running a pass-through query every time I need the current time.


It you want the time on the server, "SELECT getdate()" is probably the
simplest way to do it. But you could of course make a remote procedure
call outside SQL Server as a little exercise in Windows programming
if you like. I can't see that's worth the pain, though.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx|||"Erland Sommarskog" <esquel@.sommarskog.sewrote in message
news:Xns99F6EF225864CYazorman@.127.0.0.1...

Quote:

Originally Posted by

Neil (nospam@.nospam.net) writes:

Quote:

Originally Posted by

>I'm using an Access MDB as a front end to a SQL 7 database. When I place
>the system time in a field in Access, it used the user's clock. I'd like
>to use the SQL Server system time, so that the times will be
>synchronized. I suppose I can just do a pass-through query with "select
>getdate()." But I was wondering if there was some built-in method,
>either in Access or SQL Server. I'm concerned about the overhead of
>running a pass-through query every time I need the current time.


>
It you want the time on the server, "SELECT getdate()" is probably the
simplest way to do it. But you could of course make a remote procedure
call outside SQL Server as a little exercise in Windows programming
if you like. I can't see that's worth the pain, though.
>


:-) Thanks! Just wanted to make sure I wasn't missing something.|||"Neil" <nospam@.nospam.netwrote:

Quote:

Originally Posted by

>I'm using an Access MDB as a front end to a SQL 7 database. When I place the
>system time in a field in Access, it used the user's clock. I'd like to use
>the SQL Server system time, so that the times will be synchronized. I
>suppose I can just do a pass-through query with "select getdate()." But I
>was wondering if there was some built-in method, either in Access or SQL
>Server. I'm concerned about the overhead of running a pass-through query
>every time I need the current time.


In a corporate network everyone should be using a common time source.

Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/|||Well, unfortunately that doesn't seem to be the case. Individual computers
vary from the server time by as much as 10 minutes! Is there some sort of
setting to use to use the server time. Maybe I'll pass that along to the
admin and see if he implements it.

"Tony Toews [MVP]" <ttoews@.telusplanet.netwrote in message
news:4a3uk39afrlojib6hgn1f3j59frc32livn@.4ax.com...

Quote:

Originally Posted by

"Neil" <nospam@.nospam.netwrote:
>

Quote:

Originally Posted by

>>I'm using an Access MDB as a front end to a SQL 7 database. When I place
>>the
>>system time in a field in Access, it used the user's clock. I'd like to
>>use
>>the SQL Server system time, so that the times will be synchronized. I
>>suppose I can just do a pass-through query with "select getdate()." But I
>>was wondering if there was some built-in method, either in Access or SQL
>>Server. I'm concerned about the overhead of running a pass-through query
>>every time I need the current time.


>
In a corporate network everyone should be using a common time source.
>
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

|||"Neil" <nospam@.nospam.netwrote:

Quote:

Originally Posted by

>Well, unfortunately that doesn't seem to be the case.


Which is why I put the weasel words "should". <smile>

Quote:

Originally Posted by

>Individual computers
>vary from the server time by as much as 10 minutes! Is there some sort of
>setting to use to use the server time.


Yes, there is however I'm not at all sure how to do it. I think it involves ensuring
a server is hitting an Internet time source on a regular basis. Then, presumably
using group policy, ensure everyone on the network get thier time from the server.
But I'm not an IT person so I have no idea.

Tony

--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/|||"Neil" <nospam@.nospam.netwrote:

Quote:

Originally Posted by

>Well, unfortunately that doesn't seem to be the case. Individual computers
>vary from the server time by as much as 10 minutes! Is there some sort of
>setting to use to use the server time. Maybe I'll pass that along to the
>admin and see if he implements it.


BTW there are functions to also get the system time from a server and
compare that to the time on the PC. You can use that to show the IT
department.

API: Retrieve NT Server's Time
http://www.mvps.org/access/api/api0039.htm
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/|||The command line (which should be included in the logon script) is:

net time /DOMAIN:DomainName /SET

HtH

Pieter

"Tony Toews [MVP]" <ttoews@.telusplanet.netwrote in message
news:ukbvk3dm2tn1opt3tbtbp1d561lvq062qs@.4ax.com...

Quote:

Originally Posted by

"Neil" <nospam@.nospam.netwrote:
>

Quote:

Originally Posted by

>>Well, unfortunately that doesn't seem to be the case. Individual computers
>>vary from the server time by as much as 10 minutes! Is there some sort of
>>setting to use to use the server time. Maybe I'll pass that along to the
>>admin and see if he implements it.


>
BTW there are functions to also get the system time from a server and
compare that to the time on the PC. You can use that to show the IT
department.
>
API: Retrieve NT Server's Time
http://www.mvps.org/access/api/api0039.htm
>
Tony
--
Tony Toews, Microsoft Access MVP
Please respond only in the newsgroups so that others can
read the entire thread of messages.
Microsoft Access Links, Hints, Tips & Accounting Systems at
http://www.granite.ab.ca/accsmstr.htm
Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/

|||

Quote:

Originally Posted by

"Tony Toews [MVP]" <ttoews@.telusplanet.netwrote in message
news:ukbvk3dm2tn1opt3tbtbp1d561lvq062qs@.4ax.com...

Quote:

Originally Posted by

>"Neil" <nospam@.nospam.netwrote:
>>

Quote:

Originally Posted by

>>>Well, unfortunately that doesn't seem to be the case. Individual
>>>computers
>>>vary from the server time by as much as 10 minutes! Is there some sort of
>>>setting to use to use the server time. Maybe I'll pass that along to the
>>>admin and see if he implements it.


>>
>BTW there are functions to also get the system time from a server and
>compare that to the time on the PC. You can use that to show the IT
>department.
>>
>API: Retrieve NT Server's Time
>http://www.mvps.org/access/api/api0039.htm
>>
>Tony
>--
>Tony Toews, Microsoft Access MVP
> Please respond only in the newsgroups so that others can
>read the entire thread of messages.
> Microsoft Access Links, Hints, Tips & Accounting Systems at
>http://www.granite.ab.ca/accsmstr.htm
> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/


>
>


"Pieter Wijnen"
<it.isi.llegal.to.send.unsollicited.mail.wijnen.nos pam.please@.online.replace.with.norway>
wrote in message news:O6o2%23EyMIHA.2432@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

The command line (which should be included in the logon script) is:
>
net time /DOMAIN:DomainName /SET
>
HtH
>
Pieter
>


Just to be clear, putting that into the user's logon script will set their
PC's time to the server's time?|||"Neil" <nospam@.nospam.netwrote in message
news:8WT3j.25110$JD.20049@.newssvr21.news.prodigy.n et...

Quote:

Originally Posted by

>

Quote:

Originally Posted by

>"Tony Toews [MVP]" <ttoews@.telusplanet.netwrote in message
>news:ukbvk3dm2tn1opt3tbtbp1d561lvq062qs@.4ax.com...

Quote:

Originally Posted by

>>"Neil" <nospam@.nospam.netwrote:
>>>
>>Well, unfortunately that doesn't seem to be the case. Individual
>>computers
>>vary from the server time by as much as 10 minutes! Is there some sort
>>of
>>setting to use to use the server time. Maybe I'll pass that along to the
>>admin and see if he implements it.
>>>
>>BTW there are functions to also get the system time from a server and
>>compare that to the time on the PC. You can use that to show the IT
>>department.
>>>
>>API: Retrieve NT Server's Time
>>http://www.mvps.org/access/api/api0039.htm
>>>
>>Tony
>>--
>>Tony Toews, Microsoft Access MVP
>> Please respond only in the newsgroups so that others can
>>read the entire thread of messages.
>> Microsoft Access Links, Hints, Tips & Accounting Systems at
>>http://www.granite.ab.ca/accsmstr.htm
>> Tony's Microsoft Access Blog - http://msmvps.com/blogs/access/


>>
>>


>
"Pieter Wijnen"
<it.isi.llegal.to.send.unsollicited.mail.wijnen.nos pam.please@.online.replace.with.norway>
wrote in message news:O6o2%23EyMIHA.2432@.TK2MSFTNGP04.phx.gbl...

Quote:

Originally Posted by

>The command line (which should be included in the logon script) is:
>>
>net time /DOMAIN:DomainName /SET
>>
>HtH
>>
>Pieter
>>


>
Just to be clear, putting that into the user's logon script will set their
PC's time to the server's time?
>


To the DOMAIN controller's time.

The SQL server (which in most cases is not a DC) should also synch to the
domain controller.

There's also a registry setting to force it to synch that can be set under
domain policies.

The only time I've had to do the net time /domain: in recent memory was when
the time of the client was so far off that it wouldn't log in properly.

Quote:

Originally Posted by

>


--
Greg Moore
SQL Server DBA Consulting Remote and Onsite available!
Email: sql (at) greenms.com http://www.greenms.com/sqlserver.html

Wednesday, March 21, 2012

Getting rsAccessDenied error for a completely different user?!

When userA is not permitted to view the report server, the following
message would normally appear when userA tries to access
http://localhost/reportserver
Reporting Services Error
----
The permissions granted to user 'domain\userA' are insufficient for
performing this operation. (rsAccessDenied) Get Online Help
----
This is the correct behaviour. Now say userB and userC both have
access to reports. When userB opens the page, it displays the list of
RDLs correctly; when userC opens the page, he gets the above error
message EXACTLY, meaning the report server thinks userC is userA and
displays "The permissions granted to user 'domain\userA' are
insufficient ..."
So userC becomes userA and is denied access to the reports -- how
could this have happened? I've checked the permission of that folder
and IIS settings and there is no mention of special translation of
username or permission settings for either user. Any ideas where else
I should check?I have seen this when two people share a computer and rathering than logging
off and back on the second user unlocks the computer and starts using it.
Bruce Loehle-Conger
MVP SQL Server Reporting Services
"Yuting ak199" <kuoyuting@.gmail.com> wrote in message
news:e5bcbe3f-95fd-4b23-a1ea-89496386bc49@.k2g2000hse.googlegroups.com...
> When userA is not permitted to view the report server, the following
> message would normally appear when userA tries to access
> http://localhost/reportserver
> Reporting Services Error
> ----
> The permissions granted to user 'domain\userA' are insufficient for
> performing this operation. (rsAccessDenied) Get Online Help
> ----
> This is the correct behaviour. Now say userB and userC both have
> access to reports. When userB opens the page, it displays the list of
> RDLs correctly; when userC opens the page, he gets the above error
> message EXACTLY, meaning the report server thinks userC is userA and
> displays "The permissions granted to user 'domain\userA' are
> insufficient ..."
> So userC becomes userA and is denied access to the reports -- how
> could this have happened? I've checked the permission of that folder
> and IIS settings and there is no mention of special translation of
> username or permission settings for either user. Any ideas where else
> I should check?|||On Jan 30, 6:31 pm, "Bruce L-C [MVP]" <bruce_lcNOS...@.hotmail.com>
wrote:
> I have seen this when two people share a computer and rathering than logging
> off and back on the second user unlocks the computer and starts using it.
>
That doesn't appear to be the cause here, as the issue happens even if
only one user is logged in, and the same issue occurs on several
machines...

Monday, March 19, 2012

getting rid of BUILTIN\administrator

Using SS2000. I'm trying to improve the security of our SQLServers. I have a server that has only 3 users. The BUILTIN, sa and a user called "dar".
The BUILTIN is the dbo for every database. If I try to remove the dbo from a database I get - "Cannot use the reserved user or role name 'dbo'. If I try to remove database access I get - "The database owner cannot be dropped."
How do I get rid of it?
I understand that I'll have to change the user that SQLServer Agent and Full Text Indexing use to logon. Is Full Text Indexing show up as Microsoft Search in Services?
Thanks,
Dan D.
look at sp_changedbowner to change the owner to sa. As you noted, make sure
that the service accounts for mssqlserver, sqlserveragent can log in.
Full-text always runs as localsystem so make sure [nt authority\system] is a
valid login and sysadmin.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
> Using SS2000. I'm trying to improve the security of our SQLServers. I have
> a server that has only 3 users. The BUILTIN, sa and a user called "dar".
> The BUILTIN is the dbo for every database. If I try to remove the dbo from
> a database I get - "Cannot use the reserved user or role name 'dbo'. If I
> try to remove database access I get - "The database owner cannot be
> dropped."
> How do I get rid of it?
> I understand that I'll have to change the user that SQLServer Agent and
> Full Text Indexing use to logon. Is Full Text Indexing show up as
> Microsoft Search in Services?
> Thanks,
> --
> Dan D.
|||I was thinking of creating a login called "SQLServer" with administrator priveleges and using it for mssqlserver, sqlserveragent and full text. Will this work for full text? And is the full text service actually called "Microsoft Search"?
Thanks,
Dan D.
"Richard Waymire [MSFT]" wrote:

> look at sp_changedbowner to change the owner to sa. As you noted, make sure
> that the service accounts for mssqlserver, sqlserveragent can log in.
> Full-text always runs as localsystem so make sure [nt authority\system] is a
> valid login and sysadmin.
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
>
>
|||no, fulltext is required to be localsystem unfortunately. And yes, that's
the right service.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...[vbcol=seagreen]
>I was thinking of creating a login called "SQLServer" with administrator
>priveleges and using it for mssqlserver, sqlserveragent and full text. Will
>this work for full text? And is the full text service actually called
>"Microsoft Search"?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
|||So, if I remove the BUILTIN\administrator login you're saying I have to add a login for NT Authority\system. Is that correct? We're running Windows 2000/2003 on our servers. I don't see an NT Authority login. Is there another name for it?
Thanks,
Dan D.
"Richard Waymire [MSFT]" wrote:

> no, fulltext is required to be localsystem unfortunately. And yes, that's
> the right service.
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
>
>
|||no, that's the right name - are you getting an error when you add it? and
yes, that's what I'm saying you must do if you want to use full-text
search...
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> So, if I remove the BUILTIN\administrator login you're saying I have to
> add a login for NT Authority\system. Is that correct? We're running
> Windows 2000/2003 on our servers. I don't see an NT Authority login. Is
> there another name for it?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>
|||You won't see it but you should be able to add it using QA e.g.
exec sp_grantlogin [NT Authority\System]
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> So, if I remove the BUILTIN\administrator login you're saying I have to
add a login for NT Authority\system. Is that correct? We're running Windows
2000/2003 on our servers. I don't see an NT Authority login. Is there
another name for it?[vbcol=seagreen]
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
that's[vbcol=seagreen]
rights.[vbcol=seagreen]
administrator[vbcol=seagreen]
Will[vbcol=seagreen]
make[vbcol=seagreen]
authority\system][vbcol=seagreen]
I[vbcol=seagreen]
dbo[vbcol=seagreen]
'dbo'. If[vbcol=seagreen]
and[vbcol=seagreen]
|||I used what Jasper suggested and I now have an NT Authority\system login.
So do I leave the Microsoft Search service set to use "localsystem"? And after I remove the "BUILTIN\administrator" login, the service will use the NT Authority\system login?
Thanks,
Dan D.
"Richard Waymire [MSFT]" wrote:

> no, that's the right name - are you getting an error when you add it? and
> yes, that's what I'm saying you must do if you want to use full-text
> search...
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
>
>
|||Thanks Jasper. I now have a [NT Authority\System] login.
Dan D.
"Jasper Smith" wrote:

> You won't see it but you should be able to add it using QA e.g.
> exec sp_grantlogin [NT Authority\System]
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> add a login for NT Authority\system. Is that correct? We're running Windows
> 2000/2003 on our servers. I don't see an NT Authority login. Is there
> another name for it?
> that's
> rights.
> administrator
> Will
> make
> authority\system]
> I
> dbo
> 'dbo'. If
> and
>
>
|||correct.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:70843D0C-586B-441F-AAA9-9ADE90E9ECFA@.microsoft.com...[vbcol=seagreen]
>I used what Jasper suggested and I now have an NT Authority\system login.
> So do I leave the Microsoft Search service set to use "localsystem"? And
> after I remove the "BUILTIN\administrator" login, the service will use the
> NT Authority\system login?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:

getting rid of BUILTIN\administrator

Using SS2000. I'm trying to improve the security of our SQLServers. I have a server that has only 3 users. The BUILTIN, sa and a user called "dar".
The BUILTIN is the dbo for every database. If I try to remove the dbo from a database I get - "Cannot use the reserved user or role name 'dbo'. If I try to remove database access I get - "The database owner cannot be dropped."
How do I get rid of it?
I understand that I'll have to change the user that SQLServer Agent and Full Text Indexing use to logon. Is Full Text Indexing show up as Microsoft Search in Services?
Thanks,
--
Dan D.look at sp_changedbowner to change the owner to sa. As you noted, make sure
that the service accounts for mssqlserver, sqlserveragent can log in.
Full-text always runs as localsystem so make sure [nt authority\system] is a
valid login and sysadmin.
--
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
> Using SS2000. I'm trying to improve the security of our SQLServers. I have
> a server that has only 3 users. The BUILTIN, sa and a user called "dar".
> The BUILTIN is the dbo for every database. If I try to remove the dbo from
> a database I get - "Cannot use the reserved user or role name 'dbo'. If I
> try to remove database access I get - "The database owner cannot be
> dropped."
> How do I get rid of it?
> I understand that I'll have to change the user that SQLServer Agent and
> Full Text Indexing use to logon. Is Full Text Indexing show up as
> Microsoft Search in Services?
> Thanks,
> --
> Dan D.|||no, fulltext is required to be localsystem unfortunately. And yes, that's
the right service.
--
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
>I was thinking of creating a login called "SQLServer" with administrator
>priveleges and using it for mssqlserver, sqlserveragent and full text. Will
>this work for full text? And is the full text service actually called
>"Microsoft Search"?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>> look at sp_changedbowner to change the owner to sa. As you noted, make
>> sure
>> that the service accounts for mssqlserver, sqlserveragent can log in.
>> Full-text always runs as localsystem so make sure [nt authority\system]
>> is a
>> valid login and sysadmin.
>> --
>> Richard Waymire, MCSE, MCDBA
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
>> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
>> > Using SS2000. I'm trying to improve the security of our SQLServers. I
>> > have
>> > a server that has only 3 users. The BUILTIN, sa and a user called
>> > "dar".
>> >
>> > The BUILTIN is the dbo for every database. If I try to remove the dbo
>> > from
>> > a database I get - "Cannot use the reserved user or role name 'dbo'. If
>> > I
>> > try to remove database access I get - "The database owner cannot be
>> > dropped."
>> >
>> > How do I get rid of it?
>> >
>> > I understand that I'll have to change the user that SQLServer Agent and
>> > Full Text Indexing use to logon. Is Full Text Indexing show up as
>> > Microsoft Search in Services?
>> >
>> > Thanks,
>> > --
>> > Dan D.
>>|||So, if I remove the BUILTIN\administrator login you're saying I have to add a login for NT Authority\system. Is that correct? We're running Windows 2000/2003 on our servers. I don't see an NT Authority login. Is there another name for it?
Thanks,
--
Dan D.
"Richard Waymire [MSFT]" wrote:
> no, fulltext is required to be localsystem unfortunately. And yes, that's
> the right service.
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
> >I was thinking of creating a login called "SQLServer" with administrator
> >priveleges and using it for mssqlserver, sqlserveragent and full text. Will
> >this work for full text? And is the full text service actually called
> >"Microsoft Search"?
> >
> > Thanks,
> > --
> > Dan D.
> >
> >
> > "Richard Waymire [MSFT]" wrote:
> >
> >> look at sp_changedbowner to change the owner to sa. As you noted, make
> >> sure
> >> that the service accounts for mssqlserver, sqlserveragent can log in.
> >> Full-text always runs as localsystem so make sure [nt authority\system]
> >> is a
> >> valid login and sysadmin.
> >>
> >> --
> >> Richard Waymire, MCSE, MCDBA
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> >> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
> >> > Using SS2000. I'm trying to improve the security of our SQLServers. I
> >> > have
> >> > a server that has only 3 users. The BUILTIN, sa and a user called
> >> > "dar".
> >> >
> >> > The BUILTIN is the dbo for every database. If I try to remove the dbo
> >> > from
> >> > a database I get - "Cannot use the reserved user or role name 'dbo'. If
> >> > I
> >> > try to remove database access I get - "The database owner cannot be
> >> > dropped."
> >> >
> >> > How do I get rid of it?
> >> >
> >> > I understand that I'll have to change the user that SQLServer Agent and
> >> > Full Text Indexing use to logon. Is Full Text Indexing show up as
> >> > Microsoft Search in Services?
> >> >
> >> > Thanks,
> >> > --
> >> > Dan D.
> >>
> >>
> >>
>
>|||no, that's the right name - are you getting an error when you add it? and
yes, that's what I'm saying you must do if you want to use full-text
search...
--
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> So, if I remove the BUILTIN\administrator login you're saying I have to
> add a login for NT Authority\system. Is that correct? We're running
> Windows 2000/2003 on our servers. I don't see an NT Authority login. Is
> there another name for it?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>> no, fulltext is required to be localsystem unfortunately. And yes,
>> that's
>> the right service.
>> --
>> Richard Waymire, MCSE, MCDBA
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
>> news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
>> >I was thinking of creating a login called "SQLServer" with administrator
>> >priveleges and using it for mssqlserver, sqlserveragent and full text.
>> >Will
>> >this work for full text? And is the full text service actually called
>> >"Microsoft Search"?
>> >
>> > Thanks,
>> > --
>> > Dan D.
>> >
>> >
>> > "Richard Waymire [MSFT]" wrote:
>> >
>> >> look at sp_changedbowner to change the owner to sa. As you noted,
>> >> make
>> >> sure
>> >> that the service accounts for mssqlserver, sqlserveragent can log in.
>> >> Full-text always runs as localsystem so make sure [nt
>> >> authority\system]
>> >> is a
>> >> valid login and sysadmin.
>> >>
>> >> --
>> >> Richard Waymire, MCSE, MCDBA
>> >>
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
>> >> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
>> >> > Using SS2000. I'm trying to improve the security of our SQLServers.
>> >> > I
>> >> > have
>> >> > a server that has only 3 users. The BUILTIN, sa and a user called
>> >> > "dar".
>> >> >
>> >> > The BUILTIN is the dbo for every database. If I try to remove the
>> >> > dbo
>> >> > from
>> >> > a database I get - "Cannot use the reserved user or role name 'dbo'.
>> >> > If
>> >> > I
>> >> > try to remove database access I get - "The database owner cannot be
>> >> > dropped."
>> >> >
>> >> > How do I get rid of it?
>> >> >
>> >> > I understand that I'll have to change the user that SQLServer Agent
>> >> > and
>> >> > Full Text Indexing use to logon. Is Full Text Indexing show up as
>> >> > Microsoft Search in Services?
>> >> >
>> >> > Thanks,
>> >> > --
>> >> > Dan D.
>> >>
>> >>
>> >>
>>
>|||You won't see it but you should be able to add it using QA e.g.
exec sp_grantlogin [NT Authority\System]
--
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> So, if I remove the BUILTIN\administrator login you're saying I have to
add a login for NT Authority\system. Is that correct? We're running Windows
2000/2003 on our servers. I don't see an NT Authority login. Is there
another name for it?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
> > no, fulltext is required to be localsystem unfortunately. And yes,
that's
> > the right service.
> >
> > --
> > Richard Waymire, MCSE, MCDBA
> >
> > This posting is provided "AS IS" with no warranties, and confers no
rights.
> > "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> > news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
> > >I was thinking of creating a login called "SQLServer" with
administrator
> > >priveleges and using it for mssqlserver, sqlserveragent and full text.
Will
> > >this work for full text? And is the full text service actually called
> > >"Microsoft Search"?
> > >
> > > Thanks,
> > > --
> > > Dan D.
> > >
> > >
> > > "Richard Waymire [MSFT]" wrote:
> > >
> > >> look at sp_changedbowner to change the owner to sa. As you noted,
make
> > >> sure
> > >> that the service accounts for mssqlserver, sqlserveragent can log in.
> > >> Full-text always runs as localsystem so make sure [nt
authority\system]
> > >> is a
> > >> valid login and sysadmin.
> > >>
> > >> --
> > >> Richard Waymire, MCSE, MCDBA
> > >>
> > >> This posting is provided "AS IS" with no warranties, and confers no
> > >> rights.
> > >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> > >> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
> > >> > Using SS2000. I'm trying to improve the security of our SQLServers.
I
> > >> > have
> > >> > a server that has only 3 users. The BUILTIN, sa and a user called
> > >> > "dar".
> > >> >
> > >> > The BUILTIN is the dbo for every database. If I try to remove the
dbo
> > >> > from
> > >> > a database I get - "Cannot use the reserved user or role name
'dbo'. If
> > >> > I
> > >> > try to remove database access I get - "The database owner cannot be
> > >> > dropped."
> > >> >
> > >> > How do I get rid of it?
> > >> >
> > >> > I understand that I'll have to change the user that SQLServer Agent
and
> > >> > Full Text Indexing use to logon. Is Full Text Indexing show up as
> > >> > Microsoft Search in Services?
> > >> >
> > >> > Thanks,
> > >> > --
> > >> > Dan D.
> > >>
> > >>
> > >>
> >
> >
> >|||I used what Jasper suggested and I now have an NT Authority\system login.
So do I leave the Microsoft Search service set to use "localsystem"? And after I remove the "BUILTIN\administrator" login, the service will use the NT Authority\system login?
Thanks,
--
Dan D.
"Richard Waymire [MSFT]" wrote:
> no, that's the right name - are you getting an error when you add it? and
> yes, that's what I'm saying you must do if you want to use full-text
> search...
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> > So, if I remove the BUILTIN\administrator login you're saying I have to
> > add a login for NT Authority\system. Is that correct? We're running
> > Windows 2000/2003 on our servers. I don't see an NT Authority login. Is
> > there another name for it?
> >
> > Thanks,
> > --
> > Dan D.
> >
> >
> > "Richard Waymire [MSFT]" wrote:
> >
> >> no, fulltext is required to be localsystem unfortunately. And yes,
> >> that's
> >> the right service.
> >>
> >> --
> >> Richard Waymire, MCSE, MCDBA
> >>
> >> This posting is provided "AS IS" with no warranties, and confers no
> >> rights.
> >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> >> news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
> >> >I was thinking of creating a login called "SQLServer" with administrator
> >> >priveleges and using it for mssqlserver, sqlserveragent and full text.
> >> >Will
> >> >this work for full text? And is the full text service actually called
> >> >"Microsoft Search"?
> >> >
> >> > Thanks,
> >> > --
> >> > Dan D.
> >> >
> >> >
> >> > "Richard Waymire [MSFT]" wrote:
> >> >
> >> >> look at sp_changedbowner to change the owner to sa. As you noted,
> >> >> make
> >> >> sure
> >> >> that the service accounts for mssqlserver, sqlserveragent can log in.
> >> >> Full-text always runs as localsystem so make sure [nt
> >> >> authority\system]
> >> >> is a
> >> >> valid login and sysadmin.
> >> >>
> >> >> --
> >> >> Richard Waymire, MCSE, MCDBA
> >> >>
> >> >> This posting is provided "AS IS" with no warranties, and confers no
> >> >> rights.
> >> >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> >> >> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
> >> >> > Using SS2000. I'm trying to improve the security of our SQLServers.
> >> >> > I
> >> >> > have
> >> >> > a server that has only 3 users. The BUILTIN, sa and a user called
> >> >> > "dar".
> >> >> >
> >> >> > The BUILTIN is the dbo for every database. If I try to remove the
> >> >> > dbo
> >> >> > from
> >> >> > a database I get - "Cannot use the reserved user or role name 'dbo'.
> >> >> > If
> >> >> > I
> >> >> > try to remove database access I get - "The database owner cannot be
> >> >> > dropped."
> >> >> >
> >> >> > How do I get rid of it?
> >> >> >
> >> >> > I understand that I'll have to change the user that SQLServer Agent
> >> >> > and
> >> >> > Full Text Indexing use to logon. Is Full Text Indexing show up as
> >> >> > Microsoft Search in Services?
> >> >> >
> >> >> > Thanks,
> >> >> > --
> >> >> > Dan D.
> >> >>
> >> >>
> >> >>
> >>
> >>
> >>
> >
>
>|||correct.
--
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:70843D0C-586B-441F-AAA9-9ADE90E9ECFA@.microsoft.com...
>I used what Jasper suggested and I now have an NT Authority\system login.
> So do I leave the Microsoft Search service set to use "localsystem"? And
> after I remove the "BUILTIN\administrator" login, the service will use the
> NT Authority\system login?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>> no, that's the right name - are you getting an error when you add it?
>> and
>> yes, that's what I'm saying you must do if you want to use full-text
>> search...
>> --
>> Richard Waymire, MCSE, MCDBA
>> This posting is provided "AS IS" with no warranties, and confers no
>> rights.
>> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
>> news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
>> > So, if I remove the BUILTIN\administrator login you're saying I have to
>> > add a login for NT Authority\system. Is that correct? We're running
>> > Windows 2000/2003 on our servers. I don't see an NT Authority login. Is
>> > there another name for it?
>> >
>> > Thanks,
>> > --
>> > Dan D.
>> >
>> >
>> > "Richard Waymire [MSFT]" wrote:
>> >
>> >> no, fulltext is required to be localsystem unfortunately. And yes,
>> >> that's
>> >> the right service.
>> >>
>> >> --
>> >> Richard Waymire, MCSE, MCDBA
>> >>
>> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> rights.
>> >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
>> >> news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
>> >> >I was thinking of creating a login called "SQLServer" with
>> >> >administrator
>> >> >priveleges and using it for mssqlserver, sqlserveragent and full
>> >> >text.
>> >> >Will
>> >> >this work for full text? And is the full text service actually called
>> >> >"Microsoft Search"?
>> >> >
>> >> > Thanks,
>> >> > --
>> >> > Dan D.
>> >> >
>> >> >
>> >> > "Richard Waymire [MSFT]" wrote:
>> >> >
>> >> >> look at sp_changedbowner to change the owner to sa. As you noted,
>> >> >> make
>> >> >> sure
>> >> >> that the service accounts for mssqlserver, sqlserveragent can log
>> >> >> in.
>> >> >> Full-text always runs as localsystem so make sure [nt
>> >> >> authority\system]
>> >> >> is a
>> >> >> valid login and sysadmin.
>> >> >>
>> >> >> --
>> >> >> Richard Waymire, MCSE, MCDBA
>> >> >>
>> >> >> This posting is provided "AS IS" with no warranties, and confers no
>> >> >> rights.
>> >> >> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
>> >> >> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
>> >> >> > Using SS2000. I'm trying to improve the security of our
>> >> >> > SQLServers.
>> >> >> > I
>> >> >> > have
>> >> >> > a server that has only 3 users. The BUILTIN, sa and a user called
>> >> >> > "dar".
>> >> >> >
>> >> >> > The BUILTIN is the dbo for every database. If I try to remove the
>> >> >> > dbo
>> >> >> > from
>> >> >> > a database I get - "Cannot use the reserved user or role name
>> >> >> > 'dbo'.
>> >> >> > If
>> >> >> > I
>> >> >> > try to remove database access I get - "The database owner cannot
>> >> >> > be
>> >> >> > dropped."
>> >> >> >
>> >> >> > How do I get rid of it?
>> >> >> >
>> >> >> > I understand that I'll have to change the user that SQLServer
>> >> >> > Agent
>> >> >> > and
>> >> >> > Full Text Indexing use to logon. Is Full Text Indexing show up as
>> >> >> > Microsoft Search in Services?
>> >> >> >
>> >> >> > Thanks,
>> >> >> > --
>> >> >> > Dan D.
>> >> >>
>> >> >>
>> >> >>
>> >>
>> >>
>> >>
>> >
>>

getting rid of BUILTIN\administrator

Using SS2000. I'm trying to improve the security of our SQLServers. I have a
server that has only 3 users. The BUILTIN, sa and a user called "dar".
The BUILTIN is the dbo for every database. If I try to remove the dbo from a
database I get - "Cannot use the reserved user or role name 'dbo'. If I try
to remove database access I get - "The database owner cannot be dropped."
How do I get rid of it?
I understand that I'll have to change the user that SQLServer Agent and Full
Text Indexing use to logon. Is Full Text Indexing show up as Microsoft Sear
ch in Services?
Thanks,
--
Dan D.look at sp_changedbowner to change the owner to sa. As you noted, make sure
that the service accounts for mssqlserver, sqlserveragent can log in.
Full-text always runs as localsystem so make sure [nt authority\system]
is a
valid login and sysadmin.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
> Using SS2000. I'm trying to improve the security of our SQLServers. I have
> a server that has only 3 users. The BUILTIN, sa and a user called "dar".
> The BUILTIN is the dbo for every database. If I try to remove the dbo from
> a database I get - "Cannot use the reserved user or role name 'dbo'. If I
> try to remove database access I get - "The database owner cannot be
> dropped."
> How do I get rid of it?
> I understand that I'll have to change the user that SQLServer Agent and
> Full Text Indexing use to logon. Is Full Text Indexing show up as
> Microsoft Search in Services?
> Thanks,
> --
> Dan D.|||I was thinking of creating a login called "SQLServer" with administrator pri
veleges and using it for mssqlserver, sqlserveragent and full text. Will thi
s work for full text? And is the full text service actually called "Microsof
t Search"?
Thanks,
--
Dan D.
"Richard Waymire [MSFT]" wrote:

> look at sp_changedbowner to change the owner to sa. As you noted, make su
re
> that the service accounts for mssqlserver, sqlserveragent can log in.
> Full-text always runs as localsystem so make sure [nt authority\system
] is a
> valid login and sysadmin.
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:D2E3D1A7-26E1-472F-94F4-D8CC036BF4B3@.microsoft.com...
>
>|||no, fulltext is required to be localsystem unfortunately. And yes, that's
the right service.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...[vbcol=seagreen]
>I was thinking of creating a login called "SQLServer" with administrator
>priveleges and using it for mssqlserver, sqlserveragent and full text. Will
>this work for full text? And is the full text service actually called
>"Microsoft Search"?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>|||So, if I remove the BUILTIN\administrator login you're saying I have to add
a login for NT Authority\system. Is that correct? We're running Windows 2000
/2003 on our servers. I don't see an NT Authority login. Is there another na
me for it?
Thanks,
--
Dan D.
"Richard Waymire [MSFT]" wrote:

> no, fulltext is required to be localsystem unfortunately. And yes, that's
> the right service.
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:1CC74058-7E57-4C84-9163-3FDAB27EA214@.microsoft.com...
>
>|||no, that's the right name - are you getting an error when you add it? and
yes, that's what I'm saying you must do if you want to use full-text
search...
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> So, if I remove the BUILTIN\administrator login you're saying I have to
> add a login for NT Authority\system. Is that correct? We're running
> Windows 2000/2003 on our servers. I don't see an NT Authority login. Is
> there another name for it?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>
>|||You won't see it but you should be able to add it using QA e.g.
exec sp_grantlogin [NT Authority\System]
HTH
Jasper Smith (SQL Server MVP)
http://www.sqldbatips.com
I support PASS - the definitive, global
community for SQL Server professionals -
http://www.sqlpass.org
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> So, if I remove the BUILTIN\administrator login you're saying I have to
add a login for NT Authority\system. Is that correct? We're running Windows
2000/2003 on our servers. I don't see an NT Authority login. Is there
another name for it?[vbcol=seagreen]
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>
that's[vbcol=seagreen]
rights.[vbcol=seagreen]
administrator[vbcol=seagreen]
Will[vbcol=seagreen]
make[vbcol=seagreen]
authority\system][vbcol=seagreen]
I[vbcol=seagreen]
dbo[vbcol=seagreen]
'dbo'. If[vbcol=seagreen]
and[vbcol=seagreen]|||I used what Jasper suggested and I now have an NT Authority\system login.
So do I leave the Microsoft Search service set to use "localsystem"? And aft
er I remove the "BUILTIN\administrator" login, the service will use the NT A
uthority\system login?
Thanks,
--
Dan D.
"Richard Waymire [MSFT]" wrote:

> no, that's the right name - are you getting an error when you add it? and
> yes, that's what I'm saying you must do if you want to use full-text
> search...
> --
> Richard Waymire, MCSE, MCDBA
> This posting is provided "AS IS" with no warranties, and confers no rights
.
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
>
>|||Thanks Jasper. I now have a [NT Authority\System] login.
--
Dan D.
"Jasper Smith" wrote:

> You won't see it but you should be able to add it using QA e.g.
> exec sp_grantlogin [NT Authority\System]
> --
> HTH
> Jasper Smith (SQL Server MVP)
> http://www.sqldbatips.com
> I support PASS - the definitive, global
> community for SQL Server professionals -
> http://www.sqlpass.org
> "Dan D." <DanD@.discussions.microsoft.com> wrote in message
> news:405B8A4F-F683-46F0-AA1B-CC01780B65A2@.microsoft.com...
> add a login for NT Authority\system. Is that correct? We're running Window
s
> 2000/2003 on our servers. I don't see an NT Authority login. Is there
> another name for it?
> that's
> rights.
> administrator
> Will
> make
> authority\system]
> I
> dbo
> 'dbo'. If
> and
>
>|||correct.
Richard Waymire, MCSE, MCDBA
This posting is provided "AS IS" with no warranties, and confers no rights.
"Dan D." <DanD@.discussions.microsoft.com> wrote in message
news:70843D0C-586B-441F-AAA9-9ADE90E9ECFA@.microsoft.com...[vbcol=seagreen]
>I used what Jasper suggested and I now have an NT Authority\system login.
> So do I leave the Microsoft Search service set to use "localsystem"? And
> after I remove the "BUILTIN\administrator" login, the service will use the
> NT Authority\system login?
> Thanks,
> --
> Dan D.
>
> "Richard Waymire [MSFT]" wrote:
>

Getting Report page Count

Hi All
We have an ASP.NET application that lists all the reports hosted in our SQL
RS by using RS webservices. When user selects on a particular report from the
list the corresponding parameters get shown again using web service calls.
After the selection of parameters, the user gets to view the report in the
report viewer control. We have also designed a custom tool bar complete with
export options and with prev/next functionalities. In order to get the
pagecount we are calling the render method and get the streamid count. We are
passing the device info for Image i.e.
<DeviceInfo><OutputFormat>EMF</OutputFormat></DeviceInfo>. The streamId count
however is very random and does not match the actual total page count of the
report.
Can anyone please help or guide here...
Thanks !
PRI just wanted to add that the report gets shown in the reportviewer by URL.
The render method is used to purely generate the pagecount. Shouldn't there
be an easier way...
"PR" wrote:
> Hi All
> We have an ASP.NET application that lists all the reports hosted in our SQL
> RS by using RS webservices. When user selects on a particular report from the
> list the corresponding parameters get shown again using web service calls.
> After the selection of parameters, the user gets to view the report in the
> report viewer control. We have also designed a custom tool bar complete with
> export options and with prev/next functionalities. In order to get the
> pagecount we are calling the render method and get the streamid count. We are
> passing the device info for Image i.e.
> <DeviceInfo><OutputFormat>EMF</OutputFormat></DeviceInfo>. The streamId count
> however is very random and does not match the actual total page count of the
> report.
> Can anyone please help or guide here...
> Thanks !
> PR

Getting relationship data

Hi
I am trying to create a query or set of querys, which will allow me to retrieve the relationship data of a database. In sql Server 2000 the user can create diagrams which show these relationships, what i want to be able to do is get this data, but i am h
aving trouble finding a starting place. Could anyone point me in the right direction?
Thanks in advance
You can start by querying INFORMATION_SCHEMA.REFERENTIAL_CONSTRAINTS view.
If you are interested in viewing the reference constraints that exist in
your database, you can do:
SELECT o1.name AS "tablename",
OBJECT_NAME( f1.constid ) AS "constraintname",
OBJECT_NAME( f1.rkeyid ) as referencedtable
FROM sysobjects o1
LEFT OUTER JOIN sysconstraints c1
ON o1.id = c1.id
AND c1.status &3 = 3
LEFT OUTER JOIN sysforeignkeys f1
ON c1.constid = f1.constid
WHERE o1.type = 'u'
ORDER BY "referencedtable", "tablename" ;
Anith

Monday, March 12, 2012

Getting Problem in giving database permission to group user

hi ,

I am getting some problem in using group in sql server login.

i have two NT groups in windows.i) developer and tester

I added a user Lalit in both gruop. I want to give db_owner permission on a particular database(Employee) to developer group and data_denyreader and deny_writer on same database(Employee) to tester group.

Now when i logging in to sql server using Lalit(windows authentication) iam not able to access the database(Employee).

Now my concern is that Lalit should have full access to the employee database when entered as developer user and limited access to employee database when entered as tester user.

how can i achieve this set up?

Please do help.

Thanks a lot in advance !!!!!!!!!!!!!!!!!!

Deny trumps any other permission (other than SA). For my testing groups, I set up SQL Server login accounts, one called "Owner" and the other called "tester". That way when the devs log in they don't have to change NT contexts.

Getting permission for user "sa" on SQL Server Express 2005

I originally installed SQL Server Express 2005 on my computer using Windows Authentication mode, and discovered when I tried to add another user/login that I didn't have permission to do so. This is rather odd as the windows account that I installed SQL server with is the system admin for the computer.

I have successfully changed the login mode to mixed, and have tried to login in as "sa", but it appears that "sa" was given some sort of password (did SQL server automatically generate one?), and I don't know what it is. When I go into command prompt and try to change the password, it says that it cannot alter the login 'sa' because it does not exist or I do not have permission (i'm pretty sure it's the later, as 'sa' shows up on the list of logins in SQL server express).

I'm so stuck! Please help!Log into the instance, and run the following stored procedure:

sp_helpsrvrolemember

this will tell you what group or login has been added tot he sysadmin group. You may simply need to add yourself to a local windows group to get sysadmin privileges.|||"sa" is the only member of that server role.

where do I see which users are members of what local windows groups?|||nevermind that last bit.
I am a member of the administrators group in the Windows local group...
Should I try logging on as the "administrator" user and seeing if I can make the changes there?|||How was this instance installed? Usually BUiLTIN\ADMINISTRATORS is a sysadmin. There is also an option to specify an sa password on installation.|||I'm not really sure how I figured this out, but I went in and added myself to every Windows local group that had something to do with SQL and now I am able to do administrative stuff in my database.
*phew*|||I think my system came with SQL server express 2005 already installed on it.

I did go in enable the Administrator's account in the Windows Users accounts, in addition to adding myself to a bunch of groups, and now when I run the query previously mentioned, BUILTIN\ADMINISTRATORS is listed as a sysadmin - which must be what is giving me, one of the administrators, sysadmin privileges.

Friday, March 9, 2012

Getting NT users

Hello,
Is there any way to get a list of NT logins (not just SQL logins) ?
I have a form that adds logins to a database. Since user's don't have access
to create logins, we have a stored
procedure that does this as a job. I want to be able to check if a username
is a valid NT login before allowing
the user to add it to the "add" table. Otherwise, a user would have to wait
a day to find out that the they account
didn't get added since they misspelled the login.
Thanks in advance, and forgive my spam scramble in my email name. Web crawle
rs have been my bane.Hi
My preference is to grant a login to an NT group and then add the NT user to
that group. Then there is no misspelling and it can be done by the system
admin rather than the DBA!
John
"ChuckRoddy" <CUTHERESPAMTRAP_seresrj@.upmc.edu> wrote in message
news:1210DFA5-3668-418F-AA74-362280135B32@.microsoft.com...
> Hello,
> Is there any way to get a list of NT logins (not just SQL logins) ?
> I have a form that adds logins to a database. Since user's don't have
access to create logins, we have a stored
> procedure that does this as a job. I want to be able to check if a
username is a valid NT login before allowing
> the user to add it to the "add" table. Otherwise, a user would have to
wait a day to find out that the they account
> didn't get added since they misspelled the login.
>
> Thanks in advance, and forgive my spam scramble in my email name. Web
crawlers have been my bane.
>|||Thanks for the reply.
Actually, neither the DBA or the sys admin would be involved. Researchers wi
ll be granting their work studies access through a web based interface, and
the entire hospital will be using this. We'll need to save our sys admins fo
r network problems. I'm jus
t trying to find a way to validate an NT name
so we can get around problems caused by simple username misspellings.|||Hi
If the login does not exist then then sp_grantlogin will fail. If you really
want to allow people to see all the usernames on the domain then you should
also consider the security aspects of doing that. You may want to try the
NET GROUP command to see members of a specific domain group, it would then
be possible to restrict what is seen.
John
"ChuckRoddy" <anonymous@.discussions.microsoft.com> wrote in message
news:FE3EEB2B-2D18-44BF-8059-BE6286DFC907@.microsoft.com...
> Thanks for the reply.
> Actually, neither the DBA or the sys admin would be involved. Researchers
will be granting their work studies access through a web based interface,
and the entire hospital will be using this. We'll need to save our sys
admins for network problems. I'm just trying to find a way to validate an NT
name
> so we can get around problems caused by simple username misspellings.

Getting Network User Names

Can you write a query to get all the network user names?
Thanks
Don
Don wrote:
> Can you write a query to get all the network user names?
> Thanks
> Don
Get's them from where? What version of SQL Server? Do you mean those
network users who are currently logged into SQL Server, or do you mean a
query of Active Directory to query all users?
For SQL 2000: You can query the master..sysprocesses table (nt_username
column) for all connected users that have connected using Windows
Authentication. Otherwise, you can use the loginname for SQL
Authentication.
For SQL 2005: You can query the sys.dm_exec_sessions dmv.
David Gugick - SQL Server MVP
Quest Software
|||If you want to get list of all the accounts, you can do this
by creating a linked server to Active Directory. See books
online topic:
OLE DB Provider for Microsoft Directory Services
The following article has more information and links:
INFO: Performing a SQL Distributed Query by Using ADSI
http://support.microsoft.com/?id=299410
-Sue
On Sun, 12 Mar 2006 08:46:02 -0800, Don
<Don@.discussions.microsoft.com> wrote:

>Can you write a query to get all the network user names?
>Thanks
>Don

Getting Network User Names

Can you write a query to get all the network user names?
Thanks
DonDon wrote:
> Can you write a query to get all the network user names?
> Thanks
> Don
Get's them from where? What version of SQL Server? Do you mean those
network users who are currently logged into SQL Server, or do you mean a
query of Active Directory to query all users?
For SQL 2000: You can query the master..sysprocesses table (nt_username
column) for all connected users that have connected using Windows
Authentication. Otherwise, you can use the loginname for SQL
Authentication.
For SQL 2005: You can query the sys.dm_exec_sessions dmv.
David Gugick - SQL Server MVP
Quest Software|||If you want to get list of all the accounts, you can do this
by creating a linked server to Active Directory. See books
online topic:
OLE DB Provider for Microsoft Directory Services
The following article has more information and links:
INFO: Performing a SQL Distributed Query by Using ADSI
http://support.microsoft.com/?id=299410
-Sue
On Sun, 12 Mar 2006 08:46:02 -0800, Don
<Don@.discussions.microsoft.com> wrote:

>Can you write a query to get all the network user names?
>Thanks
>Don

Getting Network User Names

Can you write a query to get all the network user names?
Thanks
DonDon wrote:
> Can you write a query to get all the network user names?
> Thanks
> Don
Get's them from where? What version of SQL Server? Do you mean those
network users who are currently logged into SQL Server, or do you mean a
query of Active Directory to query all users?
For SQL 2000: You can query the master..sysprocesses table (nt_username
column) for all connected users that have connected using Windows
Authentication. Otherwise, you can use the loginname for SQL
Authentication.
For SQL 2005: You can query the sys.dm_exec_sessions dmv.
David Gugick - SQL Server MVP
Quest Software|||If you want to get list of all the accounts, you can do this
by creating a linked server to Active Directory. See books
online topic:
OLE DB Provider for Microsoft Directory Services
The following article has more information and links:
INFO: Performing a SQL Distributed Query by Using ADSI
http://support.microsoft.com/?id=299410
-Sue
On Sun, 12 Mar 2006 08:46:02 -0800, Don
<Don@.discussions.microsoft.com> wrote:
>Can you write a query to get all the network user names?
>Thanks
>Don

getting native error 18456 Error = login failed for user(username) when using BCP

Hi ,
can any one help in exporting data to a flat file by using BCP,
iam trying to use BCP but iam getting following error
Error : native error 18456 Error = login failed for user when using
BCP
thanks well in advanceexec master..xp_cmdshell 'BCP northwind..orders OUT
c:\test1.txt -c -C850 -SServer -Usa -Ppwd'
"RPK" <praveen.rampally@.gmail.com> wrote in message
news:1143093192.808073.125810@.u72g2000cwu.googlegroups.com...
> Hi ,
> can any one help in exporting data to a flat file by using BCP,
> iam trying to use BCP but iam getting following error
> Error : native error 18456 Error = login failed for user when using
> BCP
> thanks well in advance
>

Wednesday, March 7, 2012

getting more information while using audit trace files .trc files

Hello All,
I am trying to create a trace for user error messages using audit user error messages event class.I could create .trc file. But , unfortunately I am unable to get sql query which caused the error . I cannot use profiler to create and see the trace files as it is against our requirement.

This is how I created the trace file

1) DECLARE @.TraceIdOut int
Exec sp_trace_create @.traceid= @.TraceIdOut OUTPUT
,@.options = 2 ,@.tracefile =N'c:\Parseerrors'
PRINT @.TraceIdOut

2) Set the trace event to monitor Parse error messages
Exec sp_trace_setevent @.traceid = 2,@.eventid = 162,@.columnid =1, @.on = @.On

3) Set the trace event status to start.
EXEC sp_trace_setstatus @.traceid = 2, @.status = 1

I am getting only one column ..that is column which shows the user error..
for example "incorrect syntax near 'abcd' ".

I also want the sql query which caused the error. I could give only one columnid number while setting the trace event.

Please help me in getting the sql query which caused this error.

Each execution of 'sp_trace_setevent' will set a single column capture for the given event. If you want to capture different columns for the same event, include multiple back-to-back executions of 'sp_trace_setevent' with the same @.traceid and @.eventid values, but different @.columnid values.

Might find it easier if you opened profiler and configured the trace graphically with the events and columns you'd like to capture then start it and stop it immediately, then choose to script it from the 'File...Export...Script Trace Definition' menu option(s)...that will create a script file with the commands you would want to use to capture via a server-side trace.

HTH

getting list of SQL Instances / Databases on network

I am using C#.NET and I am writing an application where I need to display to
the user in a comboBox all the SQL Server instances that can be detected and
dis. I have seen many applications like Enterprise Manager that can detect
them all. Once the user selects the instance, I would also like to get a lis
t
of all the databases stored into another combo.
How do I do this in C#?
Thanks for the help in advance.
David
Message posted via http://www.webservertalk.comhi
probably this can hekp you:
http://chanduas.blogspot.com/2005/0...-databases.html
best Regards,
Chandra
http://chanduas.blogspot.com/
http://www.SQLResource.com/
---
"David C via webservertalk.com" wrote:

> I am using C#.NET and I am writing an application where I need to display
to
> the user in a comboBox all the SQL Server instances that can be detected a
nd
> dis. I have seen many applications like Enterprise Manager that can detect
> them all. Once the user selects the instance, I would also like to get a l
ist
> of all the databases stored into another combo.
> How do I do this in C#?
> Thanks for the help in advance.
> David
>
> --
> Message posted via http://www.webservertalk.com
>|||This just lists the databases on a *known* single instance, which is also
treated here in more depth:
http://www.aspfaq.com/2456
"Chandra" <chandra@.discussions.microsoft.com> wrote in message
news:3EAACA02-A627-4CE6-8A6E-E9CCFF6208D2@.microsoft.com...
> hi
> probably this can hekp you:
> http://chanduas.blogspot.com/2005/0...-databases.html
>
> --
> best Regards,
> Chandra
> http://chanduas.blogspot.com/
> http://www.SQLResource.com/
> ---
>
> "David C via webservertalk.com" wrote:
>|||If you are familiar with SQL-DMO, you can use ListAvailableServers()
You can also use the SQLPing utility; one version has C# source code
included.
http://www.sqlsecurity.com/DesktopDefault.aspx?tabid=26
In addition, Gert has produced some tools:
http://www.sqldev.net/misc/EnumSQLSvr.htm
http://www.sqldev.net/misc/ListSQLSvr.htm
http://www.sqldev.net/misc/OleDbEnum.htm
"David C via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:52A41F2E6B25A@.webservertalk.com...
>I am using C#.NET and I am writing an application where I need to display
>to
> the user in a comboBox all the SQL Server instances that can be detected
> and
> dis. I have seen many applications like Enterprise Manager that can detect
> them all. Once the user selects the instance, I would also like to get a
> list
> of all the databases stored into another combo.
> How do I do this in C#?
> Thanks for the help in advance.
> David
>
> --
> Message posted via http://www.webservertalk.com|||Thank Chandra but that will only help me once I get the instance. I also nee
d
to know how to query all the instances that exist on the network. Any help
would be great from someone.
Thanks,
David
Chandra wrote:
>hi
>probably this can hekp you:
>http://chanduas.blogspot.com/2005/0...-databases.html
>
>[quoted text clipped - 7 lines]
Message posted via http://www.webservertalk.com|||Thank Chandra but that will only help me once I get the instance. I also nee
d
to know how to query all the instances that exist on the network. Any help
would be great from someone.
Thanks,
David
Chandra wrote:
>hi
>probably this can hekp you:
>http://chanduas.blogspot.com/2005/0...-databases.html
>
>[quoted text clipped - 7 lines]
Message posted via http://www.webservertalk.com|||Here's a very quick way to do it in C#
Create a new console application, and add this reference:
Project | Add Reference | COM | Microsoft SQLDMO Object Library
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication1
{
class Program
{
static void Main(string[] args)
{
SQLDMO.Application sqlDmoApplication = new SQLDMO.Application();
SQLDMO.NameList serverList;
serverList = sqlDmoApplication.ListAvailableSQLServers();
foreach(string serverName in serverList)
{
Console.WriteLine(serverName);
}
}
}
}
That's it... now, as others might mention, this isn't 100% accurate, because
some servers in your network may be "hidden," and the service also has to be
started to be detected this way.
"David C via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:52A41F2E6B25A@.webservertalk.com...
>I am using C#.NET and I am writing an application where I need to display
>to
> the user in a comboBox all the SQL Server instances that can be detected
> and
> dis. I have seen many applications like Enterprise Manager that can detect
> them all. Once the user selects the instance, I would also like to get a
> list
> of all the databases stored into another combo.
> How do I do this in C#?
> Thanks for the help in advance.
> David
>
> --
> Message posted via http://www.webservertalk.com|||Aaron,
If I could give you 1000 points for giving the perfect answer I would.
This was an outstanding piece of code that worked perfectly. We have an SQL
expert here and he did not think of this. So props to you.
Thanks,
David
Aaron Bertrand [SQL Server MVP] wrote:
>Here's a very quick way to do it in C#
>Create a new console application, and add this reference:
>Project | Add Reference | COM | Microsoft SQLDMO Object Library
>using System;
>using System.Collections.Generic;
>using System.Text;
>namespace ConsoleApplication1
>{
> class Program
> {
> static void Main(string[] args)
> {
> SQLDMO.Application sqlDmoApplication = new SQLDMO.Application()
;
> SQLDMO.NameList serverList;
> serverList = sqlDmoApplication.ListAvailableSQLServers();
> foreach(string serverName in serverList)
> {
> Console.WriteLine(serverName);
> }
> }
> }
>}
>That's it... now, as others might mention, this isn't 100% accurate, becaus
e
>some servers in your network may be "hidden," and the service also has to b
e
>started to be detected this way.
>
>[quoted text clipped - 10 lines]
Message posted via http://www.webservertalk.com|||The best way to do it is using SQLBrowseConnect function from ODBC (no
SQLDMO dependency). Check the sample here:
http://www.codeproject.com/cs/database/LocatingSql.asp
Note: SQLBrowseConnect does not work if LAN is not available (cable
unplugged, etc.) while local instances are still accessible :-))
cheers,
</wqw>|||I too am looking for this same type of information. I read through the
response's and none gave me any information I could use. I've already tried
the one David said returned the information he needed. Here's what I am
looking for.
I've got SQL Server 2005 Express installed twice with 2 instances. The
first is the default SQLExpress and the second I named. We'll say
TestExpress. I know if I go into the registry under SQL Server it list both
of these instance names and I can probably retrieve this information from
there. But is there anyway to retrieve it via SQLDMO or any of the .NET SQL
references.
This code Aaron listed and David said it worked for him
SQLDMO.Application sqlDmoApplication = new SQLDMO.Application();
SQLDMO.NameList serverList;
serverList = sqlDmoApplication.ListAvailableSQLServers();
foreach(string serverName in serverList)
{
Console.WriteLine(serverName);
}
This only retrieved 2 items
{local}
the other was my computer name
Any help would be appreciated.
Joe
"David C via webservertalk.com" <forum@.webservertalk.com> wrote in message
news:52A41F2E6B25A@.webservertalk.com...
>I am using C#.NET and I am writing an application where I need to display
>to
> the user in a comboBox all the SQL Server instances that can be detected
> and
> dis. I have seen many applications like Enterprise Manager that can detect
> them all. Once the user selects the instance, I would also like to get a
> list
> of all the databases stored into another combo.
> How do I do this in C#?
> Thanks for the help in advance.
> David
>
> --
> Message posted via http://www.webservertalk.com

Sunday, February 26, 2012

Getting JDBC metadata for synonyms

Using the Latest JDBC Driver from SQLExpress I'm attempting to get use the getTable() method to get information about database objects that the user can access/alter. Works fine for for tables and views, but can't seem to get any information returned for synonyms.

Is it possible to get information for synonyms, e.g. column definitions? or am I'm missing some setting in the connection.

Any Help would be appreciated!

Dave.

This a known issue and is being tracked by the SQL Server team. Can you describe the scenario for which you are usign synonyms? Are you able to owrk-around by using the table or view name?

|||Thanks for your reply,

The particular scenario we have is that we are developing a tool to create a Web Application from the database object definitions. We therefore, have no control over how the user has constructed his database and whether synonyms are used. We could get the data from the synonyms system table, but that would go against the design approach we have used. I will say that, unlike in Oracle, there seems to be no good reason to use synonyms in SQL Server at all, except possibly to enable the user to access different tables/views without changing code, which in my opinion, is a somewhat dubious practise anyway.

Dave

Getting JDBC metadata for synonyms

Using the Latest JDBC Driver from SQLExpress I'm attempting to get use the getTable() method to get information about database objects that the user can access/alter. Works fine for for tables and views, but can't seem to get any information returned for synonyms.

Is it possible to get information for synonyms, e.g. column definitions? or am I'm missing some setting in the connection.

Any Help would be appreciated!

Dave.

This a known issue and is being tracked by the SQL Server team. Can you describe the scenario for which you are usign synonyms? Are you able to owrk-around by using the table or view name?

|||Thanks for your reply,

The particular scenario we have is that we are developing a tool to create a Web Application from the database object definitions. We therefore, have no control over how the user has constructed his database and whether synonyms are used. We could get the data from the synonyms system table, but that would go against the design approach we have used. I will say that, unlike in Oracle, there seems to be no good reason to use synonyms in SQL Server at all, except possibly to enable the user to access different tables/views without changing code, which in my opinion, is a somewhat dubious practise anyway.

Dave