Friday, March 30, 2012
How to autenticate to local SQL Express server
how to audit local access to sql server
I am looking for a way to audit only local access to sql server 2000.
that is, I don't care about networked clients logging in to database, I
want to know everything that a user does who logs in at the local
console access.
is there a way to do this without buying an agent? can c2 auditing be
specific and ignore all remote access and only log the local sql server
2k interactions? I don't want to get swamped in a deluge of *all*
activity being logged, my application logs all client access to my
satisfaction. I want to now make sure no one can access database
locally and leave me with no log of activity...direct and local db
access...
thx,
rpf
You can set up a rolling serverside trace that filters on the hostname of
the local server
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
"RPF" <richard_p_franklin@.yahoo.com> wrote in message
news:1129408525.096989.140790@.f14g2000cwb.googlegr oups.com...
> hello
> I am looking for a way to audit only local access to sql server 2000.
> that is, I don't care about networked clients logging in to database, I
> want to know everything that a user does who logs in at the local
> console access.
> is there a way to do this without buying an agent? can c2 auditing be
> specific and ignore all remote access and only log the local sql server
> 2k interactions? I don't want to get swamped in a deluge of *all*
> activity being logged, my application logs all client access to my
> satisfaction. I want to now make sure no one can access database
> locally and leave me with no log of activity...direct and local db
> access...
> thx,
> rpf
>
|||I'm interested in this also, but can you explain how exactly to do
this? I admin our IIS server, the SQL server was setup by a consultant
that went out of business. I'm not real good with the SQL server and
don't want to break anything.
Also, will this have any impact on the performance of the SQL server?
|||The easiest way to generate the commands for a serverside trace is to use
the Profiler GUI (Start>Run>Profiler.exe). Select File>New>Trace, put in you
server name and then select the events you are interested in and set the
appropriate filters (click on help on the dialog to get details of what the
tabs do). Once you're happy with your selection click on Run and check that
the required events are being captured. If happy then stop the trace and
goto File>Script Trace>For SQL 2000. This will prompt you to save a sql
file. Open this using Query Analyzer and you will have the template for your
trace. In order to set this up on a rolling basis you will need to wrap the
template in a stored procedure in which you generate the filename (usually
based on the date). In order to start it automatically when sql starts you
can use sp_procoption (see BOL for details). I will try and post an
article/code on my site tonight. There can be a performance impact but it
depends on what you trace. As long as you don't trace statement level events
then the performance impact is generally negligible.
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
<brk100@.gmail.com> wrote in message
news:1129473547.688786.109990@.g14g2000cwa.googlegr oups.com...
> I'm interested in this also, but can you explain how exactly to do
> this? I admin our IIS server, the SQL server was setup by a consultant
> that went out of business. I'm not real good with the SQL server and
> don't want to break anything.
> Also, will this have any impact on the performance of the SQL server?
>
how to audit local access to sql server
I am looking for a way to audit only local access to sql server 2000.
that is, I don't care about networked clients logging in to database, I
want to know everything that a user does who logs in at the local
console access.
is there a way to do this without buying an agent? can c2 auditing be
specific and ignore all remote access and only log the local sql server
2k interactions? I don't want to get swamped in a deluge of *all*
activity being logged, my application logs all client access to my
satisfaction. I want to now make sure no one can access database
locally and leave me with no log of activity...direct and local db
access...
thx,
rpfYou can set up a rolling serverside trace that filters on the hostname of
the local server
--
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
"RPF" <richard_p_franklin@.yahoo.com> wrote in message
news:1129408525.096989.140790@.f14g2000cwb.googlegroups.com...
> hello
> I am looking for a way to audit only local access to sql server 2000.
> that is, I don't care about networked clients logging in to database, I
> want to know everything that a user does who logs in at the local
> console access.
> is there a way to do this without buying an agent? can c2 auditing be
> specific and ignore all remote access and only log the local sql server
> 2k interactions? I don't want to get swamped in a deluge of *all*
> activity being logged, my application logs all client access to my
> satisfaction. I want to now make sure no one can access database
> locally and leave me with no log of activity...direct and local db
> access...
> thx,
> rpf
>|||I'm interested in this also, but can you explain how exactly to do
this? I admin our IIS server, the SQL server was setup by a consultant
that went out of business. I'm not real good with the SQL server and
don't want to break anything.
Also, will this have any impact on the performance of the SQL server?|||The easiest way to generate the commands for a serverside trace is to use
the Profiler GUI (Start>Run>Profiler.exe). Select File>New>Trace, put in you
server name and then select the events you are interested in and set the
appropriate filters (click on help on the dialog to get details of what the
tabs do). Once you're happy with your selection click on Run and check that
the required events are being captured. If happy then stop the trace and
goto File>Script Trace>For SQL 2000. This will prompt you to save a sql
file. Open this using Query Analyzer and you will have the template for your
trace. In order to set this up on a rolling basis you will need to wrap the
template in a stored procedure in which you generate the filename (usually
based on the date). In order to start it automatically when sql starts you
can use sp_procoption (see BOL for details). I will try and post an
article/code on my site tonight. There can be a performance impact but it
depends on what you trace. As long as you don't trace statement level events
then the performance impact is generally negligible.
--
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
<brk100@.gmail.com> wrote in message
news:1129473547.688786.109990@.g14g2000cwa.googlegroups.com...
> I'm interested in this also, but can you explain how exactly to do
> this? I admin our IIS server, the SQL server was setup by a consultant
> that went out of business. I'm not real good with the SQL server and
> don't want to break anything.
> Also, will this have any impact on the performance of the SQL server?
>
how to audit local access to sql server
I am looking for a way to audit only local access to sql server 2000.
that is, I don't care about networked clients logging in to database, I
want to know everything that a user does who logs in at the local
console access.
is there a way to do this without buying an agent? can c2 auditing be
specific and ignore all remote access and only log the local sql server
2k interactions? I don't want to get swamped in a deluge of *all*
activity being logged, my application logs all client access to my
satisfaction. I want to now make sure no one can access database
locally and leave me with no log of activity...direct and local db
access...
thx,
rpfYou can set up a rolling serverside trace that filters on the hostname of
the local server
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
"RPF" <richard_p_franklin@.yahoo.com> wrote in message
news:1129408525.096989.140790@.f14g2000cwb.googlegroups.com...
> hello
> I am looking for a way to audit only local access to sql server 2000.
> that is, I don't care about networked clients logging in to database, I
> want to know everything that a user does who logs in at the local
> console access.
> is there a way to do this without buying an agent? can c2 auditing be
> specific and ignore all remote access and only log the local sql server
> 2k interactions? I don't want to get swamped in a deluge of *all*
> activity being logged, my application logs all client access to my
> satisfaction. I want to now make sure no one can access database
> locally and leave me with no log of activity...direct and local db
> access...
> thx,
> rpf
>|||I'm interested in this also, but can you explain how exactly to do
this? I admin our IIS server, the SQL server was setup by a consultant
that went out of business. I'm not real good with the SQL server and
don't want to break anything.
Also, will this have any impact on the performance of the SQL server?|||The easiest way to generate the commands for a serverside trace is to use
the Profiler GUI (Start>Run>Profiler.exe). Select File>New>Trace, put in you
server name and then select the events you are interested in and set the
appropriate filters (click on help on the dialog to get details of what the
tabs do). Once you're happy with your selection click on Run and check that
the required events are being captured. If happy then stop the trace and
goto File>Script Trace>For SQL 2000. This will prompt you to save a sql
file. Open this using Query Analyzer and you will have the template for your
trace. In order to set this up on a rolling basis you will need to wrap the
template in a stored procedure in which you generate the filename (usually
based on the date). In order to start it automatically when sql starts you
can use sp_procoption (see BOL for details). I will try and post an
article/code on my site tonight. There can be a performance impact but it
depends on what you trace. As long as you don't trace statement level events
then the performance impact is generally negligible.
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
<brk100@.gmail.com> wrote in message
news:1129473547.688786.109990@.g14g2000cwa.googlegroups.com...
> I'm interested in this also, but can you explain how exactly to do
> this? I admin our IIS server, the SQL server was setup by a consultant
> that went out of business. I'm not real good with the SQL server and
> don't want to break anything.
> Also, will this have any impact on the performance of the SQL server?
>
Wednesday, March 28, 2012
how to associate sql login with a trusted sql server connection?
Last night I loaded a 2nd instance (development instance) of sql server on
my server machine (win2003). The first instance is the local server - serv1
.
The 2nd instance is serv1\dev. I loaded both instances using Windows
authentication. Note: the first instance was loaded on the default port of
1433. But for the 2nd instance, Setup assigned a default port of 0. I went
with port 0 and windows authentication. When I connect to serv1\dev in Quer
y
Analyzer through Windows authentication I connect OK. But I added a sql
login to serv1\dev. I can't connect to serv1\dev from Query Analyzer using
my sql login. The error message says that the login failed because my login
is not associated with a trusted sql server connection. So how do I
associate my sql login with a trusted sql server connection?
Note: On the original install I also added a sql login, and it works fine
from the server computer and from remote workstations. Why did the serv1
login work but not my new login on serv1\dev?
Thanks,
RichAfter doing a little research, I believe my problem is that I loaded
serv1\dev instance of sql server with Windows Authentication where I should
have selected Sql Authentication. When I register serv1\dev I can only
register it using Windows Authentication. Once the server is registered I g
o
into Edit Registration and select Sql authentication but it won't take
because my sql login is not associated with a trusted connection. Is there
a
way around this? Or do I need to re-install this instance?
"Rich" wrote:
> Hello,
> Last night I loaded a 2nd instance (development instance) of sql server on
> my server machine (win2003). The first instance is the local server - ser
v1.
> The 2nd instance is serv1\dev. I loaded both instances using Windows
> authentication. Note: the first instance was loaded on the default port
of
> 1433. But for the 2nd instance, Setup assigned a default port of 0. I we
nt
> with port 0 and windows authentication. When I connect to serv1\dev in Qu
ery
> Analyzer through Windows authentication I connect OK. But I added a sql
> login to serv1\dev. I can't connect to serv1\dev from Query Analyzer usin
g
> my sql login. The error message says that the login failed because my log
in
> is not associated with a trusted sql server connection. So how do I
> associate my sql login with a trusted sql server connection?
> Note: On the original install I also added a sql login, and it works fine
> from the server computer and from remote workstations. Why did the serv1
> login work but not my new login on serv1\dev?
> Thanks,
> Rich|||OK. I figured out the problem. I had to go into the serv1\dev server
properties and click on the "Sql and Windows Authentication" option. Now I
can connect using my sql login
"Rich" wrote:
> Hello,
> Last night I loaded a 2nd instance (development instance) of sql server on
> my server machine (win2003). The first instance is the local server - ser
v1.
> The 2nd instance is serv1\dev. I loaded both instances using Windows
> authentication. Note: the first instance was loaded on the default port
of
> 1433. But for the 2nd instance, Setup assigned a default port of 0. I we
nt
> with port 0 and windows authentication. When I connect to serv1\dev in Qu
ery
> Analyzer through Windows authentication I connect OK. But I added a sql
> login to serv1\dev. I can't connect to serv1\dev from Query Analyzer usin
g
> my sql login. The error message says that the login failed because my log
in
> is not associated with a trusted sql server connection. So how do I
> associate my sql login with a trusted sql server connection?
> Note: On the original install I also added a sql login, and it works fine
> from the server computer and from remote workstations. Why did the serv1
> login work but not my new login on serv1\dev?
> Thanks,
> Rich
How To Assign OPENQUERY Results from Linked Servers to local variables..
I have a problem about assigning the results of an OPENQUERY. Please check the code below:
DECLARE @.sqlString nvarchar(4000)
DECLARE @.sqlString1 nvarchar(4000)
DECLARE @.custName nvarchar(100)
SET @.custID = 2
SET @.sqlString1 = 'SELECT * FROM myTable WHERE CustID = ' + CAST( @.custID as varchar(6))
SELECT @.sqlString = 'SELECT CustName FROM OPENQUERY(DEEPACCESS,''' + @.sqlString1 + ''')'
EXECUTE(@.sqlString)
--
The above code works fine but i need something like
SELECT @.sqlString = 'SELECT @.custname=CustName FROM OPENQUERY(DEEPACCESS,''' + @.sqlString1 + ''')'
EXECUTE(@.sqlString)
By doing this i want to assign the CustName to the local variable @.custName.
I tried to use a temp table but in that case i was not able to specify a where clause in @.sqlString1. (i'd rather use linked_server.databasename.owner.tablename , but i read that this does not provide good performance )
Any suggestions about the problem are welcomed!
Thanks in advance,
Bahtiyar KARANLIKdeclare @.sqlString nvarchar(1000)
SELECT @.sqlString = 'SELECT @.custname=CustName FROM OPENQUERY(DEEPACCESS,''' + @.sqlString1 + ''')'
EXEC sp_executesql @.sqlString, N'@.custname varchar(20) out', @.custname out
or
SELECT @.sqlString = 'SELECT CustName FROM OPENQUERY(DEEPACCESS,''' + @.sqlString1 + ''')'
create table #a (s varchar(20))
insert #a
exec (@.sqlstring)
select @.custname = s from #a
drop table #a
Using the 4 part name in the query should be just s good. If you are joining with strings then make sure the servers are collation compatible so that the filter is performed on the remote server and check the query plan.
This sort of thing can give bad performance if used as a join to a local table but if you are just selecting using constants for a filter it should be OK.
Wednesday, March 21, 2012
how to allow anonymous login to rep services on local machine ?
I cant seem to allow reporting services on 2003 SBS to accept anonymous
logon (i.e im always prompted for user/pass from windows).
I added EVERYONE and ANONYMOUS LOGON with full control to INETPUB and
C:\program files\Microsoft SQL server dirs and made sure these settings
replaced all child dirs security i.e cascaded down.
Its a stand alone machine for demos so im not worried about security.
Can someone help ?
Thanks
Scottok sorted it using the IIS dir security options.
scott
Sunday, February 19, 2012
how to access sql server express from other computer on the netwrok
Hi experts
I use a sqlserver on a local computer. i want to access the sqlserver from other computers on the network using the VWD. When trying to connect to the database i get the error:
"An error has occured while establishing a connection to the server. When connecting to SQL Server 2005, this failure may be caused by the fact that under the default settings SQL server does not allow remote connections. (provider: Named Pipes Provider, error: 40 - Could not open a connection to SQL Server)"
I enabled the TCP/IP and the Named Pipes protocols on the server and still the same error.
Thanks
check windows firewall enbale or not..
if yes, then let sql 2005 port pass through
|||I just found the sollution.
1. when accessing from other computers, the servers 'Guest' account is used, so this accoun should have the correct permissions (not recommended) or access using another privileged acount
2. enable remote connection in the "SQL Serve surface area Configuration" tool
Thanks for the attention anyway