"data only" "log only" data and log"

i altered the db to include 1 gb.
however the fragment was created "data and log".

what should have i done to create a 'data only' fragment?
0
melanie
3/21/2007 2:41:03 PM
sybase.ase.administration 7058 articles. 2 followers. Follow

8 Replies
1163 Views

Similar Articles

[PageSpeed] 37

melanie wrote:
> i altered the db to include 1 gb.
> however the fragment was created "data and log".
> 
> what should have i done to create a 'data only' fragment?

I believe I'm correct in saying that if your database has data and log 
on separate devices the alter database command will assume you're adding 
to "data" unless you specify otherwise  by using the "log on" clause.

So the answer to your question is you should have created the database 
with data and log separated.
0
Will
3/21/2007 3:13:21 PM
actually I created the last segment on a device that already
has 'data only' segment and another segment that has 'log
only' for the same db.
so are you saying that this is the reason why the newly
created segment was created with 'data and log'??

thanks
> melanie wrote:
> > i altered the db to include 1 gb.
> > however the fragment was created "data and log".
> >
> > what should have i done to create a 'data only'
> fragment?
>
> I believe I'm correct in saying that if your database has
> data and log  on separate devices the alter database
> command will assume you're adding  to "data" unless you
> specify otherwise  by using the "log on" clause.
>
> So the answer to your question is you should have created
> the database  with data and log separated.
0
melanie
3/21/2007 3:40:40 PM
melanie wrote:
> actually I created the last segment on a device that already
> has 'data only' segment and another segment that has 'log
> only' for the same db.
> so are you saying that this is the reason why the newly
> created segment was created with 'data and log'??
> 

Please post the output from sp_helpdb <dbname> so the current allocation 
can be explicitly observed.
0
Will
3/21/2007 3:48:24 PM
1> sp_helpdb dbname
2> go
 name                     db_size       owner               
    dbid   created
        status
 ------------------------ -------------
------------------------ ------ ------------------
       
------------------------------------------------------------------------------------------------------
 dbname           32000.0 MB dba                          
16 Mar 19, 2007
        select into/bulkcopy/pllsort, trunc log on chkpt

(1 row affected)
 device_fragments               size          usage         
      created                   free kbytes
 ------------------------------ -------------
-------------------- -------------------------
----------------
 device1                         16000.0 MB data only       
    Mar 19 2007 12:15PM                 257880
 device1                          6000.0 MB log only        
    Mar 19 2007 12:15PM       not applicable
 device1                          7000.0 MB data only       
    Mar 19 2007 12:15PM                 250844
 device2                          2000.0 MB log only        
    Mar 21 2007 11:14AM       not applicable
 device1                          1000.0 MB data and log    
    Mar 21 2007  3:13PM                1020000



--------------------------------------------------------------
 log only free kbytes = 8159996

(return status = 0)
0
melanie
3/21/2007 5:27:21 PM
melanie wrote:
> 1> sp_helpdb dbname
> 2> go
>  name                     db_size       owner               
>     dbid   created
>         status
>  ------------------------ -------------
> ------------------------ ------ ------------------
>        
> ------------------------------------------------------------------------------------------------------
>  dbname           32000.0 MB dba                          
> 16 Mar 19, 2007
>         select into/bulkcopy/pllsort, trunc log on chkpt
> 
> (1 row affected)
>  device_fragments               size          usage         
>       created                   free kbytes
>  ------------------------------ -------------
> -------------------- -------------------------
> ----------------
>  device1                         16000.0 MB data only       
>     Mar 19 2007 12:15PM                 257880
>  device1                          6000.0 MB log only        
>     Mar 19 2007 12:15PM       not applicable
>  device1                          7000.0 MB data only       
>     Mar 19 2007 12:15PM                 250844
>  device2                          2000.0 MB log only        
>     Mar 21 2007 11:14AM       not applicable
>  device1                          1000.0 MB data and log    
>     Mar 21 2007  3:13PM                1020000
> 
> 
> 
> --------------------------------------------------------------
>  log only free kbytes = 8159996
> 
> (return status = 0)

Ok, I see the issue. When you created the database you put both log and 
data segments on device1. Even though those segments don't show "data 
and log" in the usage column, this is essentially what you've done.

If you can, drop and recreate the database with the log and data 
segments properly separated. if you want the total size of 32 GB to be 
separated into 31GB data 1GB log you'd do something like this:

create database mydb on device1=31000 log on device2 = 1000
0
Will
3/21/2007 5:58:42 PM
thanks
0
melanie
3/21/2007 7:16:22 PM
> If you can, drop and recreate the database with the log and data 
> segments properly separated. if you want the total size of 32 GB to be 
> separated into 31GB data 1GB log you'd do something like this:
> 
> create database mydb on device1=31000 log on device2 = 1000

Mel

Be careful.
If you have an empty Db, this is fine.
If you have objects and data in the Db (and you expect to dump Db; drop 
Db; create Db; load Db), this will NOT work, ie. after the load you 
will still have mixed dat/log/data_and_log.

Have a look at similar posts and responses first.  If that does not 
provide you with a decent understanding of how to fix your problem 
without losing data, post again.
-- 
Cheers
Derek
Senior Sybase DBA / Information Architect
Copyright � 2007 Software Gems Pty Ltd
Blissfully attached to Quality & High Performance, from the land of 
ThingsThatWork
"Patient, normalise thyself"

0
Derek
3/22/2007 1:52:25 AM
Derek Asirvadem wrote:
> 
> Be careful.
> If you have an empty Db, this is fine.
> If you have objects and data in the Db (and you expect to dump Db; drop
> Db; create Db; load Db), this will NOT work, ie. after the load you
> will still have mixed dat/log/data_and_log.

	Actually, this issue is rather trivial. Since the aim is to
	convert a "data & log" fragment to "data only" its only a
	matter of removing the log portion. This procedure has been
	described in the past on more than one occasion. It involves
	tracking the current page of the log pointer (in master..
	sysdatabases.logptr) and ensuring its not on that fragment
	at the time (or generating transactions and truncating the
	log until it moves off the fragment).

	The only sticking point is that the database is using a
	device fragment that isn't unique. sp_dropsegment doesn't
	like this so it won't work (unless things have changed in
	ASE 15 which I suspect isn't the case).

	Dumping and loading the database will do nothing since the
	segment mapping won't change in this case. However, loading
	a dump into a new database with unique fragment names will
	allow sp_dropsegment to work (along with the log pointer
	requirements). Once fixed, this database can be renamed
	(after dropping the old one) or redumped and recreate the
	original database with the right layout and then reloading
	the dump (note, use create database ... for load).

-am	� 2007
0
A
3/22/2007 11:20:19 AM
Reply:

Similar Artilces:

Precedence of "where" ("of", "is", "will")?
Nobody on #perl6 today could answer this one. Is: Str | Int where { $_ } the same as: (Str | Int) where { $_ } or: Str | (Int where { $_ }) ? Followup questions, Mr. President: What kind of operators are "where", "of", "is", and "will"? Is there a reason that S03 doesn't list them? What are their precedence(s)? -- Chip Salzenberg - a.k.a. - <chip@pobox.com> Open Source is not an excuse to write fun code then leave the actual work to others. Chip Salzenberg writes: &...

.ALLCOL("%COLUMN%", " ", ", ", ", ")
Do you know anyway for me to exclude a subset of columns returned by this function. We have two columns (rec_user and rec_datetime) which are in all of our tables, but when generating triggers I want automatically generate a script which does not include those two columns but does include all other columns in that table. Bruce I should add that I am using PD 9.0.0.580. Bruce "Bruce Lamb" <lamb.bruce@mayo.edu> wrote in message news:6HgI315nCHA.155@forums.sybase.com... > Do you know anyway for me to exclude a subset of columns returned by this > function. ...

quotes, quotes, quotes...
I am getting this error and I know what is causing it, but I have no idea how to fix it, any help would be great. The script steps through the /var/log/messages file on a linux server and puts The entries into a mysql database. However when it gets to the 'hlt' line in the messages file it just barfs. The single quotes are freaking it out. I know about quotes but not how to use in this situation. Thanks, Paul Error: May 27 17:53:00 localhost kernel: Checking 'hlt' instruction... OK. <----- doesn't like this in the messages file DBD::mysql::st exec...

"To" and "From" missing
When I print emails, the words "To" and "From" are blank, even though the "To" name and "From name (addresser, addressee) do show up. This is not a problem for other users on my system. Suggestions In mailbox right click, view. On the message window, right click and choose print options. Make sure print header is checked. -- Barry Merchant NSC Volunteer SysOp *** no email unless requested please!! *** > In mailbox right click, view. On the message window, right click and > choose print options. Make sure prin...

double quote
hello there...  i tried everything of think but not working the way i wanted to be... not sure what i'm missing...i'm generating a <span> in code behind and then using in javascript.... here is what i'm doing code behind: int i=0string _keywordID = "keyword";string _name = row["visit_info_nm"].ToString().Trim(); String _getElementByID = String.Format("<span id='{0}' OnClick = \"document.getElementById('{1}').value='{2}';\">{3}</span><br>", i, _keywordID, _name, _name); here is what it generate : <span id='1' OnClick = \"document.getElementById('keyword')...

replace the "." with a ","
Oi.... I need to build a small programm in ASP.NET and chose to use C# for it.Now i got everything working but there's one little problem.the first textbox is a double. I need to make it so that when someone enters a "." then it gets replaced by a ","any ideas?Ghan  string blah = "4.2.2.2";blah = blah.Replace(".", ",");Ryan Ryan OlshanASPInsider | Microsoft MVP, ASP.NEThttp://ryanolshan.comHow to ask a question...

"Using" or "With"
Hi all Please can someone enlighten to me as regards the difference with the "Using" and "With" statement when accessing data - which is better, what are the limitations and/or any pointers. Many thanks. Regards DaveDavid WinchesterPlease mark as answer if this is the solution.  using gives you the ability to use the connection and it closes the connection directlly after you finish using it. and there is no need to try- cach - finaly. there is no limitation on using USING keywordMuhanad YOUNISMCSD.NETMy Blog || My Photos || LinkedIn I have a dataobject the re...

Using "+" or "||"
Using SQLAnywhere 5.5.04, I've gotten into the habit of using "||" in ISQL to indicate a string concatenation. I needed to paste my SQL statement into the PowerBuilder script painter for some embedded SQL, and PB didn't like the "||" very much at all. I changed it to "+" and it seems to be ok. Do these two operators indicate ~exactly~ the same thing? moin, afaik these two's are not the same! if you're using "||" and any term is NULL then in the resultstring the term will be ignored if you use "+" then the resu...

Replacing "\\" with "\"
Hi all I'm getting this value from a CheckBoxList control - a location of file, i have to remove "\\" and replace it with "\" and pass it to Query, how to do it, i tried with Replace, but coud'nt suceed. "\\\\Blaze10xp\\BLZ_SFS_07\\Sample Excel Files\\Excel Files\\report2.xls" thank's in advance - Prakash.C you tried Replace like this? string newstring = oldstring.Replace(@"\\",@"\");Plese, do not forget to click "Mark as Answer" on the post that helped you. Thanx!My blog: Scenes From A Developer Memory yes i tr...

"Me" is better than "You"
Yes I know, strings are frozen. But let me talk about it, I really can't get through the idea of a PC talkin to me. I consider my PC as an extension of myself, not a dumb companion who addresses Me as You. Yes there are times when I get angry with Him while I work and get wrong calculations etc.., but it really is my fault, Me using wrong istructions and eventually wanting to find someone else to blame, but it's Me. And yes, I consider Thunderbird my mail program, reading my mail on my PC as Me. So I personally like to have Me in the header bar as a compact address ...

"-" not "_"
I wrote a SQL statement in the data tab. I wrote a bunch of alaises as example ' word-type ' but when I hit the layout tab it converts the "-" to "_". So now my field name is ' word_type '. Is there any way to prevent this? CardGunner Don' use a hypen ( - ).  It isn't a valid character for column names.   See http://searchsqlserver.techtarget.com/expert/KnowledgebaseAnswer/0,289625,sid87_gci1188931,00.html   Here's an excerpt about column names: Letters as defined in the Unicode Standard 2.0 Decimal numbers from either B...

Regular Expression to remove "/", "\", "<", ">" and "="
Can anyone please show me the regular expression to reject a string ("<blue", "right>" etc.) which has the following expression in it: "/", "\", "<", ">" and "="  hi, It may Help u.. it is in Class file u may use this expressin in validation controls also. Regex objReg = new Regex(@"^[^,.?/\~|`;:'<>]*$", RegexOptions.Singleline); Regex objReg = new Regex(@"^[^,][^.][^?][^/][^\][^~|][^`][^;][^:][^'][[^<][^>]$", RegexOptions.IgnoreCase);Thanks &...

"JROC" / "JROK" / "JROCK" / "JROQ"
I just started a new contract and the tech lead told me that he wanted me to become familiar with something called "JROC" (among some other tools). I've been searching the web and I haven't found any dev tool called "JROC." Based on the name of the tool, it sounds like it encapsulates some javascript functionality. I have tried searching for different spellings - "JROK" / "JROCK" / "JROQ" but I haven't found any matches. Have you ever heard of a dev tool by this name?...

"SSL" "Mail" and "Code"
Does anybody know of any discussions taking place within Mozilla regarding these 3 bits in the certificate manager? Perhaps I've missed something in the discussions here. In any case, I think a new mechanism for indicating trust w/in the Mozilla apps are needed. Take for example the "StartCom Certification Authority" root. The Certificate Manager (I'm using Firefox on Windows) says it can identify web sites, email users, and code yet the cert itself says it can only be used for signing other certs (essentially, that is). At a minimum this is confusing but I have...

Web resources about - "data only" "log only" data and log" - sybase.ase.administration

Resources last updated: 1/21/2016 7:17:42 PM