Showing posts with label system. Show all posts
Showing posts with label system. Show all posts

Thursday, March 29, 2012

Database startup time

Is it possible to find somewhere in the system table time of sql server startup?

Thanks

Hi, as the tempdb is created at very startup of the SQL Server service you can check the information on

sp_helpdb tempdb

HTH, Jens Suessmeyer,

http://www.sqlserver2005.de

sql

Sunday, March 25, 2012

Database size increasing

Hi all,
When are performing data upload into our system the size of the database
increases very high . Only after we defrag does the database size decreases.
We have tried setting the autoshrink option as true but it still does not
work. Is there any alternative.
Probably due to page splits. Read about fillfactor and also consider what indexes you have,
especially the clustered index. Also, use DBCC SHOWCONTIG to analyzer page fullness (sign of page
splits).
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Srini" <Srini@.discussions.microsoft.com> wrote in message
news:0593003C-3144-456A-AF16-BC9A93F71FAD@.microsoft.com...
> Hi all,
> When are performing data upload into our system the size of the database
> increases very high . Only after we defrag does the database size decreases.
> We have tried setting the autoshrink option as true but it still does not
> work. Is there any alternative.
|||Hi srini
Try using
DBCC SHRINKDATABASE:
http://msdn.microsoft.com/library/de..._dbcc_217n.asp
DBCC SHRINKFILE :
http://msdn.microsoft.com/library/de..._dbcc_217n.asp
It is not a good practice to defrag when the SQL Server is running.
does this answer your question? or do u require any more information
best Regards,
Chandra
"Srini" wrote:

> Hi all,
> When are performing data upload into our system the size of the database
> increases very high . Only after we defrag does the database size decreases.
> We have tried setting the autoshrink option as true but it still does not
> work. Is there any alternative.

Database size increasing

Hi all,
When are performing data upload into our system the size of the database
increases very high . Only after we defrag does the database size decreases.
We have tried setting the autoshrink option as true but it still does not
work. Is there any alternative.Probably due to page splits. Read about fillfactor and also consider what indexes you have,
especially the clustered index. Also, use DBCC SHOWCONTIG to analyzer page fullness (sign of page
splits).
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Srini" <Srini@.discussions.microsoft.com> wrote in message
news:0593003C-3144-456A-AF16-BC9A93F71FAD@.microsoft.com...
> Hi all,
> When are performing data upload into our system the size of the database
> increases very high . Only after we defrag does the database size decreases.
> We have tried setting the autoshrink option as true but it still does not
> work. Is there any alternative.|||Hi srini
Try using
DBCC SHRINKDATABASE:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_217n.asp
DBCC SHRINKFILE :
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/tsqlref/ts_dbcc_217n.asp
It is not a good practice to defrag when the SQL Server is running.
does this answer your question? or do u require any more information
best Regards,
Chandra
---
"Srini" wrote:
> Hi all,
> When are performing data upload into our system the size of the database
> increases very high . Only after we defrag does the database size decreases.
> We have tried setting the autoshrink option as true but it still does not
> work. Is there any alternative.

database size increased twice

We had to move exsiting database on new server and ran querey copying all re
cords into new table on new server.
System said that new table was created successfully and all records were cop
ied.
We decided to backup this new database, but it failed. Investigating of back
up problem led us to the point where we realised that our actuall database b
ecome 2 times larger - 150GB insted of 75 (original size).
Kind of lost where this additional chunk came from.
Will be thankful for any suggestions,
Alan.Alan,
Did you create new database with the same data device and log device as the
original one?
Did you try to shrink the data files using DBCC?
larry
"ALan" <anonymous@.discussions.microsoft.com> wrote in message
news:49C0FD90-FFFA-4CE5-B8F8-0A43E1E8B22D@.microsoft.com...
quote:

> We had to move exsiting database on new server and ran querey copying all

records into new table on new server.
quote:

> System said that new table was created successfully and all records were

copied.
quote:

> We decided to backup this new database, but it failed. Investigating of

backup problem led us to the point where we realised that our actuall
database become 2 times larger - 150GB insted of 75 (original size).
quote:

> Kind of lost where this additional chunk came from.
> Will be thankful for any suggestions,
> Alan.

Database size entry?

Which system table is the currently defined size (hopefully the total size)
of the data and log devices found?
I'm assuming in master somewhere? sysobjects? I just can't find it...
thanksDave,
Check out:
sysfiles
HTH
Jerry
"Dave H" <DaveH@.noemail.nospam> wrote in message
news:JpydnanWHeJCj6HeRVn-ug@.comcast.com...
> Which system table is the currently defined size (hopefully the total
> size)
> of the data and log devices found?
> I'm assuming in master somewhere? sysobjects? I just can't find it...
> thanks
>|||That's what I'm doing now.. is that how 'properties' figures the size?
lol: I totally looked past size there, and was just getting the file
names...
Thanks...
"Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
news:ODlqHFRxFHA.1256@.TK2MSFTNGP09.phx.gbl...
> Dave,
> Check out:
> sysfiles
> HTH
> Jerry
> "Dave H" <DaveH@.noemail.nospam> wrote in message
> news:JpydnanWHeJCj6HeRVn-ug@.comcast.com...
>|||Hi,
Its been taken from sysfiles table. You could just run a prfiler and get the
query. See the query I get for Master database property.
SELECT o.fileid, o.name, o.filename, o.groupid, o.size, o.maxsize, o.growth,
o.status FROM dbo.sysfiles o WHERE o.groupid = (SELECT u.groupid FROM
dbo.sysfilegroups u WHERE u.groupname = N'PRIMARY') and (o.status & 0x40) =
0
go
SELECT fileid, name, filename, size, growth, status, maxsize FROM
dbo.sysfiles WHERE (status & 0x40) <> 0
Thanks
Hari
SQL Server MVP
"Dave H" <DaveH@.noemail.nospam> wrote in message
news:ec-dnRXjTNF0iKHeRVn-rw@.comcast.com...
> That's what I'm doing now.. is that how 'properties' figures the size?
> lol: I totally looked past size there, and was just getting the file
> names...
> Thanks...
>
> "Jerry Spivey" <jspivey@.vestas-awt.com> wrote in message
> news:ODlqHFRxFHA.1256@.TK2MSFTNGP09.phx.gbl...
>

database size comparisons

hI
I have to database with more than 500 tables. Is there any way to find
number of rows in each tables from system tables. I want this result to
compare another database in different server.
Going table by table is practically time consuming process.
Can any one help me
Thanks
Kalyan
Try this:
select object_name(id) as TableName, rows
from sysindexes
where indid in (0, 1)
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
"Kalyan" <Kalyan@.discussions.microsoft.com> wrote in message
news:01CB0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...
> hI
> I have to database with more than 500 tables. Is there any way to find
> number of rows in each tables from system tables. I want this result to
> compare another database in different server.
> Going table by table is practically time consuming process.
> Can any one help me
> Thanks
> Kalyan
|||To add to Adam's response, the row column in sysindexes can be used as an
estimated row count but won't necessarily be accurate. You can use DBCC
UPDATEUSAGE beforehand to get a more accurate row count. The only way to
get a reliable accurate count is with SELECT COUNT(*).
Hope this helps.
Dan Guzman
SQL Server MVP
"Kalyan" <Kalyan@.discussions.microsoft.com> wrote in message
news:01CB0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...
> hI
> I have to database with more than 500 tables. Is there any way to find
> number of rows in each tables from system tables. I want this result to
> compare another database in different server.
> Going table by table is practically time consuming process.
> Can any one help me
> Thanks
> Kalyan
|||Try this:
exec sp_msforeachtable "sp_spaceused '?' "
Tunji O
"Kalyan" <Kalyan@.discussions.microsoft.com> wrote in message news:01CB0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...
hI
I have to database with more than 500 tables. Is there any way to find
number of rows in each tables from system tables. I want this result to
compare another database in different server.
Going table by table is practically time consuming process.
Can any one help me
Thanks
Kalyan
sql

database size comparisons

hI
I have to database with more than 500 tables. Is there any way to find
number of rows in each tables from system tables. I want this result to
compare another database in different server.
Going table by table is practically time consuming process.
Can any one help me
Thanks
KalyanTry this:
select object_name(id) as TableName, rows
from sysindexes
where indid in (0, 1)
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Kalyan" <Kalyan@.discussions.microsoft.com> wrote in message
news:01CB0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...
> hI
> I have to database with more than 500 tables. Is there any way to find
> number of rows in each tables from system tables. I want this result to
> compare another database in different server.
> Going table by table is practically time consuming process.
> Can any one help me
> Thanks
> Kalyan|||To add to Adam's response, the row column in sysindexes can be used as an
estimated row count but won't necessarily be accurate. You can use DBCC
UPDATEUSAGE beforehand to get a more accurate row count. The only way to
get a reliable accurate count is with SELECT COUNT(*).
--
Hope this helps.
Dan Guzman
SQL Server MVP
"Kalyan" <Kalyan@.discussions.microsoft.com> wrote in message
news:01CB0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...
> hI
> I have to database with more than 500 tables. Is there any way to find
> number of rows in each tables from system tables. I want this result to
> compare another database in different server.
> Going table by table is practically time consuming process.
> Can any one help me
> Thanks
> Kalyan|||This is a multi-part message in MIME format.
--=_NextPart_000_0096_01C4DCAE.8E68F580
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
Try this:
exec sp_msforeachtable "sp_spaceused '?' "
Tunji O
"Kalyan" <Kalyan@.discussions.microsoft.com> wrote in message =news:01CB0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...
hI
I have to database with more than 500 tables. Is there any way to find =
number of rows in each tables from system tables. I want this result =to compare another database in different server.
Going table by table is practically time consuming process.
Can any one help me
Thanks
Kalyan
--=_NextPart_000_0096_01C4DCAE.8E68F580
Content-Type: text/html;
charset="Utf-8"
Content-Transfer-Encoding: quoted-printable
=EF=BB=BF<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&

Try this:
exec sp_msforeachtable "sp_spaceused ='?' "
Tunji O
"Kalyan" wrote in message news:01C=B0D73-2553-4531-B7B5-ACAD5C186466@.microsoft.com...hII have to database with more than 500 tables. Is there any way to find number of rows in each tables from system tables. I want this =result to compare another database in different server.Going table =by table is practically time consuming process.Can any one help meThanksKalyan

--=_NextPart_000_0096_01C4DCAE.8E68F580--

Database Size Blowout - I mean like HUGE!

Has anybody come across a problem where their database
file becomes enormous for no particular reason?
I have checked all user and system tables, and they are
correct. It seems that in 3 days the database has blown
out from 400MB to 18500MB.
Any ideas/suggestions would be greatly appreciated.
Thank youIs it the database or log? run:
dbcc sqlperf('logspace')
and see if it is your log file, if it is, back it up and shrink the file or
see if you have any open transactions "dbcc opentran"
HTH
Ray Higdon MCSE, MCDBA, CCNA
--
"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in message
news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
> Has anybody come across a problem where their database
> file becomes enormous for no particular reason?
> I have checked all user and system tables, and they are
> correct. It seems that in 3 days the database has blown
> out from 400MB to 18500MB.
> Any ideas/suggestions would be greatly appreciated.
> Thank you|||somebody might have pumped in huge data and db might be in full recovery
mode .. check log size, truncate log ,shrink db u shall gain yur db size
again.
i agree with ray
run dbcc sqlperf('logspace')
u'll know abt the log size and do the above mentioned steps.
backup file will be huge, if u have enough space back it up first to be on a
safer side.
Regards,
Mayur
"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in message
news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
> Has anybody come across a problem where their database
> file becomes enormous for no particular reason?
> I have checked all user and system tables, and they are
> correct. It seems that in 3 days the database has blown
> out from 400MB to 18500MB.
> Any ideas/suggestions would be greatly appreciated.
> Thank you|||I've already checked that. The log is currently using
50MB, whilst the PRIMARY database file is using 18329MB.
I've checked all the tables, and the row counts are what
they should be, back when the db was about 400MB.
Bizarre

>--Original Message--
>Is it the database or log? run:
>dbcc sqlperf('logspace')
>and see if it is your log file, if it is, back it up and
shrink the file or
>see if you have any open transactions "dbcc opentran"
>HTH
>--
>Ray Higdon MCSE, MCDBA, CCNA
>--
>"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in
message
>news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
blown
>
>.
>|||Indexes?
http://vyaskn.tripod.com/code/sp_show_huge_tables.txt
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in message
news:f0be01c3f0f4$c4533620$a501280a@.phx.gbl...
> I've already checked that. The log is currently using
> 50MB, whilst the PRIMARY database file is using 18329MB.
> I've checked all the tables, and the row counts are what
> they should be, back when the db was about 400MB.
> Bizarre
>
> shrink the file or
> message
> blown

Database Size Blowout - I mean like HUGE!

Has anybody come across a problem where their database
file becomes enormous for no particular reason?
I have checked all user and system tables, and they are
correct. It seems that in 3 days the database has blown
out from 400MB to 18500MB.
Any ideas/suggestions would be greatly appreciated.
Thank youIs it the database or log? run:
dbcc sqlperf('logspace')
and see if it is your log file, if it is, back it up and shrink the file or
see if you have any open transactions "dbcc opentran"
HTH
--
Ray Higdon MCSE, MCDBA, CCNA
--
"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in message
news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
> Has anybody come across a problem where their database
> file becomes enormous for no particular reason?
> I have checked all user and system tables, and they are
> correct. It seems that in 3 days the database has blown
> out from 400MB to 18500MB.
> Any ideas/suggestions would be greatly appreciated.
> Thank you|||somebody might have pumped in huge data and db might be in full recovery
mode .. check log size, truncate log ,shrink db u shall gain yur db size
again.
i agree with ray
run dbcc sqlperf('logspace')
u'll know abt the log size and do the above mentioned steps.
backup file will be huge, if u have enough space back it up first to be on a
safer side.
Regards,
Mayur
"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in message
news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
> Has anybody come across a problem where their database
> file becomes enormous for no particular reason?
> I have checked all user and system tables, and they are
> correct. It seems that in 3 days the database has blown
> out from 400MB to 18500MB.
> Any ideas/suggestions would be greatly appreciated.
> Thank you|||I've already checked that. The log is currently using
50MB, whilst the PRIMARY database file is using 18329MB.
I've checked all the tables, and the row counts are what
they should be, back when the db was about 400MB.
Bizarre
>--Original Message--
>Is it the database or log? run:
>dbcc sqlperf('logspace')
>and see if it is your log file, if it is, back it up and
shrink the file or
>see if you have any open transactions "dbcc opentran"
>HTH
>--
>Ray Higdon MCSE, MCDBA, CCNA
>--
>"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in
message
>news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
>> Has anybody come across a problem where their database
>> file becomes enormous for no particular reason?
>> I have checked all user and system tables, and they are
>> correct. It seems that in 3 days the database has
blown
>> out from 400MB to 18500MB.
>> Any ideas/suggestions would be greatly appreciated.
>> Thank you
>
>.
>|||Indexes?
http://vyaskn.tripod.com/code/sp_show_huge_tables.txt
--
Kevin Hill
President
3NF Consulting
www.3nf-inc.com/NewsGroups.htm
"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in message
news:f0be01c3f0f4$c4533620$a501280a@.phx.gbl...
> I've already checked that. The log is currently using
> 50MB, whilst the PRIMARY database file is using 18329MB.
> I've checked all the tables, and the row counts are what
> they should be, back when the db was about 400MB.
> Bizarre
>
> >--Original Message--
> >Is it the database or log? run:
> >
> >dbcc sqlperf('logspace')
> >
> >and see if it is your log file, if it is, back it up and
> shrink the file or
> >see if you have any open transactions "dbcc opentran"
> >
> >HTH
> >
> >--
> >Ray Higdon MCSE, MCDBA, CCNA
> >--
> >"Nathan Day" <nathand@.stanthorpe.qld.gov.au> wrote in
> message
> >news:d94c01c3f03b$e1ef7810$a101280a@.phx.gbl...
> >> Has anybody come across a problem where their database
> >> file becomes enormous for no particular reason?
> >>
> >> I have checked all user and system tables, and they are
> >> correct. It seems that in 3 days the database has
> blown
> >> out from 400MB to 18500MB.
> >>
> >> Any ideas/suggestions would be greatly appreciated.
> >>
> >> Thank you
> >
> >
> >.
> >

Thursday, March 22, 2012

Database Size

In the table called system files, we have a field called size = Size of the file (in 8-KB pages). And if i look at the physical drive on the explorer this Size is different from the one in the database on system tables. Could someone tell me how to calculate them.

Secondly, i can see that the dumpfile is stored in sysdevices table, but where can i get the size of this dumpfile (.bak) because is always 0 after i dumped the file and again is not 0 on the physical drive of the explorerAbout your 2nd question:

The lines located on the system table only provide the physical location of a logical dump files. The size is 0 in any case.sql

Wednesday, March 21, 2012

Database Service wont start after installing SP2

I am hoping someone can help me. I am having issues changing the service account MSSQLSERVER. I changed it to Local System only due to issues installing Service Packs up SP2 Critical. I used the Configuration tool to do so. I have installed all patches up to and including Critical update ( KB 934458 ). I had a heck of a time getting them to install under custom service accounts. Now when I change the service accounts back to a custom account using the configuration tool the service wont start at all.

To be clear. The service runs fine under Local System Account, but I want to run it under a limited account. I used the config tool and made sure the permissions groups were added, but it still fails to start. I am not sure what SSL log entries below is referring to.

I am running:

SQL Server Standard Edition x86

Windows 2003 Stnd SP2

Below is the log file:

2007-09-01 23:50:16.15 spid9s Starting up database 'model'.
2007-09-01 23:50:16.20 Server Error: 17190, Severity: 16, State: 1.
2007-09-01 23:50:16.20 Server FallBack certificate initialization failed with error code: 1.
2007-09-01 23:50:16.20 Server Unable to initialize SSL encryption because a valid certificate could not be found, and it is not possible to create a self-signed certificate.
2007-09-01 23:50:16.21 Server Error: 17182, Severity: 16, State: 1.
2007-09-01 23:50:16.21 Server TDSSNIClient initialization failed with error 0x80092004, status code 0x80.
2007-09-01 23:50:16.21 Server Error: 17182, Severity: 16, State: 1.
2007-09-01 23:50:16.21 Server TDSSNIClient initialization failed with error 0x80092004, status code 0x1.
2007-09-01 23:50:16.21 Server Error: 17826, Severity: 18, State: 3.
2007-09-01 23:50:16.21 Server Could not start the network library because of an internal error in the network library. To determine the cause, review the errors immediately preceding this one in the error log.
2007-09-01 23:50:16.21 Server Error: 17120, Severity: 16, State: 1.
2007-09-01 23:50:16.21 Server SQL Server could not spawn FRunCM thread. Check the SQL Server error log and the Windows event logs for information about possible related problems.

I am not DBA or very heavy IT, but rather a developer wearing multiple hats, for the time being. So any help is greatly appreciated.

Thanks, DMC


Can anyone explain to me what SSL log error is referring to?

Database server will not expand mdf or ndf files

Has anyone had an issue with SQL Server not being able to expand
against a RAID 5 file system? My current configuration is that the
server is started and stopped using the local system account. I have
only one database (besides the master, model,etc)on the server. What
has happend to me several times is that the primary database in
question try's to expand the main datafile for the database (.mdf). I
setup the database to not expand automatically initially so that I can
be sure that we have enough file system space. Becuase of problems with
the application I decided to automatically expand. The other day the
developers came to me indicating that the databse was full and needed
to be expanded. Knowing that the database was in automatic expanding
more I was surprise to hear this. I went into EM and attempted to
expand first the log and it would not indicating that it there was an
issue in attempting to do so. I have never heard of a database not
being able to expand. I ran DBCC's, etc and it came up clean. I tried
to back the database up to disk and it would not backup. I finally had
to rename the datbase and rebuild it using DTS and scripts. I thought
I had fixed it only to find out today that it (again) won't expand. I
renamed the datbase and then tried taking an older backup file and
restore it and it would not restore. This problem seems to be related
to the file system but how I do not know.

So, I am ready to run rebuild master but I have sone this before only
to have this come back on me. I am at a complete loss. In the past I
have had to rebuild the entire server and database from scratch. The
only problem is that this has been done 3 times now with no complete
solution or explaination. If any of you have seen this type of
behavior and know whats going on please, please let me know what you
think the case and solution is!"2centbob" wrote:

> Has anyone had an issue with SQL Server not being able to expand
> against a RAID 5 file system? My current configuration is that the
> server is started and stopped using the local system account. I have
> only one database (besides the master, model,etc)on the server. What
> has happend to me several times is that the primary database in
> question try's to expand the main datafile for the database (.mdf). I
> setup the database to not expand automatically initially so that I can
> be sure that we have enough file system space. Becuase of problems with
> the application I decided to automatically expand. The other day the
> developers came to me indicating that the databse was full and needed
> to be expanded. Knowing that the database was in automatic expanding
> more I was surprise to hear this. I went into EM and attempted to
> expand first the log and it would not indicating that it there was an
> issue in attempting to do so. I have never heard of a database not
> being able to expand. I ran DBCC's, etc and it came up clean. I tried
> to back the database up to disk and it would not backup. I finally had
> to rename the datbase and rebuild it using DTS and scripts. I thought
> I had fixed it only to find out today that it (again) won't expand. I
> renamed the datbase and then tried taking an older backup file and
> restore it and it would not restore. This problem seems to be related
> to the file system but how I do not know.

<snip
I don't know of issues specifically with RAID 5 (unless your RAID card has
gone bonkers), but here's a few guesses (mostly based on my trying to figure
out why the file system or something else would stop a file from expanding).

- Are you sure you have enough disk space? (I'm pretty that's not it and you
would have seen it, but better safe than sorry.) One place to look is
programs that might create huge temp files that eventually go away: we had a
server that ran multiple concurrent server processes. We had a heck of a
time figuring out why disk space seemingly came and went in huge chunks
until we realized that 3rd party code in our services was creating *huge*
temp files (because a few programmers didn't code for users requesting
reports with 4 million lines before control breaks :).

- Is your file system NTFS or FAT? Not being able to expand and then not
being able to backup or restore sounds fishy: could you be bumping into
FAT's file size limit? If I recall it's 4GB in FAT32 and 2GB in earlier FAT
versions.

- Are disk quotas enabled on the server? I've never even touched these in
Windows, so I have no idea where you would look... For that matter, does
your RAID hw/sw combo allow for any kind of quota?

- I'm pretty sure you already have, but in case you haven't, have you
checked the SQL Server logs and the OS event logs?

Good Luck,

Craig|||Thanks for your reply. In these cases its allways novce to have a
complete picture and that doesn't necessarly get conveyed sometimes.
So, a little more information is warrented. The application that uses
the database is a Java app sitting on a different server. The database
server has no application running on it. The application was written by
a vendor. Thier requirements require that the datbase owner have full
rights to the database, i.e., using sp_changedbowner to that user. If I
did not use that approach then the application had problems upon
installation and therefore would not properly install. So, as I said I
changed it. Prior to this expereince the database was left to expand as
it needed and it did with no issues. The two circumstances that I
refered in my earlier email: the file system filled up and the database
could not expand. In addition, the server could not be reached and so
we had to shut it down hard. When it came back up we could not use the
database nor could we back it up. We were forced to rebuild the server:
OS and SQL Server. Later, a similar incident happened again and we were
forced (again) to rebuild. This last time, I had an additional 40 GB
added so we would not have a file system space problem again. I put the
database and log into a non-expansion mode so that when the application
would not accidently consume all of the disk space. However, the
database hit the high water mark on the datafile and could not expand.
I was notofied and of the problem and went to expand the file and it
would not expand again. No you most of the information.

At this point I am starting to think that as long the database has file
space to expand into and is not resitricted in any way the application
would probably work alright. However, because "sa" does not own the
database, the database owner probably needs "sa" rights. This is just
conjecture at this point. Funny thing, when this happend, the last
time, the "TaskPad" information came up with an error saying it could
not display the information and wanted to me to stop running the rest of
the script. I am concered that OS files are being walked on somehow.

Boy, I never had this expereince using Sybase and I have never seen
anyting like it in Oracle as well. But then again those were Unix
databases that I worked on, and not Windows.

Thanks.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Bob Schmitz (bschmitz4@.wi.rr.com) writes:
> Thanks for your reply. In these cases its allways novce to have a
> complete picture and that doesn't necessarly get conveyed sometimes.
> So, a little more information is warrented. The application that uses
> the database is a Java app sitting on a different server. The database
> server has no application running on it. The application was written by
> a vendor. Thier requirements require that the datbase owner have full
> rights to the database, i.e., using sp_changedbowner to that user. If I
> did not use that approach then the application had problems upon
> installation and therefore would not properly install. So, as I said I
> changed it. Prior to this expereince the database was left to expand as
> it needed and it did with no issues. The two circumstances that I
> refered in my earlier email: the file system filled up and the database
> could not expand. In addition, the server could not be reached and so
> we had to shut it down hard. When it came back up we could not use the
> database nor could we back it up. We were forced to rebuild the server:
> OS and SQL Server. Later, a similar incident happened again and we were
> forced (again) to rebuild. This last time, I had an additional 40 GB
> added so we would not have a file system space problem again. I put the
> database and log into a non-expansion mode so that when the application
> would not accidently consume all of the disk space. However, the
> database hit the high water mark on the datafile and could not expand.
> I was notofied and of the problem and went to expand the file and it
> would not expand again. No you most of the information.

A lots of words, but, frankly, not very much information.

First of all, who owns the database does not matter. Auto-grow will
work anyway.

Since you seem to have difficulties to explain what is going on, I would
like you to run sp_helpdb on your database and post the output. That
will at least give some minimum of information for us to work from.

I would also like you do a DIR on the disks where the data and log files
reside, and post the bottom lines from that output.

In your previous message you said that you could not backup the database,
but you never explained why. Did you get an error message? Or how did
you conclude that the backup wasn't working?

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Hi

Even though you mention EM! Are you using MSDE?
Do you have disk quotas?
Are you using mount points?

It may help if you posted the version
http://www.aspfaq.com/show.asp?id=2160.

John

"Bob Schmitz" <bschmitz4@.wi.rr.com> wrote in message
news:4204f360$1_2@.127.0.0.1...
> Thanks for your reply. In these cases its allways novce to have a
> complete picture and that doesn't necessarly get conveyed sometimes.
> So, a little more information is warrented. The application that uses
> the database is a Java app sitting on a different server. The database
> server has no application running on it. The application was written by
> a vendor. Thier requirements require that the datbase owner have full
> rights to the database, i.e., using sp_changedbowner to that user. If I
> did not use that approach then the application had problems upon
> installation and therefore would not properly install. So, as I said I
> changed it. Prior to this expereince the database was left to expand as
> it needed and it did with no issues. The two circumstances that I
> refered in my earlier email: the file system filled up and the database
> could not expand. In addition, the server could not be reached and so
> we had to shut it down hard. When it came back up we could not use the
> database nor could we back it up. We were forced to rebuild the server:
> OS and SQL Server. Later, a similar incident happened again and we were
> forced (again) to rebuild. This last time, I had an additional 40 GB
> added so we would not have a file system space problem again. I put the
> database and log into a non-expansion mode so that when the application
> would not accidently consume all of the disk space. However, the
> database hit the high water mark on the datafile and could not expand.
> I was notofied and of the problem and went to expand the file and it
> would not expand again. No you most of the information.
> At this point I am starting to think that as long the database has file
> space to expand into and is not resitricted in any way the application
> would probably work alright. However, because "sa" does not own the
> database, the database owner probably needs "sa" rights. This is just
> conjecture at this point. Funny thing, when this happend, the last
> time, the "TaskPad" information came up with an error saying it could
> not display the information and wanted to me to stop running the rest of
> the script. I am concered that OS files are being walked on somehow.
> Boy, I never had this expereince using Sybase and I have never seen
> anyting like it in Oracle as well. But then again those were Unix
> databases that I worked on, and not Windows.
> Thanks.
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Thats becuase this was a very difficult and weird situation. I knew
that I would not be able to explain it all and some would have
questions. sp_helpdb is not the problem becuase it shows the database.
There are no errors in the logs except when I try to backup or if i
tried to restore the database in question. When I ran a dir on the
filesystem the database files and there sizes show that they have
expanded but the databsae does no reflect this.

Now, what I have doen since then is to blow away the master, model,
msdb, and tempdb. I then ran the rebuild.exe program. That seems to
have fixed the problem as after I reattached the database I was able to
expand but log and data.

2centbob

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Bob Schmitz (bschmitz4@.wi.rr.com) writes:
> Thats becuase this was a very difficult and weird situation. I knew
> that I would not be able to explain it all and some would have
> questions. sp_helpdb is not the problem becuase it shows the database.
> There are no errors in the logs except when I try to backup or if i
> tried to restore the database in question. When I ran a dir on the
> filesystem the database files and there sizes show that they have
> expanded but the databsae does no reflect this.
> Now, what I have doen since then is to blow away the master, model,
> msdb, and tempdb. I then ran the rebuild.exe program. That seems to
> have fixed the problem as after I reattached the database I was able to
> expand but log and data.

I strongly suspect that you put far more work into fix this that was
required.

However, since your choice is not to share the information I asked you
to, I'm afraid I can't help you with advice of what you should have done.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||You can suspect all you want ... Unless you had been there working side
by side you don't know anything. Not only that, I resent your attitude
as though you know more than anyone else on this site. Please, in the
future, if you dont have something say other than criticize someone,
please refrain from responding. I don't need it and suspect others
don't need it as well.

For others: The end users were screaming to have this system back and so
my time was limited in responding. THE ONLY THING THAT HAS WORKED HAS
BEEN TO REBUILD THE MASTER DATABASE. Be that as it may, it works now,
thanks to all that replied.

2centbob

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Bob Schmitz (bschmitz4@.wi.rr.com) writes:
> You can suspect all you want ... Unless you had been there working side
> by side you don't know anything. Not only that, I resent your attitude
> as though you know more than anyone else on this site. Please, in the
> future, if you don't have something say other than criticize someone,
> please refrain from responding. I don't need it and suspect others
> don't need it as well.

You appeared to ask for help. And that's basically what I do here. Try
to help people. But often, I need more information about the case, so I
ask for that. It's true, that I have not been on your site, so I don't
know what happened. I have however been trying to find out, but you have
been very willing to give me the information that I have asked for. Of
course, you may do as you please. But you cannot really expect to get any
useful assistence that way.

And that is a piece of advice for the future when you have a need to
ask for help.

> For others: The end users were screaming to have this system back and so
> my time was limited in responding.

It may be better in a situation like this to open a case with Microsoft
support. It's certainly more expensive than a free forum like this one.
Then again, if they can help to reduce downtime, you get the money back
that way. Of course, also the support engineers will ask you questions
about the configuration, error messages etc.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

Monday, March 19, 2012

Database Security Question - Can this be done?

Hello,
I am new to MS SQL Server and I am in the process of implementing a
database system which introduces an interesting security issue that I
was hoping some one could advise me on.
BACKGROUND: I am developing a client / server application that which
requires users to be able to download data from a global database and
then save this information in a local database. This enables them to
work offline and upload their local data to the global database at a
later date. FYI: The global DB is MS SQL, and the local database is
Paradox.
THE PROBLEM: The issue is that I dont want to give users the
ability/permissions to update, delete records from the global database
- because this would make it easy for hackers to simply corrupt the
database (i.e. delete * from <table> ). Also, the global database
contains data from a selection of companies and I must ensure that each
user can not see the other company's data.
So to summarise I have the following issues?
1. How do I restrict what users can see?
2. How do I prevent users from accessing data I dont want them to
manipulate (ie. restricting update / delete statements).
I would be gratful for any assistance you can provide.
Best regards
Spencer
(satest@.hotmail.com)The short answer is to use stored procedures and place execute permission on
those.
You can then filter out what can be seen by who.
Other methods include views.
Basically don't permission directly on the base tables.
Tony.
Tony Rogerson
SQL Server MVP
http://sqlserverfaq.com - free video tutorials
"Spence" <satest@.hotmail.com> wrote in message
news:1130760231.566603.254620@.g43g2000cwa.googlegroups.com...
> Hello,
> I am new to MS SQL Server and I am in the process of implementing a
> database system which introduces an interesting security issue that I
> was hoping some one could advise me on.
> BACKGROUND: I am developing a client / server application that which
> requires users to be able to download data from a global database and
> then save this information in a local database. This enables them to
> work offline and upload their local data to the global database at a
> later date. FYI: The global DB is MS SQL, and the local database is
> Paradox.
> THE PROBLEM: The issue is that I dont want to give users the
> ability/permissions to update, delete records from the global database
> - because this would make it easy for hackers to simply corrupt the
> database (i.e. delete * from <table> ). Also, the global database
> contains data from a selection of companies and I must ensure that each
> user can not see the other company's data.
> So to summarise I have the following issues?
> 1. How do I restrict what users can see?
> 2. How do I prevent users from accessing data I dont want them to
> manipulate (ie. restricting update / delete statements).
> I would be gratful for any assistance you can provide.
> Best regards
> Spencer
> (satest@.hotmail.com)
>|||From what you have described, the users don't really need access to the
Global database at all. In fact, they don't even need a login to the server.
What you can use is a DTS package that exports the appropriate from the
Global database to a distributed offline Paradox database located on a
network folder that is accessable by the users. Once the users have finished
inserting/updating/deleting the Paradox database, another DTS package can
migrate the data back into the Global database.
Also, you may want to consider using MS Access instead of Paradox for
the front end application/database. I don't know that much about Paradox,
but I would bet it's options for integrating with SQL Server are much more
limited than MS Access. Here is an article that describes the concepts of an
architecture for migrating data to and from a distributed MS Access
database.
http://www.microsoft.com/technet/pr...bldsysarch.mspx
"Spence" <satest@.hotmail.com> wrote in message
news:1130760231.566603.254620@.g43g2000cwa.googlegroups.com...
> Hello,
> I am new to MS SQL Server and I am in the process of implementing a
> database system which introduces an interesting security issue that I
> was hoping some one could advise me on.
> BACKGROUND: I am developing a client / server application that which
> requires users to be able to download data from a global database and
> then save this information in a local database. This enables them to
> work offline and upload their local data to the global database at a
> later date. FYI: The global DB is MS SQL, and the local database is
> Paradox.
> THE PROBLEM: The issue is that I dont want to give users the
> ability/permissions to update, delete records from the global database
> - because this would make it easy for hackers to simply corrupt the
> database (i.e. delete * from <table> ). Also, the global database
> contains data from a selection of companies and I must ensure that each
> user can not see the other company's data.
> So to summarise I have the following issues?
> 1. How do I restrict what users can see?
> 2. How do I prevent users from accessing data I dont want them to
> manipulate (ie. restricting update / delete statements).
> I would be gratful for any assistance you can provide.
> Best regards
> Spencer
> (satest@.hotmail.com)
>

Sunday, March 11, 2012

Database Runtime

I am Using Sql Server 2005 enterprise edition to develop an accounting system.
now i want to distribute this software to other cleints.
I have created a setup which includes all the components required for the run time of the software but i dont know how to include the sql server database in it.
as i know that i have created access based software i used to include the database file in the setup and it would work but in the case of sql server i dont know how to do it .
is there any runtime of sql server which needs to be downloaded or any other way out.SQL Server Express is free of charge.|||I just seached information on sql server expres edition. it Is quite good but what if i need my application to run on network.
is it possible in sql server express edition to run my application on network.|||and another thing as i ve created my application in sql server enterprise manager is it possible to convert my database in sql server express edition|||See here for the differncies between Express and Enterprise editions
http://www.microsoft.com/sql/prodinfo/features/compare-features.mspx

Wednesday, March 7, 2012

Database restore after system Rebuild

Hi,
I have one SQL server where my databases where kept on the D drive, and
the transaction logs where on a physically seperate C drive. The D
drive became corrupted and I could not start SQL Server because the
master database was corrupt. So, I had to use the RebuildDM.exe to
rebuild the system tables. I have the log files sitting on the C
drive, but I never had a chance to back them up to the most recent
point today because I could not get into SQL Server until I rebuild it.
Now what I would like to do is just restore the databases and then use
the logs that are sitting on C, but the only way it seems that I can do
this is by backing up the transaction logs first, which I did not have
a chance to do. Is there anyway I can take a backup of my DB and tell
it to use the transaction logs that already exists so that it can apply
any missing transactions?
I forgot to mention, this box is windows server 2003 with sql server
2000 SP4
|||Doh, after hours of searching I found the answer right after posting
this. For anyone who has this problem, look here
http://support.microsoft.com/default...;EN-US;Q253817

Database restore after system Rebuild

Hi,
I have one SQL server where my databases where kept on the D drive, and
the transaction logs where on a physically seperate C drive. The D
drive became corrupted and I could not start SQL Server because the
master database was corrupt. So, I had to use the RebuildDM.exe to
rebuild the system tables. I have the log files sitting on the C
drive, but I never had a chance to back them up to the most recent
point today because I could not get into SQL Server until I rebuild it.
Now what I would like to do is just restore the databases and then use
the logs that are sitting on C, but the only way it seems that I can do
this is by backing up the transaction logs first, which I did not have
a chance to do. Is there anyway I can take a backup of my DB and tell
it to use the transaction logs that already exists so that it can apply
any missing transactions?I forgot to mention, this box is windows server 2003 with sql server
2000 SP4|||Doh, after hours of searching I found the answer right after posting
this. For anyone who has this problem, look here
http://support.microsoft.com/defaul...b;EN-US;Q253817

Database restore after system Rebuild

Hi,
I have one SQL server where my databases where kept on the D drive, and
the transaction logs where on a physically seperate C drive. The D
drive became corrupted and I could not start SQL Server because the
master database was corrupt. So, I had to use the RebuildDM.exe to
rebuild the system tables. I have the log files sitting on the C
drive, but I never had a chance to back them up to the most recent
point today because I could not get into SQL Server until I rebuild it.
Now what I would like to do is just restore the databases and then use
the logs that are sitting on C, but the only way it seems that I can do
this is by backing up the transaction logs first, which I did not have
a chance to do. Is there anyway I can take a backup of my DB and tell
it to use the transaction logs that already exists so that it can apply
any missing transactions?I forgot to mention, this box is windows server 2003 with sql server
2000 SP4|||Doh, after hours of searching I found the answer right after posting
this. For anyone who has this problem, look here
http://support.microsoft.com/default.aspx?scid=kb;EN-US;Q253817

database restore - msdb

Hi, In the event of a system crash, whereby the whole server had to be
re-built, how would I best restore the msdb database, in order to restore
all DTS's which I had?Hi Ben,
Please read the following article and you will find answers
http://support.microsoft.com/default.aspx?scid=kb;en-us;224071
HTH
Andreas
"Ben Rum" wrote:
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>
>|||Ben:
You can simply restore msdb from a backup that you have made as long as no
one is using it. That really means to just stop the SQL Server Agent
process and restore the database and then start the Agent back up. Works
like a champ (I actually had to do it this weekend due to a server failure).
One issue though is to remember to press your F5 key to refresh your view in
EM or you may end up giving yourself an unnecessary heart attack.
See the following if you want/need it straight from Microsoft:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/adminsql/ad_bkprst_2w1f.asp
Scott
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message
news:u6NVFYJiFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>

database restore - msdb

Hi, In the event of a system crash, whereby the whole server had to be
re-built, how would I best restore the msdb database, in order to restore
all DTS's which I had?
Hi Ben,
Please read the following article and you will find answers
http://support.microsoft.com/default...b;en-us;224071
HTH
Andreas
"Ben Rum" wrote:

> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>
>
|||Ben:
You can simply restore msdb from a backup that you have made as long as no
one is using it. That really means to just stop the SQL Server Agent
process and restore the database and then start the Agent back up. Works
like a champ (I actually had to do it this weekend due to a server failure).
One issue though is to remember to press your F5 key to refresh your view in
EM or you may end up giving yourself an unnecessary heart attack.
See the following if you want/need it straight from Microsoft:
http://msdn.microsoft.com/library/de...kprst_2w1f.asp
Scott
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message
news:u6NVFYJiFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>

database restore - msdb

Hi, In the event of a system crash, whereby the whole server had to be
re-built, how would I best restore the msdb database, in order to restore
all DTS's which I had?Hi Ben,
Please read the following article and you will find answers
http://support.microsoft.com/defaul...kb;en-us;224071
HTH
Andreas
"Ben Rum" wrote:

> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>
>|||Ben:
You can simply restore msdb from a backup that you have made as long as no
one is using it. That really means to just stop the SQL Server Agent
process and restore the database and then start the Agent back up. Works
like a champ (I actually had to do it this weekend due to a server failure).
One issue though is to remember to press your F5 key to refresh your view in
EM or you may end up giving yourself an unnecessary heart attack.
See the following if you want/need it straight from Microsoft:
http://msdn.microsoft.com/library/d... />
t_2w1f.asp
Scott
"Ben Rum" <bundyrum75@.yahoo.com> wrote in message
news:u6NVFYJiFHA.2472@.TK2MSFTNGP15.phx.gbl...
> Hi, In the event of a system crash, whereby the whole server had to be
> re-built, how would I best restore the msdb database, in order to restore
> all DTS's which I had?
>