Sybase NNTP forums - End Of Life (EOL)

The NNTP forums from Sybase - forums.sybase.com - are now closed.

All new questions should be directed to the appropriate forum at the SAP Community Network (SCN).

Individual products have links to the respective forums on SCN, or you can go to SCN and search for your product in the search box (upper right corner) to find your specific developer center.

auditing bcpout

3 posts in General Discussion Last posting was on 2009-09-24 13:29:52.0Z
sybdb Posted on 2009-09-22 12:47:03.0Z
Sender: 43fa.4ab8c152.1804289383@sybase.com
From: sybdb
Newsgroups: sybase.public.ase.general
Subject: auditing bcpout
X-Mailer: WebNews to Mail Gateway v1.1t
Message-ID: <4ab8c747.459e.1681692777@sybase.com>
NNTP-Posting-Host: 10.22.241.41
X-Original-NNTP-Posting-Host: 10.22.241.41
Date: 22 Sep 2009 05:47:03 -0700
X-Trace: forums-1-dub 1253623623 10.22.241.41 (22 Sep 2009 05:47:03 -0700)
X-Original-Trace: 22 Sep 2009 05:47:03 -0700, 10.22.241.41
Lines: 5
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28340
Article PK: 77586

is it possible to audit bcpout ? if yes what is the event id
for it ?

thanks
-kunj


Jeff Tallman [Sybase] Posted on 2009-09-22 13:21:59.0Z
From: "Jeff Tallman [Sybase]" <jeff.tallman@sybase.com>
User-Agent: Thunderbird 2.0.0.23 (Windows/20090812)
MIME-Version: 1.0
Newsgroups: sybase.public.ase.general
Subject: Re: auditing bcpout
References: <4ab8c747.459e.1681692777@sybase.com>
In-Reply-To: <4ab8c747.459e.1681692777@sybase.com>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
NNTP-Posting-Host: vip152.sybase.com
X-Original-NNTP-Posting-Host: vip152.sybase.com
Message-ID: <4ab8cf77$1@forums-1-dub>
Date: 22 Sep 2009 06:21:59 -0700
X-Trace: forums-1-dub 1253625719 10.22.241.152 (22 Sep 2009 06:21:59 -0700)
X-Original-Trace: 22 Sep 2009 06:21:59 -0700, vip152.sybase.com
Lines: 16
Path: forums-1-dub!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28341
Article PK: 77584

I suspect it is just a normal "select" - bcpout is nothing
special.....bcpin is a bit different. You could turn on cmdtext
auditing or object auditing for a table, do a bcpout as a test user and
then check the audit trail to see what is in there.

Jeff Tallman
Enterprise Data Management Products Technical Evangelism
jeff.tallman@sybase.com
http://blogs.sybase.com/database

sybdb wrote:
> is it possible to audit bcpout ? if yes what is the event id
> for it ?
>
> thanks
> -kunj


Ana Posted on 2009-09-24 13:29:52.0Z
From: Ana <sinhora1@gmail.com>
Newsgroups: sybase.public.ase.general
Subject: Re: auditing bcpout
Date: Thu, 24 Sep 2009 06:29:52 -0700 (PDT)
Organization: http://groups.google.com
Lines: 79
Message-ID: <879781cc-5199-4712-b616-b62f6338fb2f@33g2000vbe.googlegroups.com>
References: <4ab8c747.459e.1681692777@sybase.com> <4ab8cf77$1@forums-1-dub>
NNTP-Posting-Host: 216.220.42.228
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable
X-Trace: posting.google.com 1253798992 12877 127.0.0.1 (24 Sep 2009 13:29:52 GMT)
X-Complaints-To: groups-abuse@google.com
NNTP-Posting-Date: Thu, 24 Sep 2009 13:29:52 +0000 (UTC)
Complaints-To: groups-abuse@google.com
Injection-Info: 33g2000vbe.googlegroups.com; posting-host=216.220.42.228; posting-account=aV0D2woAAAByw4C51bJ6lUoD9XRBYq7B
User-Agent: G2/1.0
X-HTTP-Via: 1.1 webcache.yyz.cana.sca.corp:3128 (squid/2.5.STABLE14)
X-HTTP-UserAgent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; SV1; .NET CLR 2.0.50727; .NET CLR 3.0.04506.30; .NET CLR 3.0.04506.648; .NET CLR 3.0.4506.2152; .NET CLR 3.5.30729),gzip(gfe),gzip(gfe)
Path: forums-1-dub!forums-master!newssvr.sybase.com!news-sj-1.sprintlink.net!news-peer1.sprintlink.net!nntp1.phx1.gblx.net!nntp.gblx.net!nntp.gblx.net!border2.nntp.dca.giganews.com!nntp.giganews.com!postnews.google.com!33g2000vbe.googlegroups.com!not-for-mail
Xref: forums-1-dub sybase.public.ase.general:28365
Article PK: 77609

On Sep 22, 9:21 am, "Jeff Tallman [Sybase]" <jeff.tall...@sybase.com>

wrote:
> I suspect it is just a normal "select" - bcpout is nothing
> special.....bcpin is a bit different.  You could turn on cmdtext
> auditing or object auditing for a table, do a bcpout as a test user and
> then check the audit trail to see what is in there.
>
> Jeff Tallman
> Enterprise Data Management Products Technical Evangelism
> jeff.tall...@sybase.comhttp://blogs.sybase.com/database
>
>
>
> sybdb wrote:
> > is it possible to audit bcpout ? if yes what is the event id
> > for it ?
>
> > thanks
> > -kunj- Hide quoted text -
>
> - Show quoted text -

Hello
Yes you can audit a bcp here is how to

The audit_event_name for bcp is "BCP In" (BCP upper case, the "I"
upper case, net "n" lower case)

Here is an example:

bcp repro.dbo.test_5 in "/tmp/test.out" -c -Usa -P -Spanther12564

1> sp_audit "bcp", "all", "repro", "on"
2> go
Audit option has been changed and has taken effect immediately.
(return status = 0)
1> quit

panther% bcp repro.dbo.test_5 in "/tmp/test.out" -c -Usa -P -
Spanther12564

Starting copy...

1 rows copied.
Clock Time (ms.): total = 4 Avg = 4 (250.00 rows per sec.) panther%
isql -Usa -P -Spanther12564
1> use sybsecurity
2> go

1> select * from sysaudits_01 where audit_event_name(event) = "BCP In"
2> go
event eventmod spid eventtime sequence
suid dbid
objid xactid loginname
dbname objname
objowner
extrainfo



------ -------- ------ -------------------------- --------
----------- ------
----------- -------------- ------------------------------
------------------------------ ------------------------------
------------------------------

-----------------------------------------------------------------------
--------------------------------------------------------------------------------
--------------------------------------------------------------------------------
------------------------
4 1 51 Sep 26 2007 2:13PM 1
1 7
2053579323 NULL sa
repro test_5
dbo
sa_role sso_role oper_role sybase_ts_role
mon_role; ; ; ; ; ; ;