Finding Out Physical Size Of Table On Disc

Jan 26, 2012

If I have a table of 1,000,000 rows how I do find out what size this table is on disk?

And how do I find out the size of all tables on disc?

View 2 Replies


ADVERTISEMENT

Finding The Size Of A Table?

Oct 12, 2007

Hi All,

Do any of you know how I can find the size of a table in SQL server?

Cheers

Dave

View 3 Replies View Related

Finding Table , Database Size

Sep 29, 2005

Hii all,

I want to find the database , table size in MS SQL Server.

Is there is any query /procedures to find out the database and table size.

Thanks in advance .,

Regards.,

Sri

View 5 Replies View Related

DB Size Not The Actual Physical Size

Feb 15, 2000

Hi,

An MSSQL DB running SAP indicates a smaller DB size (MMC & SAP) than the actual physical size. The difference is about 8 GB.

A lot of records were deleted before this. Did they remain in the DB as NULL values or something ?

Does anyone know what the reason for this could be ? And how to clean this up ?

Thanks in advance,
Paul

View 2 Replies View Related

Estimating The Size Of A DB From A Physical Design

Jan 5, 1999

Can someone recommend an application that produces an estimate of the size of a database from column definitions and
estimated number of rows in each table? -- Thanks

View 1 Replies View Related

Actual Physical File Size

Jun 21, 2004

Hi Everybody,
I like to compute the actual physical database file size using queries.

From the EM database properties, the file size shown is not matching with the master..sysaltfiles.size

Ex. Actual file size is 12MB and 1MB for MDF & LDF respectively.
'sysaltfiles' shows 1464 & 96 resp. Since they are shoing it as 8K Pages,
96*8 = 768KB is not matching with 1024KB for the LDF file.
Is there any overheads (additional space from the physical file for file headers) allocated?

Thanks
Babu

View 3 Replies View Related

Temp Table & Disc Space

Dec 4, 2007

I have a stored proc that processes large amounts of data. I have used temp tables in this stored proc. After I drop these temp tables, it doesn't release the disc space and my hard drive runs out of space before the process ends. When I stop the sql service and restarts it, it releases the disc space. How can I force the release of disc space inside of my stored procedure?

View 6 Replies View Related

Finding Row Size

Oct 7, 2004

Hi,
Anyone got any ideas how to calculate the occupied row size of a table?

View 1 Replies View Related

Help Finding Current Size Of A Field

Jan 19, 2006

How do I find the current size of each field in a table's column?

I have a table with a field for notes/memos. I need to see which ones are about to reach the size limit and what the current size is.

Does this make sense?

Thank you,
Karen

View 2 Replies View Related

Finding Database Size In SQL Express

May 9, 2006

Our system guy wants me to find out just exactly how much room is being taken up by the SQL Express databases (I am using two). I am not sure how to do this. Is there any way to find the size, or, lacking that, how many records overall? We will probably need to move up to SQL 2005 soon, but he needs to figure out the memory requirements, etc.

Thanks,

Michael

View 3 Replies View Related

SQL Server 2008 :: Finding Backup File Size In Advance?

Mar 8, 2015

My backups are failing sometimes.My db size is around 400 GB and we are taking backup to the remote server. Free size available on the disk is showing 600 GB but my database full backup run more than 10 hrs and failed. The failure reason is there is not enough space on the disk.

What could be the possible failure reasons? It has more than the the database size on the backup server but why it is showed that msg on the job failures. I noticed same thing occurred couple of times in the past.

Is there any way to find how much the backup file will be generate before we run the backup job?

i.e. If we run the full backup of test1 database now, it will generate ....bak file for that test1 db

currently we are using maintenance plan and with compression (2008R2) and the database has TDE enabled

View 3 Replies View Related

INSERT New Record Works OK In Local Table, BUT Not If The Target SS DB/table Is In A Different Physical Server

Apr 23, 2008



Hi... I was hoping if someone could share me some thoughts with the issue that I am having at the moment.

Problem: When I run the package in my local machine and update local SS DB/table - new records writes OK in the table. BUT when I changed my destination meaning write record into another physical SS DB/table there is no INSERT data occurs. AND SO when I move/copy over that same package into another server (e.g. server that do not write record earlier) and run it locally IT WORKS fine too.

What I am trying to do is very simple - Add new records in a SS table using SSIS . I only care for new rows and not even changed rows.
Here is my logic -
1. Create Ole DB source to RemoteSERVER - using SELECT stmt
2. I have LoopUp component that will look for NEW records - Directs all rows that don't find match and redirect rows (error output).
3. Since I don't care for any rows that is matched in my lookup - I do nothing or I trash the rows
4. I send the error rows (NEW rows) into OleDB destination

RESULTS when I run the package locally and destination table is also local - WORKS FINE;
But when I run the package locally and destination table is in another Sserver (remote) - now rows is written.

The package is run thru BIDS manually so there is no sucurity restrictions attached to it.

I am not sure what I am missing. And I do not see error in my package either. It is not failing.

Thanks in advance!



View 6 Replies View Related

SQL Server Admin 2014 :: Possible To Find Table Size And In That Table Each Row Size

Jun 10, 2014

It is possible to find table size and in that table each row size.

View 4 Replies View Related

Repeat A Table Column On Every New Physical Page

Mar 22, 2007

Hello,

I wonder how and if this can be achieved:

In a tabular report I have one or more columns that need to be repeated on every new physical page when printed.

Viewing the report in the ReportViewer control allows such columns to be fixed using the "FixedHeader" switch, allowing the user to conveniently scroll the reports content while always having the fixed columns in sight. This is perfect. However, when switching to the Print Layout view or when printing the report, I would like to have these fixed columns be printed on every new page that is generated at the beginning of the table printed.

E.g. I have a report that has a huge number of columns that need to be shown. When printed, the columns need at least 6 pages' width. I would be very convenient if I could repeat e.g. the first column (containing some identificational information) on every of these 6 pages. It wouldn't hurt if e.g. 7 pages would be generated because of the repeated column(s).

Any help is appreciated, thanks a lot!



Frank

View 7 Replies View Related

SQL Server 2014 :: View To Physical Table Options?

Jun 18, 2014

I have a view which select some few columns from multiple tables with where clause and have 5 unions of different category of data.

For the best performance i need to change this to physical table or any other options which can increase my performance.

View 2 Replies View Related

SQL Server 2012 :: Compare A Table With Physical Path

Mar 31, 2015

I have a table with two columns

id | filepath
--------------------------------------------------
1| D:Doc filesThe BestHHT.JPG
2| D:Doc filesThe Bestsealed_pack.txt
3| D:Doc filesThe Bestlsbom.JPG
4| D:Doc filesThe Bestmoc.png
5| D:Doc filesThe Beststock.txt
6| D:Doc filesThe Bestdepot.JPG

And in a physical system there are more files than the table.

D:Doc filesThe BestHHT.JPG
D:Doc filesThe Bestsealed_pack.txt
D:Doc filesThe BestJKSlsbom.JPG
D:Doc filesThe Bestmoc.png
D:Doc filesThe Beststock.txt
D:Doc filesThe BestGDNdepot.JPG

D:Doc filesThe BestCASA.JPG
D:Doc filesThe BestSO.txt
D:Doc filesThe BestBA.JPG

I want to compare the filepath column in table with physical drive files and get the details of files which in table and not in physical and viceversa...

View 3 Replies View Related

T-SQL (SS2K8) :: Outputting Sproc Result Set To A New Physical Table

Aug 3, 2015

I need to output a sproc into a new physical table, so the column definitions match the output.

Select Into DbName.NewTableName
Followed by an
Insert Into DbName.NewTableName
From (SprocNameHere),

View 9 Replies View Related

Is Disc 2 Necessary??

Dec 4, 2006

Hello all,

I only have disc 1 of 2. Do I need Disc 2? What is in Disc 2?

Thanks

View 1 Replies View Related

Compare Data-type Xml In A Temp/variable/physical Table In MSSQL 2000

May 22, 2008

Does abyone know how to compare data-type xml in a temp/variable/physical table in MSSQL 2000?

I tried this works in MSSQL 2005,



Code Snippet
create Table #t1 ([c1] int identity(1,1) not null, [c2] text)
create Table #t2 ([c1] int identity(1,1) not null, [c2] text)
Insert into #t1
Values('This is a test')
Insert into #t2
Values('This is a test')
Select * from #t1
Select * from #t2
Select * from #t1 where [c2] LIKE (Select [c2] from #t2)
drop table #t1
drop table #t2


but not MSSQL 2000.

Server: Msg 279, Level 16, State 3, Line 12
The text, ntext, and image data types are invalid in this subquery or aggregate expression.


Is this true (from BOL)?




Code SnippetIn comparing these column values, if any of the columns to be compared are of type text, ntext, or image, FOR XML assumes that values are different (although they may be the same because Microsoft® SQL Server„¢ 2000 does not support comparing large objects); and elements are added to the result for each row selected.

View 1 Replies View Related

Insuring Disc Out Of Space

Jan 11, 2000

Hi friends,
Can you show me the way How can I insure the backup server and production server not running out of space?
How can i find server uptime?
How can i create disc space alerts(ie. disc space fills certain %)
please help me...
Thanks,

Uddin

View 5 Replies View Related

Free Disc Space

Dec 21, 2006

Hi All,

I was wondering if anybody has the script to view the free disc space. Currently I am using xp_fixeddrives stored procedure, but it is undocumented and might not be supported in SQL Server 2005.

Thanks.

View 4 Replies View Related

Disc Dependency Between Instances

Jul 14, 2014

I have two nodes in my windows cluster, and i have 5 SQL instances running there. Now i want to make sure that all instances are running on just one node. That is, if one instance fails and wants to start on the other node, all other instances must also failover. My idea was to use disc dependenies to achieve this, but i can just set a dependency on discs that belong to the same instance...

View 4 Replies View Related

Save Data To Disc

Feb 3, 2007

Please help me?

I use sql express + C#, and when i execute my queries like "insert" into table, my data exist in dataset while i compile my project.
How i can save my data to my data source, and how i can see my data in my table in data source?

Please help me, how i can save my data from dataset into disc file mdf.

View 4 Replies View Related

Recover After A Raid-5 Disc Fault

Jun 17, 2006

Hi,

My raid-5 server failed because one disc, some folders and files are lost, but I have recoverd whit some software for the propuse.

I have reinstaled the SQL server and attached the database, but when I try to open the tables I recieve a error message saying : internal consisty error... somethihg like this.

How can a restore the databases?

View 3 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

Finding Rows In One Table But Not In Another Table Based On 2 Fields

Apr 23, 2008



I have 2 tables with 2 fields in common between them. How do I get a count of rows in table 1 but not in table 2 matching those 2 fields? Thanks.

View 7 Replies View Related

Server Up Time And Disc Space Alerts??

Jan 13, 2000

Hi,
How can i find the server uptime and
How can i get the alert when disc space fill around 80%.
Please help me!!!

dindu

View 1 Replies View Related

SQL Server Developer Edition - Missing Disc?

Mar 27, 2008


I just got my copy of Visual Studio 2008 Pro today, which includes SQL Server 2005 developer edition.

While installing SQL Server 2005 the menu says Disc 1 of 2, and it also displays a message saying this install will require both disc's. However I've only got 1 SQL Server disc (DVD).

The install completes fine, so I guess that its got all it needs but I'm just paranoid that theres a disc missing.
Should there be another disc? or is the installer just telling lies about needing another disc..

Thanks,
Martyn

View 4 Replies View Related

Sql 2005 Vista Ultimate Disc 2 Trouble Workstation Components

Apr 29, 2008

I am having trouble installing disc number 2 on sql standard 2005( I installed disc one) I get the message my workstation components are already installed etc.It will not allow me to go any further It seem like everything installed Here is my summary.... I unistalled vs 2 express 2005---I never used it......
Here is my list on my vista ultimate computer sql server business intelligence, sql server management studio, analysis services installed configuration tools documentation pefmorance tools Did I need to install disc 2 instead of disc 1?
one I am using vista Please help ? I tried opening business intelligence studio it says it has compability issues
Here is my log:
Microsoft SQL Server 2005 9.00.1399.06
==============================
OS Version : Professional (Build 6000)
Time : Tue Apr 29 14:13:59 2008

Machine : BILLPREC690
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLSupport_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_OWC11_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BackwardsCompat_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLSupport_2.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Native Client
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLNCLI_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_OWC11_2.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BackwardsCompat_2.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLSupport_3.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Native Client
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLNCLI_2.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_OWC11_3.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BackwardsCompat_3.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLSupport_4.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_OWC11_4.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BackwardsCompat_4.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLSupport_5.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Native Client
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLNCLI_3.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_OWC11_5.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server VSS Writer
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SqlWriter_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BackwardsCompat_5.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Setup Support Files (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLSupport_6.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server Native Client
Product Version : 9.00.3042.00
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLNCLI_4.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Visual Studio 2005 Premier Partner Edition - ENU
Product Version : 8.0.50727.42
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_PPESku_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft Office 2003 Web Components
Product Version : 11.0.6558.0
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_OWC11_6.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Books Online (English)
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BOL_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Backward compatibility
Product Version : 8.05.1054
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_BackwardsCompat_6.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Integration Services
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_DTS.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : SQLXML4
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLXML4_1.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQL.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : SQLXML4
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_SQLXML4_2.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Analysis Services
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_AS.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Notification Services
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_NS.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Reporting Services
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_RS.log
--------------------------------------------------------------------------------
Machine : BILLPREC690
Product : Microsoft SQL Server 2005 Tools
Product Version : 9.00.1399.06
Install : Successful
Log File : C:Program FilesMicrosoft SQL Server90Setup BootstrapLOGFilesSQLSetup0004_BILLPREC690_Tools.log
--------------------------------------------------------------------------------

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

Finding The Table Name.

Dec 15, 2006

I have a script that creates these spin off tables (used for lightning fast access) on a near daily basis. But it is possible the table does not exist for that day - in which the script need to check one day back - so on and so forth until finding the most recently created table.

The script I have written fails with overflow error.
I was hoping someone could tell me the correct syntax to accomplish this and also why i recieve this overflow error...


Code:


Dim str_SQL_Asset_1
daysBack = 1
tblFound = FALSE
Dim xbl_Holdings_date
Dim xMonth
Dim xDay
xbl_Holdings_date = date()
If Len(Month(xbl_Holdings_date))=1 Then
xMonth = "0" & Month(xbl_Holdings_date)
Else
xMonth = Month(xbl_Holdings_date)
End If
If Len(Day(xbl_Holdings_date))=1 Then
xDay = "0" & Day(xbl_Holdings_date)
Else
xDay = Day(xbl_Holdings_date)
End If

DO WHILE tblFound = FALSE
xbl_Holdings_Name = "xbl_Holdings_" & Year(xbl_Holdings_date) & "_" & xMonth & "_" & xDay
SQL_tblCheck_STR = "SELECT * FROM INFORMATION_SCHEMA.TABLES " & _
"WHERE table_name = '" & xbl_Holdings_Name & "' "

Set MM_checkCmd = Server.CreateObject("ADODB.Recordset")
MM_checkCmd.ActiveConnection = conn_str_ClientDB
MM_checkCmd.Source = SQL_tblCheck_STR
MM_checkCmd.CursorType = 0
MM_checkCmd.CursorLocation = 2
MM_checkCmd.LockType = 3
MM_checkCmd.Open()


IF MM_checkCmd.EOF Then
xbl_Holdings_date = (xbl_Holdings_date - daysBack)
daysBack = daysBack + 1
tblFound = FALSE
ELSE
tblFound = TRUE
MM_checkCmd.CLOSE()
SET MM_checkCmd = Nothing
END IF
loop



The goal of this snippet is simply to identify and set the value for the existing table name.
An example table name would be "xbl_Holdings_2006_12_10".

I could have posted this question in the VB forum but I would like to push as much of the work onto SQL as possible and also - this sort of operation is more likely to be required of a dba imo.

View 1 Replies View Related

Finding Table Names

Jun 29, 2006

Is there a way i can create a query that gives me a list of all the table names in the database?

View 2 Replies View Related

Finding The Primary Key Of A Table.

Dec 3, 2007

I'm trying to find the primary key on a given table in SQL Server 2000 using SQL.  I'm querying the sysobjects table to find a given table, and then querying the sysindexes table.  I've ALMOST found what I'm looking for.   I see the indexes and columns etc. on the tables in the database, I just don't see the field that indicates that the index is the primary key.
Can anyone help?
Thanks, Alex

View 6 Replies View Related







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