How To Make Database / Log Size Smaller

Apr 16, 2002

Hi all,

I found a database file and a log file over 2G on mssql 2000 server. Actually, they only need around 200M. I try to backup, truncate the database in order make the size smaller. But the size cannot be smaller. How can I do it?

Simon

View 3 Replies


ADVERTISEMENT

How Do I Make A Backup Device File Smaller ?

Apr 9, 2008

HiI have a backup device file ... ".bck" whick has grown pretty large.Is there any way I can reduce its size ?ThanksDavid Greenberg

View 4 Replies View Related

Restore To A Smaller Size

Aug 28, 2000

I have a database in 2 GB .mdf and a 1 GB ldf. The backup is much
smaller. I need to copy this database to another server which does
not have that much free space. Can this be restored to a smaller
.mdf and .ldf? How?

Thanks.

Ranjit

View 1 Replies View Related

Size Of Database Ndoesn't Make Sense

Sep 21, 2007



I have a weird problem.

We are importing a very small subset of a big desktop database into a CE database on a mobile device for an occasionally connected application. The idea is that the mobile device can use this CE database as a fall back database in case we are not connected.

The database is a very simple list of barcodes.

Basically a single field as primary key

EAN13 bigint

When we import 200K rows (yes we have quite a lot of them). The database is 7MB!!!! A bit big I would say since 8 bytes times 200.000 is only 1.5 MB. Where does the extra space come from?

Yes I did compact the database after the import

View 1 Replies View Related

Mdf File Become Smaller And Smaller After Shrinking Db

Jul 20, 2005

Hi all:I restored one backup database (7.9 GB mdf) on two diffrent servers. Ishrunk them by clicking "Move pages to beginning of file beforeshrinking".After shrinking, one mdf file is 6.7 GB, and the other is 4.2GB. Ishunk again and again:1. the 6.7GB become 5.9GB, 5.2GB, 4.7GB and 4.2Gb (four times)2. the 4.2Gb become 4.0GB (just one more time)It is wired, I am wondering the mdf will be smaller and smaller if Icontinue to shrink them? What is the reason?ThanksWJ

View 1 Replies View Related

How To Backup A Database Into A Number Of Smaller Files ?

Jul 23, 2005

To all,How to backup a database into a number of smaller files ?For example, can I can fully backup a DB of 10 MB into 10 files (each 1MB)???The problem I've met is that the DB backup file is too large, over 4GB, and even Winzip can't compress it (after compressing, around 80 %of compression rate is possible)Thanks![color=blue]>From Jason (Kusanagihk)[/color]

View 11 Replies View Related

What Size To Make The Binary Field?

Jul 12, 2006

Hi,
I have asked this question on 3 forums now and never get an answer, I don't know what is so hard about this question but I will try it here.
I am using SHA512 in C# to convert a password and its salt to hashed. I need to store the password hash and the salt hash in the database in two fields. I was told to use binary field to store the hash data and that the output of SHA512 would ALWAYS be the same no matter how long the password is.
I modified this hash example to use only SHA512 and to work with byte array instead of plain text.
All I need to know now is what size I need to make my binary field to hold this password that is hashed.
http://www.obviex.com/samples/Code.aspx?Source=HashCS&Title=Hashing%20Data&Lang=C%23
Say I have a password which is 30 characters max, and a salt which is 16 characters max. The password and the hash are stored in seperate fields in the same table. They are both hashed using SHA512 and are both being stored as byte arrays in C#, what size to I need to make the binary data type in order to hold the password, and to hold the salt.
Thanks!

View 4 Replies View Related

How To Make The Image Control To A Fixed Size

Oct 31, 2007



I am calling my report logo image via http: url
the moment the image is loaded to image control, it is changing its height and width.

how can i make it fixed and the image to be resized appropriately to fit the image control.

Thank you very much, for the help.

View 1 Replies View Related

Can I Make The Size Of The Field Greater Than 1023 Characters?

Dec 17, 2001

is there any way i can make a field in a table accomodate more than 1023 charcters? i used the 'varchar' datatype and used a length of 2500, but still, I can't fill up a field with more than 1023 characters. Is there any way to change it?
Also, is there any way to used a symbol or special character in a field? Can SQL server identify such a character? like the alpha or beta symbol...

Thank you...

View 1 Replies View Related

Reporting Services :: SSRS - How To Make Report Page Size Dynamic

May 22, 2015

How to make SSRS report page size dynamic, or in a way where viewer can set it to the size they want? 

Set to 0

View 2 Replies View Related

Table Size And Database Size

Mar 2, 2008

Hi,
i use this script that show me the size of each table and do the sum of all the table size.

SELECT
X.[name],
REPLACE(CONVERT(varchar, CONVERT(money, X.[rows]), 1), '.00', '') AS [rows],
REPLACE(CONVERT(varchar, CONVERT(money, X.[reserved]), 1), '.00', '') AS [reserved],
REPLACE(CONVERT(varchar, CONVERT(money, X.[data]), 1), '.00', '') AS [data],
REPLACE(CONVERT(varchar, CONVERT(money, X.[index_size]), 1), '.00', '') AS [index_size],
REPLACE(CONVERT(varchar, CONVERT(money, X.[unused]), 1), '.00', '') AS [unused]
FROM
(SELECT
CAST(object_name(id) AS varchar(50)) AS [name],
SUM(CASE WHEN indid < 2 THEN CONVERT(bigint, [rows]) END) AS [rows],
SUM(CONVERT(bigint, reserved)) * 8 AS reserved,
SUM(CONVERT(bigint, dpages)) * 8 AS data,
SUM(CONVERT(bigint, used) - CONVERT(bigint, dpages)) * 8 AS index_size,
SUM(CONVERT(bigint, reserved) - CONVERT(bigint, used)) * 8 AS unused
FROM sysindexes WITH (NOLOCK)
WHERE sysindexes.indid IN (0, 1, 255)
AND sysindexes.id > 100
AND object_name(sysindexes.id) <> 'dtproperties'
GROUP BY sysindexes.id WITH ROLLUP) AS X
ORDER BY X.[name]

the problem is that the sum of all tables is not the same size when i make a full database backup.
example of this is when i run this query against my database i see a sum of 111,899 KB that they are 111MB,but when
i do full backup to that database the size of this full backup is 1.5GB,why is that and where this size come from?

THX

View 5 Replies View Related

DB Design :: Buffer Database - Insert Information From Partners Then Make Update To Main Database

Oct 29, 2015

I actually work in an organisation and we have to find a solution about the data consistancy in the database. our partners use to send details to the organisation and inserted directly in the database, so we want to create a new database as a buffer database to insert informations from the partners then make an update to the main database. is there a better solution instead of that?

View 6 Replies View Related

SQL 2005 Resize Initial Log Size: MODIFY FILE Failed. Specified Size Is Less Than Current Size.

Sep 4, 2007


I am trying to resize a database initial log file from 500M to 2M. I€™m using€?

ALTER DATABASE <DBNAME> MODIFY FILE ( NAME = <DBLOGFILENAME, SIZE = 2 ) "



And I'm getting "MODIFY FILE failed. Specified size is less than current size." I tried going into the database properties and setting the log file to 2M, but it doesn€™t keep the changes.



Any help with this process?

View 1 Replies View Related

Restoring Smaller DB Into Larger DB

Mar 27, 2000

I have a situation where I need to migrate data from an older platform to a newer one. The data from the old system(s) will be available on DAT tapes. All database construction on the new system will be identical to the old one in size and schema, except for one table (call it "ARCHIVE").

If the ARCHIVE table on the old system is 210MB, and the ARCHIVE table on the new system has the same attributes but has been expanded to 380MB in size, can I simply restore the dump for the old table into the new ARCHIVE?

Empirically it works (I have done it with apparent success two times) but I seem to recall that backups are done by pages, and I'm concerned that there may be conditions not being met by simply doing the restore the way I'm planning to do it.

Also, are there any tests or checks built into SQL which I can use to check table integrity on the target ARCHIVE table after the restore?

Any help is greatly appreciated.
Best rgds,
Kevin

View 4 Replies View Related

Using Muliple Smaller SPs And Functions Better Than Using 1 Big SP?

Dec 9, 2005

Is it generally or almost always better to have multiplesmall SPs and functions to return a result set instead ofusing a single big 1000+ lines SP?I have one SP for example that is 1000+ lines and earlyanalysis of the SP I see it first has 3 big blocks of codeseparated by IF statements. Then within each IF blockof code I see 3-4 UNIONs. UNIONs that meansthey are all returning the same columns so I amguessing these are prime candidates for becomingindividual functions or SPs, maybe even dynamic SPs.Obviously I am not showing you the code but am Iright to think this way? This same SP has about 15 JOINsincluding some LEFT JOINs and one LEFT JOIN to a (SELECTstatement) and almost all the tables referenced by theseJOINs have thousands of records, very possibly hundreds ofthousands.The SELECT statement is returning 30-40 columns froma lot of the these tables plus I also see a lot of CASE ELSEstatements within the main SELECT statement. The code ofeach CASE statement is calling a function. As an exampleif the CASE is for EmployeeID then a function is being calledto get the EmployeeID's FirstName and LastName. If the CASEis for CustomerID then another function is being called to getthe Customer Name.I am thinking to cut this big SP to many smaller SPs and/or functionsand I also plan on using table variable(s) to hold temporary resultwhile I continue processing the records from the table variablewith other code logic.Also I want to leave as the last thing to do is to convert the"machine result", i.e. EmployeeID or CustomerID to "humanreadable result", i.e. Employee FirstName and LastName,Customer Name.I am trying to test this on the Northwind's Employees table,but the Statistics IO, Time and the Execution Plan aresomething I've only started to use. I am unable to makeconclusion which method is better. I'll work on posting anotherpost specifically with details to this test that I am currently doing.My opinion is that by having 1 single SP with 15+ join causea lot more locking than if I would run smaller SPs and store theresult into temp table variables and continue processing theremaining code logic.I would like to know what you think and if I am right or wrongon how I want to optimize this SP?Thank you

View 5 Replies View Related

SQL Restore Into A Smaller File

Sep 4, 2007

Hello there....

I have a scenario where I am trying to set up multiple database instances for multiple test/development environment(s) for each group where the test/dev environment will contain a copy of what was in the production environment.. The test/dev environment can be refreshed on demand based on the prior night's full backup of the production environment.. This is good for our web developers and for training purposes, as the test environment(s) can be played around with, and will retain data for as long as the developers/testers/trainers need it, and then can be refreshed to the most current data when everyone in the group decides they want it refreshed...

Normally, this works out well...

However I am having a file size issue...

The production database was pre-allocated (a long time ago) to a large file size (probably to reduce external fragmentation).... So even though the backup file is only 5GB, the production database file itself is something like 40GB... I believe the production database has a maintainance plan on it already that rebuilds the indicies each weekend, etc...

Anyhow, the problem is that when I restore the 5GB database back into a newly created database file, the file expands all the way up to 40GB again, even though the backup file is 5GB...

Normally this would be fine, the problem is that I am trying to create multiple environments, and I do not have the disk space on my test/dev server for 40GB (plus another 15GB or so for the transaction log) multiplied by each of my test/dev environments... It would be much nicer if I could get this down to 5GB (or heck, even 10GB), since I know for sure that the total amount of data in the database doesnt exceed 5GB, and I have plenty of space on my disk for 5 (or 10) GB multiplied by each of the environments I want to create...

I have tried DBCC SHRINKDB and I have tried DBCC SHRINKFILE with the truncate after the restore, which seems to work but doesn't....

I have also tried to go into the database properties and change the "initial size" but that doesnt do anything etiher

Is there any way to get this file back down to a manageable size after the restore??

Or better yet, is there a special method to restore the database so it wont 'expand' back out to 40GB in the first place??? Perhaps some option to tell the restore process that even though the source database had a 40GB pre-allocation, that the database I am restoring into doesn't need to be pre-allocated??

View 1 Replies View Related

Making A Report Smaller...?

Jul 19, 2007

Alright. I'm stuck. I admit it!



I have a bunch of names, and each name can have one or more 'roles'(operator, reader, key operator, etc. Just random words really.) attached to it.



Using reporting services, I've managed to get the information I need with relative ease... the only problem is, with 900 some records to display, it's current length of 41 pages with just one column going down the left side of each page is not exactly preferred by my superior (can't say I blame him really. Looks kind of odd!)



It looks like this right now:



Name1

Function

Function

Function

Name2

Function

Function

Name3

Function

Function



etc all the way down to page 41



I need it to look something like this:



Name 1 Name 4 Name 7

Function Function Function

Name 2 Name 5 Function

Function Function Name 8

Function Function Function

Name 3 Name 6 Function

Function Function Function



etc. Or some variation of...



I've fiddled around, and merely adding one extra column to the initial table-layout with the same =(!UserName etc) just merely replicates the data in the second column... not giving me the new stuff.



I'm quite new to reporting services, but none of the tutorials I've seen/done seem to accomodate for this... Heeelp!

View 3 Replies View Related

Splitting Selects Into Smaller Parts

Oct 24, 2005

I'm having problems with handling a very large amount of user records - about 100.000 - 150.000 records. Instead of selecting all of them at a time, how do I f.ex. select 1000 of them? (f.ex. get nr. 1 - nr 1000, then get nr. 1001 - nr. 2000)  ???

View 1 Replies View Related

What Is The Best Way To Restore Production Db In Dev With A Smaller Log File?

Aug 20, 2004

I have a Database A in production with 12GB as data file and 8 GB as log file. How do I restore this db in Development with a smaller log file, say 1GB?
I can't shrink the log file or anything in production. What is the best way to restore in Dev with a smaller log file?

Thanks.

View 4 Replies View Related

Best Way To Make A Database Not In Use?

Apr 9, 2006

Hi.

I am almost wrapping up a project of my own and I will have the option to restore the database, so dropping the existing one and then running the SQL script to create the database, tables, stored procedures and so on.



My question is, (using .NET 2.0 C#) - what is the best way to resolve the "cannot drop database as it is currently in use" message, or some message of the similar sort?

Even though I specified "USE MASTER" in the commandText string, there will be somewhere, in a situation, where the database will still be in use.

How can I forcefully make it NOT in use, drop it and do other things I like to?

What is the best way?



Many thanks!

View 9 Replies View Related

Full-Text Indexing For Smaller Columns

Nov 1, 2004

Hello,

I'm looking at using full-text indexing for tables to query. I have some smaller fields (varchar(50) that stores names) that I was contemplating using full-text indexing for. I was just curious if it is worth it?

Basically the data that will be there are one-word names, without any spaces or whatnot.

Brian

View 3 Replies View Related

Breaking Up Sql Server Backups Into Smaller Files

Apr 5, 2006

Hey guys,

I'm wondering how most people manage very very large backups. What is the best approach to breaking up the backup files if you're restricted to a drive size (450gig in my case). I unix, you can pipe the backup to gzip and split, I'm not sure how the same thing could be accomplished in windows.

Thanks,
-Kilka

View 2 Replies View Related

SQL 2012 :: Does Not Load Smaller Splash Screen

May 29, 2014

However when I start SQL 2012 it loads the Management Studio but does not load the smaller splash screen that usally appears asking me to connect to a server. When I try to click any of the menu items at the top of the screen the system just hangs.

I also have 2012 Service pack 1 installed too.My installations of 2005 and 2008r2 still work fine.I also tried loading SQL2014 and had the same issues as with 2012.

View 0 Replies View Related

Make A Copy Of Database

Nov 17, 2006

Hi:
 I have installed sql server 2005 express and SQL Server Management Studio Express
How can I generate a database from another copying the structure and data?
 For example I have a database named Customers, I need to make a copy of Customers named Customers2. Customers2 also will be attached to the same Database Engine Server where Customers is attached.
How I Can do it?
Thanks!
P.S.
I tryied to make a copy of mdf an ldf files from Windows Explorer and renamed these files but I could not attach to the same Database Engine Server because I got an error.

View 1 Replies View Related

How To Make Copies Of Your Sql Database?

Jan 31, 2008

Hi,

at work all the databases i use are only accessible via the local network, i am wanting to take a copy of the databases and save them as a database file so i can burn them onto cd and take home with me so i can get some extra work done on the weekend (i'd also like to start doing this so i have backed up copies of the database incase anything happens to it)

i was wondering how i can do this? are there any tutorials on the web that someone can point me to? i have SQL Server 2005 Management Studio Express.

TIA

View 1 Replies View Related

Make A User For The Database

Nov 14, 2003

hi
how can i make a user give it a name ReportUser and a password msdn for a certain database named on the sql server 2000 and thank you for your help and oyur time

View 1 Replies View Related

How To Make Database Unavailable?

Apr 4, 2002

Hi!
Do you now if it is possible to make database unavailable for users after business hours and how.

Thank you in advance,
Elena.

View 6 Replies View Related

How Do I Make SQL Database Tables?

Nov 28, 2005

No, I don't need a step-by-step (necessarily). I've been looking at W3Schools tutorial and it says to:


Code:


CREATE TABLE Person
(
LastName varchar,
FirstName varchar,
Address varchar,
Age int
)



But what is that? A text file saved with a .sql extension. Something typed at a command prompt? Is there an SQL interface?

--William

View 5 Replies View Related

Looking To Make A Database Of Fingerprints

Jun 8, 2007

I work as a computer repair tech for my company and have been offered the opportunity to do a project. I'm looking to make a database of about 2000 peoples fingerprints (2 copies of each finger). We have Microsoft SQL Server but I have no Idea where to start. The vision is, to have an RFID scanner and have everyone swipe their badge then scan their prints and it automatically associates their prints with the badge number. Is there an easier or more simple way to do this or do you have any pointers on where to start? any help will be greatly appreciated. Thanks.:angel:

View 6 Replies View Related

How To Make Database For Reference

Jun 9, 2014

I am making a project where I have to add city, agentname, rankofagent, referenceagent name the problem is that who can I make a table where suppose I add member a,b,c,d,e,f,g,h,i,j,k,l,m,n,o,p like that

b is joined by a
c is joined by b
d by c, e by d and so on,

What I want here is that how can I get the result suppose i want to see that chain of p. I want result to be printed as a,b,c,d,e,f,g,h,i,j,k,l,m,n,o either result should be in horizontal form or vertical. with or without comma. I am doing this in SQL....

View 2 Replies View Related

How To Make Backup Of Database To URL

Aug 3, 2015

There is a need to make a backup of a database to URL. how to do this.

View 2 Replies View Related

Make Changes To A Production Database!

Jul 23, 2005

Hello faculties,We've a production database that is being used by one of our clientsas a backend for his website. The database size is around 1GB.Recently we added some tables to our local database which is areplica of the production database. Now we need to apply the samechanges at the production one aslo.I've no clue about what steps should i implement.Please guide me!Thanks in advanceDebian*** Sent via Developersdex http://www.developersdex.com ***

View 3 Replies View Related

Make Copy Of Database

Jan 8, 2008

Hi

I need to make a copy of a sql server database for test purposes but the database is live
how would i make a copy of it without it being affected?

thanks

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved