dbcc commands

I have run dbcc checkalloc on the database.  We have a rather large
database, so the results fly buy quickly and I can't read them all.
Does anyone know of a way to redirect these results to a file for later
review?

Sean

0
Sean
10/15/1997 1:53:49 PM
sybase.sqlserver.unix 1493 articles. 0 followers. Follow

5 Replies
1028 Views

Similar Articles

[PageSpeed] 36

Sean,

    You can run the dbcc through a command line ISQL statement redirecting
the output to a file.  For example:

1.    Create a file     dbcc.in
        which has the following two lines in it:
                    dbcc checkalloc(databasename)
                    go

2.    Execute ISQL from the UNIX command prompt

                isql -Uusername -i dbcc.in  -o dbcc.out

        ISQL will prompt you for your password, execute the dbcc.in
commands and send the output to the dbcc.out file for later review.

You may later want to enhance the procedure by setting the database to
single-user mode to eliminate spurious errors caused by transactions in
progress.

Brian Guy
Sybase Professional Services


Sean Nemwan wrote:

> I have run dbcc checkalloc on the database.  We have a rather large
> database, so the results fly buy quickly and I can't read them all.
> Does anyone know of a way to redirect these results to a file for later
> review?
>
> Sean



0
Brian
10/15/1997 6:23:43 PM
Sean Nemwan wrote:
> 
> I have run dbcc checkalloc on the database.  We have a rather large
> database, so the results fly buy quickly and I can't read them all.
> Does anyone know of a way to redirect these results to a file for later
> review?
> 
> Sean

Do yourself a BIG favour and get 'sqsh', an alternative to isql that
let's you (amongst other great stuff) re-direct your commands to
any co-ordinate in space; your love life will never be the same. Sqsh
can be found at http://www.voicenet.com/~gray/sqsh.html.
0
Phil
11/1/1997 3:23:14 AM
isql -Usa -P -o checkalloc.out << EOF
dbcc checkalloc(mydatabase)
go
EOF

-- 
Bret Halford			Imagine my disappointment
Sybase Technical Support	in learning the true nature		
3665 Discovery Drive		of rec.humor.oracle...
Boulder, CO 80303
0
Bret
3/13/1998 8:30:07 PM
I believe the trace flag 3605 will redirect output to the SQL server
errorlog.

Sean Nemwan wrote:

> I have run dbcc checkalloc on the database.  We have a rather large
> database, so the results fly buy quickly and I can't read them all.
> Does anyone know of a way to redirect these results to a file for later
> review?
>
> Sean



0
William
3/13/1998 9:47:27 PM
there's actually a thousand different ways to do this. i personally hate
typing "isql -Usa -Ppassword -Sservername" a hundred times a day so one
of my favorites is create a shell script (i called mine .isql) which
contains the following two lines (don't forget to chmod u+x it!)

    #!/bin/ksh
    $SYBASE/bin/isql -Usa -Psapassword -Sservername $1 $2 $3 $4

then run your sql using something like
    cat<<EOF|.isql -ooutfile
    dbcc checkalloc(mydatabase)
    go
    EOF

Bret Halford wrote:

> isql -Usa -P -o checkalloc.out << EOF
> dbcc checkalloc(mydatabase)
> go
> EOF
>
> --
> Bret Halford                    Imagine my disappointment
> Sybase Technical Support        in learning the true nature
> 3665 Discovery Drive            of rec.humor.oracle...
> Boulder, CO 80303

0
Nick
3/18/1999 5:41:34 PM
Reply:

Similar Artilces:

What privileges are needed for a login to run DBCC commands (i.e. dbcc checkalloc, dbcc checkdb, dbcc checkcatalog, etc.)
What privileges are needed for a login to run DBCC commands (i.e. dbcc checkalloc, dbcc checkdb, dbcc checkcatalog, etc.) Curretnly, we have CRON jobs which runs both dbcc commands and update stats daily. The problem is, the dba before me used the default "sa" account to run these jobs / commands. I'd like to stop this practice and change this to a login account with less privilages. I was hoping to just create a regular login and add it to all the databases as a user. So with this in mind... Are there any special privilages or roles needed to run the below com...

unix commands
Hello, I want to write a perl script that invokes unix command. Some of the command can take a long time to process, I have many commands I want to invoke. Lets say the first command can take one minute to process, how can I make sure the second command will not start until the irst one is complete, thank you ken --- lerameur <lerameur@yahoo.com> wrote: > Hello, > > I want to write a perl script that invokes unix command. Some of the > command can take a long time to process, I have many commands I want > to invoke. Lets say the first command...

Unix commands
Hi Everybody, Anyone who knows about how to execute unix commands within pb source on windows os,will make me happy Regards Unal There are a couple of things you can try: 1) If you use NFS, you can map a drive to a UNIX box and execute the command using that drive mapping. 2) If you have a DBMS running on UNIX, you may be able to create a stored proc in the DBMS that executes shell commands (I don't know which DBMS's offer this off-hand, but it should be fairly easy to check with a DBA). You can then simply execute that stored proc. What exactly are you t...

RE: Cygwin: Port of unix commands or unix-like environment
> -----Original Message----- > From: Joel [mailto:Trag16@hotmail.com]=20 > Sent: Saturday, 6 March 2004 1:29 PM > To: perl > Subject: Re: hi!! I've changed your subject to be more appropriate to the question asked. >=20 > This is off topic, but is cygwin just the ports of GNU=20 > software for windows, > or is it an actual command line interface that simulates linux? Since cygwin contains a port of perl which many of us use, its probably not that far off topic :-) The short answer is - somewhere in between. All the individual ported comman...

How to call a Unix O/S level command from DBISQL running on Unix
Hi , How to call a Unix OS level command or any shell script from DBISQL. for example, We can call O/S level commands in Sybase ASE in isql using "!!" symbol before the command or by using XP server. Is there any possible solution executing O/S level command in dbisql in Sybase IQ. John wrote: > Hi , > > How to call a Unix OS level command or any shell script from > DBISQL. for example, We can call O/S level commands in > Sybase ASE in isql using "!!" symbol before the command or > by using XP server. Is there any possible solution exec...

dbcc log Commands
I downloaded document 557 "Finding the Oldest Open Transaction" and built a Unix script that will issue the appropriate commands, including the "dbcc log" commands. It works well but shortly after using the new script the 11.0.2 server running on DEC Unix started to have log problems that seem to have prevented log dumping and related "truncation". The log dumps for our producton database "move" were just huge and geting bigger. I eventually truncated with no-log and dumped the "move" database. This is what I received both before an...

UNDOCUMENTED DBCC COMMANDS
Hello to all Where can I find out all the undocumented DBCC commands in Sybase ? Well, they are probably undocumented for a reason. Are you looking for something specific, or do you just want to wreak havoc on your system by using commands without understanding them? Mark Kusma <SYB_GURU> wrote in message news:4630b108.6ff.1681692777@sybase.com... > Hello to all > > Where can I find out all the undocumented DBCC commands in > Sybase ? I just want to understand and probably play with it in my test server > Well, they are probably undocumented ...

dbcc log command
I need to find out if rows were deleted today from a given table. I thought dbcc log would display the info from syslogs for a given db and object, but I can't get it to work. Can someone help? Debbie Herold wrote: > > I need to find out if rows were deleted today from a given table. I > thought dbcc log would display the info from syslogs for a given db and > object, but I can't get it to work. Can someone help? It should work. There's a listing of dbcc commands and their parameters via the Sybase FAQ at http://www.isug.com/Sybase_FAQ/ Are you ce...

how to execute Unix commands
i have to execute Unix command like cp,mv ...etc Does somebody know, how i can run Unix commands cheers qusxo6@msn.com Use rexec or rsh. rexec requires that you enter a password, rsh doesn't require it. But rsh requires careful setup on the Unix side (specifically the .rhosts file(s)) . Here's a piece of code I copied from one of our applications. ls_run = ...... ls_run = "rsh " + sle_host.text + " -l " + sle_userid.text + ls_run ls_run = ls_run + ";lp -d" + ls_printer + " " + ls_temp2 run(ls_run) -- Terry Dykstra...

Timing Dbcc commands
Is there a command that I can run with dbcc checkdb, or other dbcc's ,to find out how long the command took to run. I need to test it on my backup server before doing it on the main server but I need to know how long each one takes to run. Thanks SELECT GETDATE() GO DBCC CHECKDB ... GO SELECT GETDATE() GO -- Jim Egan [TeamSybase] Houston, TX http://www.eganomics.com Sybase Developers Network http://sdn.sybase.com/sdn/mec/mec_home.stm ...

Looking for a DBCC command
I am looking for a DBCC command that will reseed an identity column. Microsoft SQL Server has one called CHECKIDENT, but it does not seem to work with SYBASE. Any help would be appreciated There is no easy-to-use dbcc command for this in ASE; a command called "dbcc object_atts" exists, but is notoriously difficult to use. For syntax, you could pick up the ASE QuickRef Supplement from http://www.euronet.nl/~syp_rob/ase_qref.html . You may also want to check out the following document for more background on identity-related issues such as resetting the identity value: http...

command dbcc upgrade_object...
I need information about the command dbcc upgrade_object: sintaxis, parameters and what is your function. Thanks. ...

Unix commands for Windows
Some time back, I was playing with a set of Unix style commands for sorting and looking at the HOSTS file. Basically, I was using a package of commands which will run somewhat like DOS command line stuff. It could have been (probably was) a variety of Cygwin but which set? I don't need the full set and Google has just too many hits -) Anybody got a pointer to the "standard command package" (maybe its Cygutils ?). Wish I'd kept a pointer <sigh> Bazza wrote: > Some time back, I was playing with a set of Unix style commands > for sorting and looking a...

What does the DBCC SHRINKFILE command do?
Hi, I was wondering exactly what DBCC SHRINKFILE does. I've run it after backup log truncate only, and it has shrunk the LDF file from 10GB to 900MB fine. I'm just wondering what it got rid of, as I was looking to get rid of old logs, those older than 1 year, etc. So, what does it get rid of? Thanks in advance. Read the Following Articles. this will help you in understanding it. http://msdn.microsoft.com/en-us/library/ms189493.aspx http://msdn.microsoft.com/en-us/library/ms190488.aspxMuhammad ShoaibSoftware Engineer,Lahore, Pakistanwww.heartofpakistan.com (U/C)---------------...

Web resources about - dbcc commands - sybase.sqlserver.unix

Command - Wikipedia, the free encyclopedia
Text is available under the Creative Commons Attribution-ShareAlike License ;additional terms may apply. By using this site, you agree to the ...

Cameron Carpenter review: Bells and whistles matched by a command of the organ
It's certainly no exaggeration to call Cameron Carpenter's command of six keyboards (five for hands, one for feet) "genius". Purely in cognitive ...

Command your club to victory in Sega's Football Manager Mobile 2016
The 2016 edition of Football Manager Mobile (formerly known as Football Manager Handheld) has kicked its way to iOS.

How to craft your own custom voice commands for Amazon Echo's Alexa
With a little help from IFTTT, you can teach Alexa all sorts of new tricks. Here's how to get started.


Bethesda: Fallout 4 console commands 'not supported or recommended' on PC
In a very Bethesda-like fashion, messing around with console commands on the PC version of Fallout 4 might completely bug out your game more ...

Amazon Echo owners can create custom voice commands with IFTT
... item to your shopping list is pretty cool, but there comes a point where you start to feel the limits of the Echo's pre-programmed voice commands. ...

Huckabee: Don't Settle for Minimum Wage, Work to Command a Maximum Wage
In his opening remarks last night, Mike Huckabee said proposals to raise the minimum wage in several states will not bring prosperity and independence ...

Amazon Echo gets customizable voice commands thanks to deeper IFTTT integration
While Amazon’s Echo can tell you about traffic and control your smart-home devices, users haven’t had much ability to develop their own commands ...

Carly Fiorina Calls for 'Consolidated Command' to Protect Against Solar Storms
Carly Fiorina said she would create a "consolidated command" to deal with the threat of major solar storms.

Resources last updated: 11/27/2015 1:28:38 PM