Showing posts with label client. Show all posts
Showing posts with label client. Show all posts

Tuesday, March 27, 2012

Database Sizing Question

My company is currently setting up an application for a client that requires a Database server on the backend. We have selected SQL Server 2000 Enterprise as our DB but we are not sure how to size the hardware of the server. I have searched around and it appears that DB sizing is more experience/trial & error based than formula-based. I hope someone here can provide me with some advice if I provide the performance requirements of the server.

5 GB of data currently (will double in size every year) Approx. 10 million records (will double in size as well) 85,000 Transactions / hour 200 Concurrent users Client requires no greater than 1/2 second response time.

Questions:

How many CPU's should be needed? Why? How much RAM should be needed? Why?
RAID 10 was the recommended fault tolerance. Agree? Disagree?

Thanks in advance

JBAs you guessed there is no magical answer but here are some things to think about.

The actual size of the db is not too critical as long as you plan for growth and take into account how the drive arrays should be set up to achieve good performance. 85K per hour is less than 30 a second and although I wouldn't try that on a single processor box it is not too bad. (I routinely do over 800 a second with 4 Processors).

But since you need to handle Peak amounts and want less than 1 second response time you should be particularly aware of minimums. Ram will depend on how much of the data you actually use on a regular basis. You want to aim for enough ram to have all the data that you access on a regular basis in cache at one time leaving room for the procedure cache etc. Just because you have 5GB of data doesn't mean you will need 5GB of ram. You can always add ram if needed later just make sure you plan for growth ahead of time and save some ram slots so you don't have to throw away ram later to add more. It's always better to have more ram than not enough (don't forget to leave some for the OS too).

As for the hardwareI would shoot for the following:
RAID 1 (or 10) for the Log file(s).
RAID 5 or 10 for the data files (smaller and more disks vs less larger ones).
Raid 1 for the OS and SQL System files.

Depending on how much you will use tempdb (sorting etc) you may or may not want a separate Raid for tempdb.

If you do disk backups you may want to think about another RAID or 5 for the backups. In all cases make sure the arrays are expandable for future growth.

As for processors you will probably want to start with a 4 or 8 processor box with less than all the procs to begin with. The number of procs will depend on so many things but if you don't have enough you will probably see less than 1/2 second response time in peak loads while the rest of the time it will be fine. Poor code or schema is usually the reasons for needing more processors.

Andrewsql

Monday, March 19, 2012

Database schema differences

Hello,
Is there any way to compare two schemas and see the differences. Usual
story - client has changed their database structure, sent me a new
copy and I need to know what's changed without looking at each
table...best I've come up with so far is to script each database and
look at the scripts in Notepad...me thinks there must be a better way.
Cheers
Ray
Hi
Tools such as Red Gates SQL Compare, DBGhost etc can do that and also script
the changes needed to return it back to what it should be!
John
"rbrowning1958" <RBrowning1958@.gmail.com> wrote in message
news:91e2428a-0140-468c-8420-d3b3a09cb18f@.s37g2000prg.googlegroups.com...
> Hello,
> Is there any way to compare two schemas and see the differences. Usual
> story - client has changed their database structure, sent me a new
> copy and I need to know what's changed without looking at each
> table...best I've come up with so far is to script each database and
> look at the scripts in Notepad...me thinks there must be a better way.
> Cheers
> Ray
|||The free, open-source SchemaCrawler for SQL Server tool will do this
for you. You can take human-readable snapshots of the schema and data,
for later comparison. Comparisons are done using a standard diff tool
such as WinMerge. SchemaCrawler outputs details of your schema
(tables, views, procedures, and more) in a diff-able plain-text format
(text, CSV, or XHTML). SchemaCrawler can also output data (including
CLOBs and BLOBs) in the same plain-text formats.
SchemaCrawler is available at SourceForge:
http://schemacrawler.sourceforge.net/
Sualeh Fatehi
|||Try AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
- you can easily compare structures of tables, procedures, functions,
views, triggers and relationships.
Comparison "sessions" can be saved and re-played later without the
need of re-entering the parameters;
command line parameter can be used to fully automate comparisons.
Dariusz Dziewialtowski.

Database schema differences

Hello,
Is there any way to compare two schemas and see the differences. Usual
story - client has changed their database structure, sent me a new
copy and I need to know what's changed without looking at each
table...best I've come up with so far is to script each database and
look at the scripts in Notepad...me thinks there must be a better way.
Cheers
RayHi
Tools such as Red Gates SQL Compare, DBGhost etc can do that and also script
the changes needed to return it back to what it should be!
John
"rbrowning1958" <RBrowning1958@.gmail.com> wrote in message
news:91e2428a-0140-468c-8420-d3b3a09cb18f@.s37g2000prg.googlegroups.com...
> Hello,
> Is there any way to compare two schemas and see the differences. Usual
> story - client has changed their database structure, sent me a new
> copy and I need to know what's changed without looking at each
> table...best I've come up with so far is to script each database and
> look at the scripts in Notepad...me thinks there must be a better way.
> Cheers
> Ray|||The free, open-source SchemaCrawler for SQL Server tool will do this
for you. You can take human-readable snapshots of the schema and data,
for later comparison. Comparisons are done using a standard diff tool
such as WinMerge. SchemaCrawler outputs details of your schema
(tables, views, procedures, and more) in a diff-able plain-text format
(text, CSV, or XHTML). SchemaCrawler can also output data (including
CLOBs and BLOBs) in the same plain-text formats.
SchemaCrawler is available at SourceForge:
http://schemacrawler.sourceforge.net/
Sualeh Fatehi|||Try AlfaAlfa's SQL Server Comparison Tool (SCT)
http://www.sql-server-tool.com
- you can easily compare structures of tables, procedures, functions,
views, triggers and relationships.
Comparison "sessions" can be saved and re-played later without the
need of re-entering the parameters;
command line parameter can be used to fully automate comparisons.
Dariusz Dziewialtowski.

Sunday, March 11, 2012

Database Restores

I took some database backups from a client site to do some development.
There were 20G, 16G and 200MB

i ran it through EM but waited for like 20 minutes for the 20G and 16G but nothing happen. Went to Profiler -- there was no activity log for backup/restore events.

went to QA and tried to restore the backup -- with the stats option but still nothing happenned. The 200MB restore worked though. i have restored a databases over 20G but haven't really encountered this problem. Can anyone assist me ? or have come across this problem ?I have to bring 2 or 3 client databases in house a week. Our largest client db is only about 70 gb but here is my restore template. Never fails.

--STEP 1. Create the Database
CREATE DATABASE MyDatabase

--STEP 2. Get the physical file names
sp_helpdb MyDatabase

--STEP 3. Get the logical file names
RESTORE FILELISTONLY
FROM DISK = 'X:\MyBackup.BAK'

--STEP.4 RUN THE RECOVERY
ALTER DATABASE MyDatabase SET RESTRICTED_USER WITH ROLLBACK IMMEDIATE
GO
RESTORE DATABASE MyDatabase
FROM DISK = 'X:\MyBackup.BAK'
WITH REPLACE,RECOVERY,STATS=10,
MOVE 'Logical_Data' TO 'D:\physical.mdf' ,
MOVE 'Logical_Log' TO 'E:\physiical.LDF'
GO
ALTER DATABASE MyDatabase SET MULTI_USER
GO
BACKUP LOG MyDatabase WITH TRUNCATE_ONLY
GO
USE MyDatabase
GO
DBCC SHRINKFILE(Logical_Log,1)
GO
USE MASTER
GO
ALTER DATABASE MyDatabase SET RECOVERY SIMPLE|||That's the sort of thing you should post for reference on sqlkit, Thrasy.|||I know. I am getting some stuff together. Sample code... I have an article started. I will probably start posting this weekend. I am looking forward to some biting criticism. Why don't you post your CSVtoINT thing and don't you have a first name \ last name from one field thing too. I just have a full version release coming plus customer projects by the end of the month and I am woefully behind.|||I have noticed a remarkable delay from issuing the restore command to the first status tick being reported. Esecially on large databases. It could be that SQL Server is verifying the backup before beginning the restore, but that would be a question for Microsoft.

Thursday, March 8, 2012

Database Restore Error - URGENT

I am trying to restore a database sent from a client and getting the below
error in the process:
Server: Msg 3270, Level 16, State 1, Line 1
An internal consistency error occurred. Contact Technical Support for
assistance.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Any ideas why ?.
It is a SQL Server 2000 backup going into another SQL Server 2000 server.
Thanks.DXC,
If their database is in an inconsistent state, the backup will carry that
state to you. They should run DBCC CHECKDB on their database to try to
determine what is wrong, fix it if possible, then send you a new backup.
RLF
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
>I am trying to restore a database sent from a client and getting the below
> error in the process:
> Server: Msg 3270, Level 16, State 1, Line 1
> An internal consistency error occurred. Contact Technical Support for
> assistance.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> Any ideas why ?.
> It is a SQL Server 2000 backup going into another SQL Server 2000 server.
> Thanks.|||Russell, Thanks for the quick reply...........Also, I get the following
message when I run RESTORE VERIFYONLY.
Server: Msg 3242, Level 16, State 2, Line 1
The file on device 'D:\MTTBRP7_db_200802182100.BAK' is not a valid Microsoft
Tape Format backup set.
Server: Msg 3013, Level 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.
"Russell Fields" wrote:
> DXC,
> If their database is in an inconsistent state, the backup will carry that
> state to you. They should run DBCC CHECKDB on their database to try to
> determine what is wrong, fix it if possible, then send you a new backup.
> RLF
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
> >I am trying to restore a database sent from a client and getting the below
> > error in the process:
> >
> > Server: Msg 3270, Level 16, State 1, Line 1
> > An internal consistency error occurred. Contact Technical Support for
> > assistance.
> > Server: Msg 3013, Level 16, State 1, Line 1
> > RESTORE DATABASE is terminating abnormally.
> >
> > Any ideas why ?.
> >
> > It is a SQL Server 2000 backup going into another SQL Server 2000 server.
> >
> > Thanks.
>
>|||DXC,
Sorry, I don't really know, but here are a couple of posts that might help
you think of something. (I don't suppose that this backup is from SQL
Server 6.5 or earlier, is it?)
http://msdn2.microsoft.com/en-us/library/aa238234(SQL.80).aspx
http://support.microsoft.com/?kbid=905616
http://www.webservertalk.com/archive132-2004-7-330939.html
RLF
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:8803F9CE-B0A1-4E5B-A39F-BF73DFDBC1C0@.microsoft.com...
> Russell, Thanks for the quick reply...........Also, I get the following
> message when I run RESTORE VERIFYONLY.
> Server: Msg 3242, Level 16, State 2, Line 1
> The file on device 'D:\MTTBRP7_db_200802182100.BAK' is not a valid
> Microsoft
> Tape Format backup set.
> Server: Msg 3013, Level 16, State 1, Line 1
> VERIFY DATABASE is terminating abnormally.
>
> "Russell Fields" wrote:
>> DXC,
>> If their database is in an inconsistent state, the backup will carry that
>> state to you. They should run DBCC CHECKDB on their database to try to
>> determine what is wrong, fix it if possible, then send you a new backup.
>> RLF
>> "DXC" <DXC@.discussions.microsoft.com> wrote in message
>> news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
>> >I am trying to restore a database sent from a client and getting the
>> >below
>> > error in the process:
>> >
>> > Server: Msg 3270, Level 16, State 1, Line 1
>> > An internal consistency error occurred. Contact Technical Support for
>> > assistance.
>> > Server: Msg 3013, Level 16, State 1, Line 1
>> > RESTORE DATABASE is terminating abnormally.
>> >
>> > Any ideas why ?.
>> >
>> > It is a SQL Server 2000 backup going into another SQL Server 2000
>> > server.
>> >
>> > Thanks.
>>|||No it is not. It is from SQL Server 2000 server............Thanks......
"Russell Fields" wrote:
> DXC,
> Sorry, I don't really know, but here are a couple of posts that might help
> you think of something. (I don't suppose that this backup is from SQL
> Server 6.5 or earlier, is it?)
> http://msdn2.microsoft.com/en-us/library/aa238234(SQL.80).aspx
> http://support.microsoft.com/?kbid=905616
> http://www.webservertalk.com/archive132-2004-7-330939.html
> RLF
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:8803F9CE-B0A1-4E5B-A39F-BF73DFDBC1C0@.microsoft.com...
> > Russell, Thanks for the quick reply...........Also, I get the following
> > message when I run RESTORE VERIFYONLY.
> >
> > Server: Msg 3242, Level 16, State 2, Line 1
> > The file on device 'D:\MTTBRP7_db_200802182100.BAK' is not a valid
> > Microsoft
> > Tape Format backup set.
> > Server: Msg 3013, Level 16, State 1, Line 1
> > VERIFY DATABASE is terminating abnormally.
> >
> >
> > "Russell Fields" wrote:
> >
> >> DXC,
> >>
> >> If their database is in an inconsistent state, the backup will carry that
> >> state to you. They should run DBCC CHECKDB on their database to try to
> >> determine what is wrong, fix it if possible, then send you a new backup.
> >>
> >> RLF
> >>
> >> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> >> news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
> >> >I am trying to restore a database sent from a client and getting the
> >> >below
> >> > error in the process:
> >> >
> >> > Server: Msg 3270, Level 16, State 1, Line 1
> >> > An internal consistency error occurred. Contact Technical Support for
> >> > assistance.
> >> > Server: Msg 3013, Level 16, State 1, Line 1
> >> > RESTORE DATABASE is terminating abnormally.
> >> >
> >> > Any ideas why ?.
> >> >
> >> > It is a SQL Server 2000 backup going into another SQL Server 2000
> >> > server.
> >> >
> >> > Thanks.
> >>
> >>
> >>
>
>|||DXC,
I don't know what else to do except get another backup from them. Were you
able to do that and did it work?
RLF
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:FFA04E40-48DA-4590-9832-EC44415EFFDB@.microsoft.com...
> No it is not. It is from SQL Server 2000
> server............Thanks......
> "Russell Fields" wrote:
>> DXC,
>> Sorry, I don't really know, but here are a couple of posts that might
>> help
>> you think of something. (I don't suppose that this backup is from SQL
>> Server 6.5 or earlier, is it?)
>> http://msdn2.microsoft.com/en-us/library/aa238234(SQL.80).aspx
>> http://support.microsoft.com/?kbid=905616
>> http://www.webservertalk.com/archive132-2004-7-330939.html
>> RLF
>> "DXC" <DXC@.discussions.microsoft.com> wrote in message
>> news:8803F9CE-B0A1-4E5B-A39F-BF73DFDBC1C0@.microsoft.com...
>> > Russell, Thanks for the quick reply...........Also, I get the
>> > following
>> > message when I run RESTORE VERIFYONLY.
>> >
>> > Server: Msg 3242, Level 16, State 2, Line 1
>> > The file on device 'D:\MTTBRP7_db_200802182100.BAK' is not a valid
>> > Microsoft
>> > Tape Format backup set.
>> > Server: Msg 3013, Level 16, State 1, Line 1
>> > VERIFY DATABASE is terminating abnormally.
>> >
>> >
>> > "Russell Fields" wrote:
>> >
>> >> DXC,
>> >>
>> >> If their database is in an inconsistent state, the backup will carry
>> >> that
>> >> state to you. They should run DBCC CHECKDB on their database to try
>> >> to
>> >> determine what is wrong, fix it if possible, then send you a new
>> >> backup.
>> >>
>> >> RLF
>> >>
>> >> "DXC" <DXC@.discussions.microsoft.com> wrote in message
>> >> news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
>> >> >I am trying to restore a database sent from a client and getting the
>> >> >below
>> >> > error in the process:
>> >> >
>> >> > Server: Msg 3270, Level 16, State 1, Line 1
>> >> > An internal consistency error occurred. Contact Technical Support
>> >> > for
>> >> > assistance.
>> >> > Server: Msg 3013, Level 16, State 1, Line 1
>> >> > RESTORE DATABASE is terminating abnormally.
>> >> >
>> >> > Any ideas why ?.
>> >> >
>> >> > It is a SQL Server 2000 backup going into another SQL Server 2000
>> >> > server.
>> >> >
>> >> > Thanks.
>> >>
>> >>
>> >>
>>

Wednesday, March 7, 2012

Database Restore Error - URGENT

I am trying to restore a database sent from a client and getting the below
error in the process:
Server: Msg 3270, Level 16, State 1, Line 1
An internal consistency error occurred. Contact Technical Support for
assistance.
Server: Msg 3013, Level 16, State 1, Line 1
RESTORE DATABASE is terminating abnormally.
Any ideas why ?.
It is a SQL Server 2000 backup going into another SQL Server 2000 server.
Thanks.
DXC,
If their database is in an inconsistent state, the backup will carry that
state to you. They should run DBCC CHECKDB on their database to try to
determine what is wrong, fix it if possible, then send you a new backup.
RLF
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
>I am trying to restore a database sent from a client and getting the below
> error in the process:
> Server: Msg 3270, Level 16, State 1, Line 1
> An internal consistency error occurred. Contact Technical Support for
> assistance.
> Server: Msg 3013, Level 16, State 1, Line 1
> RESTORE DATABASE is terminating abnormally.
> Any ideas why ?.
> It is a SQL Server 2000 backup going into another SQL Server 2000 server.
> Thanks.
|||Russell, Thanks for the quick reply...........Also, I get the following
message when I run RESTORE VERIFYONLY.
Server: Msg 3242, Level 16, State 2, Line 1
The file on device 'D:\MTTBRP7_db_200802182100.BAK' is not a valid Microsoft
Tape Format backup set.
Server: Msg 3013, Level 16, State 1, Line 1
VERIFY DATABASE is terminating abnormally.
"Russell Fields" wrote:

> DXC,
> If their database is in an inconsistent state, the backup will carry that
> state to you. They should run DBCC CHECKDB on their database to try to
> determine what is wrong, fix it if possible, then send you a new backup.
> RLF
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:267D80B1-6158-43C5-9252-46B8BCD169DE@.microsoft.com...
>
>
|||DXC,
Sorry, I don't really know, but here are a couple of posts that might help
you think of something. (I don't suppose that this backup is from SQL
Server 6.5 or earlier, is it?)
http://msdn2.microsoft.com/en-us/library/aa238234(SQL.80).aspx
http://support.microsoft.com/?kbid=905616
http://www.webservertalk.com/archive132-2004-7-330939.html
RLF
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:8803F9CE-B0A1-4E5B-A39F-BF73DFDBC1C0@.microsoft.com...[vbcol=seagreen]
> Russell, Thanks for the quick reply...........Also, I get the following
> message when I run RESTORE VERIFYONLY.
> Server: Msg 3242, Level 16, State 2, Line 1
> The file on device 'D:\MTTBRP7_db_200802182100.BAK' is not a valid
> Microsoft
> Tape Format backup set.
> Server: Msg 3013, Level 16, State 1, Line 1
> VERIFY DATABASE is terminating abnormally.
>
> "Russell Fields" wrote:
|||No it is not. It is from SQL Server 2000 server............Thanks......
"Russell Fields" wrote:

> DXC,
> Sorry, I don't really know, but here are a couple of posts that might help
> you think of something. (I don't suppose that this backup is from SQL
> Server 6.5 or earlier, is it?)
> http://msdn2.microsoft.com/en-us/library/aa238234(SQL.80).aspx
> http://support.microsoft.com/?kbid=905616
> http://www.webservertalk.com/archive132-2004-7-330939.html
> RLF
> "DXC" <DXC@.discussions.microsoft.com> wrote in message
> news:8803F9CE-B0A1-4E5B-A39F-BF73DFDBC1C0@.microsoft.com...
>
>
|||DXC,
I don't know what else to do except get another backup from them. Were you
able to do that and did it work?
RLF
"DXC" <DXC@.discussions.microsoft.com> wrote in message
news:FFA04E40-48DA-4590-9832-EC44415EFFDB@.microsoft.com...[vbcol=seagreen]
> No it is not. It is from SQL Server 2000
> server............Thanks......
> "Russell Fields" wrote:

Friday, February 24, 2012

database recovery

The SBS 2003 server is blue screening. The client has not done any backup in
several months. I have pluged in another HDD, installed Standard 2003 and
then reconnected the old HDD as a second drive. All the data from the old HDD
is now visible and accessible. I can now comfortably recover all their data
except SQL database. Is there any way? Please help. Thanks in advance.
Chris
You might be able to attach the database files to the new installation. Read about sp_attach_db.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
> The SBS 2003 server is blue screening. The client has not done any backup in
> several months. I have pluged in another HDD, installed Standard 2003 and
> then reconnected the old HDD as a second drive. All the data from the old HDD
> is now visible and accessible. I can now comfortably recover all their data
> except SQL database. Is there any way? Please help. Thanks in advance.
> Chris
|||Tibor Im curious about your response. You say he "might" be able to attach,
what circumstances make this possible?
"Tibor Karaszi" wrote:

> You might be able to attach the database files to the new installation. Read about sp_attach_db.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
> news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
>
|||As long as there was no physical damage to the data or log files it should
work. When it attaches it will go thru recovery and roll forward or back as
needed to make the db consistent.
Andrew J. Kelly SQL MVP
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:ECD839A1-AC24-45BC-94D2-306A82B9397C@.microsoft.com...[vbcol=seagreen]
> Tibor Im curious about your response. You say he "might" be able to
> attach,
> what circumstances make this possible?
> "Tibor Karaszi" wrote:
|||> Tibor Im curious about your response. You say he "might" be able to attach,
> what circumstances make this possible?
Below is a quote from Books Online (2000) , sp_attach_db
"sp_attach_db should only be executed on databases that were previously detached from the database
server using an explicit sp_detach_db operation. "
We see posts almost here daily about "... crash ... attach... doesn't work". Granted, many of these
deleted the log file as well, but still. I like to play safe. Yes, I'd appreciate if MS would
provide a technical elaboration about specifically when attach work and when it doesn't. But without
such, I feel that BOL is the one to trust. Especially based on the posts we see here. Even if attach
(without detach) work in 99.99 % of the cases, it isn't good enough for me. Without knowing why it
won't work, I can't trust it. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:ECD839A1-AC24-45BC-94D2-306A82B9397C@.microsoft.com...[vbcol=seagreen]
> Tibor Im curious about your response. You say he "might" be able to attach,
> what circumstances make this possible?
> "Tibor Karaszi" wrote:

database recovery

The SBS 2003 server is blue screening. The client has not done any backup in
several months. I have pluged in another HDD, installed Standard 2003 and
then reconnected the old HDD as a second drive. All the data from the old HD
D
is now visible and accessible. I can now comfortably recover all their data
except SQL database. Is there any way? Please help. Thanks in advance.
ChrisYou might be able to attach the database files to the new installation. Read
about sp_attach_db.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
> The SBS 2003 server is blue screening. The client has not done any backup
in
> several months. I have pluged in another HDD, installed Standard 2003 and
> then reconnected the old HDD as a second drive. All the data from the old
HDD
> is now visible and accessible. I can now comfortably recover all their dat
a
> except SQL database. Is there any way? Please help. Thanks in advance.
> Chris|||Tibor Im curious about your response. You say he "might" be able to attach,
what circumstances make this possible?
"Tibor Karaszi" wrote:

> You might be able to attach the database files to the new installation. Re
ad about sp_attach_db.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
> news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
>|||As long as there was no physical damage to the data or log files it should
work. When it attaches it will go thru recovery and roll forward or back as
needed to make the db consistent.
Andrew J. Kelly SQL MVP
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:ECD839A1-AC24-45BC-94D2-306A82B9397C@.microsoft.com...[vbcol=seagreen]
> Tibor Im curious about your response. You say he "might" be able to
> attach,
> what circumstances make this possible?
> "Tibor Karaszi" wrote:
>|||> Tibor Im curious about your response. You say he "might" be able to attach,">
> what circumstances make this possible?
Below is a quote from Books Online (2000) , sp_attach_db
"sp_attach_db should only be executed on databases that were previously deta
ched from the database
server using an explicit sp_detach_db operation. "
We see posts almost here daily about "... crash ... attach... doesn't work".
Granted, many of these
deleted the log file as well, but still. I like to play safe. Yes, I'd appre
ciate if MS would
provide a technical elaboration about specifically when attach work and when
it doesn't. But without
such, I feel that BOL is the one to trust. Especially based on the posts we
see here. Even if attach
(without detach) work in 99.99 % of the cases, it isn't good enough for me.
Without knowing why it
won't work, I can't trust it. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:ECD839A1-AC24-45BC-94D2-306A82B9397C@.microsoft.com...[vbcol=seagreen]
> Tibor Im curious about your response. You say he "might" be able to attach
,
> what circumstances make this possible?
> "Tibor Karaszi" wrote:
>

database recovery

The SBS 2003 server is blue screening. The client has not done any backup in
several months. I have pluged in another HDD, installed Standard 2003 and
then reconnected the old HDD as a second drive. All the data from the old HDD
is now visible and accessible. I can now comfortably recover all their data
except SQL database. Is there any way? Please help. Thanks in advance.
ChrisYou might be able to attach the database files to the new installation. Read about sp_attach_db.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
> The SBS 2003 server is blue screening. The client has not done any backup in
> several months. I have pluged in another HDD, installed Standard 2003 and
> then reconnected the old HDD as a second drive. All the data from the old HDD
> is now visible and accessible. I can now comfortably recover all their data
> except SQL database. Is there any way? Please help. Thanks in advance.
> Chris|||Tibor Im curious about your response. You say he "might" be able to attach,
what circumstances make this possible?
"Tibor Karaszi" wrote:
> You might be able to attach the database files to the new installation. Read about sp_attach_db.
> --
> Tibor Karaszi, SQL Server MVP
> http://www.karaszi.com/sqlserver/default.asp
> http://www.solidqualitylearning.com/
> Blog: http://solidqualitylearning.com/blogs/tibor/
>
> "Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
> news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
> > The SBS 2003 server is blue screening. The client has not done any backup in
> > several months. I have pluged in another HDD, installed Standard 2003 and
> > then reconnected the old HDD as a second drive. All the data from the old HDD
> > is now visible and accessible. I can now comfortably recover all their data
> > except SQL database. Is there any way? Please help. Thanks in advance.
> >
> > Chris
>|||As long as there was no physical damage to the data or log files it should
work. When it attaches it will go thru recovery and roll forward or back as
needed to make the db consistent.
--
Andrew J. Kelly SQL MVP
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:ECD839A1-AC24-45BC-94D2-306A82B9397C@.microsoft.com...
> Tibor Im curious about your response. You say he "might" be able to
> attach,
> what circumstances make this possible?
> "Tibor Karaszi" wrote:
>> You might be able to attach the database files to the new installation.
>> Read about sp_attach_db.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
>> news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
>> > The SBS 2003 server is blue screening. The client has not done any
>> > backup in
>> > several months. I have pluged in another HDD, installed Standard 2003
>> > and
>> > then reconnected the old HDD as a second drive. All the data from the
>> > old HDD
>> > is now visible and accessible. I can now comfortably recover all their
>> > data
>> > except SQL database. Is there any way? Please help. Thanks in advance.
>> >
>> > Chris
>>|||> Tibor Im curious about your response. You say he "might" be able to attach,
> what circumstances make this possible?
Below is a quote from Books Online (2000) , sp_attach_db
"sp_attach_db should only be executed on databases that were previously detached from the database
server using an explicit sp_detach_db operation. "
We see posts almost here daily about "... crash ... attach... doesn't work". Granted, many of these
deleted the log file as well, but still. I like to play safe. Yes, I'd appreciate if MS would
provide a technical elaboration about specifically when attach work and when it doesn't. But without
such, I feel that BOL is the one to trust. Especially based on the posts we see here. Even if attach
(without detach) work in 99.99 % of the cases, it isn't good enough for me. Without knowing why it
won't work, I can't trust it. :-)
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
Blog: http://solidqualitylearning.com/blogs/tibor/
"ChrisR" <ChrisR@.discussions.microsoft.com> wrote in message
news:ECD839A1-AC24-45BC-94D2-306A82B9397C@.microsoft.com...
> Tibor Im curious about your response. You say he "might" be able to attach,
> what circumstances make this possible?
> "Tibor Karaszi" wrote:
>> You might be able to attach the database files to the new installation. Read about sp_attach_db.
>> --
>> Tibor Karaszi, SQL Server MVP
>> http://www.karaszi.com/sqlserver/default.asp
>> http://www.solidqualitylearning.com/
>> Blog: http://solidqualitylearning.com/blogs/tibor/
>>
>> "Chris Toffa" <ChrisToffa@.discussions.microsoft.com> wrote in message
>> news:289C92F0-38BF-40DE-B60D-D464F876DBCC@.microsoft.com...
>> > The SBS 2003 server is blue screening. The client has not done any backup in
>> > several months. I have pluged in another HDD, installed Standard 2003 and
>> > then reconnected the old HDD as a second drive. All the data from the old HDD
>> > is now visible and accessible. I can now comfortably recover all their data
>> > except SQL database. Is there any way? Please help. Thanks in advance.
>> >
>> > Chris
>>

Sunday, February 19, 2012

Database Question

If a client is going to pay you $100 a year for the next 5 years and I want to know, say in two years if they have made the payments that were due. How could I calculate this in a database? Would I need a payment schedule with dates that a payment was expected? And if yes how would I know if they made the due payments? I hope you can see what I need to know from this, but if not I will add more.

Thanks for any help.How about a table for payments, like so:


create table dbo.t_issue_saved_report_sql
(
PayID intnot null,
CustomerID int not null,
Amount varchar(255) not null,
DueDate datetime,
PaidDate datetime
)

So when your customer signs up, your program will populate the table with 5 entries, including the due dates for each year and the amount due. This is a simple representation, and I'm sure I'm missing something, but perhaps a start.

Tuesday, February 14, 2012

Database otpion @ Client - Smart Client

Hello,

We are trying to develop a smart client application which is occasionaly connected. The issue here is we are unable to decide on the database which needs to be used in the client. We will not able to use MSSQL express or MSDE becuase of the size limitation. The size of the DB is actually a couple of gigs(SQL server backup). The user need not do any transaction which needs to be re recorded in server. The user will connect only to donwload data and get the application updates.

The other important factor the user should have high performance of the applciation

Please suggest

I'm not an expert on all of the SQL Express specifications, but according to this, the limit is actually 4GB, so maybe this would work for you:

Comparing SQL Server Express with MSDE

http://msdn2.microsoft.com/zh-cn/library/ms165672(SQL.90).aspx

Thanks,

Sararh

|||

Sorry. I must have told you...I will also have incremental update to the database..so everytime you update the database size is going to grow ...So it will easily cross 4 GB of data over a period of time ...

Database Optimizations

We have a database that is getting fairly heavy use. Our client complained
that on a certain task it was performing slower than usual. The last time
this happened I manually ran our optimazations job and it fixed the problem.
After that I set up our optimazations job to run every night. This kept
anything from happening for a while but just today we got the same call
again and again it was fixed when I ran the optimazations job. How often
are heavly used databases typically suppose to run the optimizations? Any
help on this topic?
Thanks,
BrandonBrandon Owensby wrote:
> We have a database that is getting fairly heavy use. Our client
> complained that on a certain task it was performing slower than
> usual. The last time this happened I manually ran our optimazations
> job and it fixed the problem. After that I set up our optimazations
> job to run every night. This kept anything from happening for a
> while but just today we got the same call again and again it was
> fixed when I ran the optimazations job. How often are heavly used
> databases typically suppose to run the optimizations? Any help on
> this topic?
> Thanks,
> Brandon
What optimizations? How can you be sure you don't have performance
problems related to query performance? What about disk? CPU? There are a
number of issues that can be the cause. Most times it's the SQL itself.
Properly tuned queries reduce disk and CPU overhead greatly.
--
David Gugick
Imceda Software
www.imceda.com|||Brandon
It is time to start tuning your queries/sp/views. In my experience 80% of
such kind of problems is caused by application (poor written queries).
"Brandon Owensby" <123@.abc.com> wrote in message
news:%23KDUctfvEHA.1392@.TK2MSFTNGP14.phx.gbl...
> We have a database that is getting fairly heavy use. Our client
complained
> that on a certain task it was performing slower than usual. The last time
> this happened I manually ran our optimazations job and it fixed the
problem.
> After that I set up our optimazations job to run every night. This kept
> anything from happening for a while but just today we got the same call
> again and again it was fixed when I ran the optimazations job. How often
> are heavly used databases typically suppose to run the optimizations?
Any
> help on this topic?
> Thanks,
> Brandon
>

Database Optimizations

We have a database that is getting fairly heavy use. Our client complained
that on a certain task it was performing slower than usual. The last time
this happened I manually ran our optimazations job and it fixed the problem.
After that I set up our optimazations job to run every night. This kept
anything from happening for a while but just today we got the same call
again and again it was fixed when I ran the optimazations job. How often
are heavly used databases typically suppose to run the optimizations? Any
help on this topic?
Thanks,
Brandon
Brandon Owensby wrote:
> We have a database that is getting fairly heavy use. Our client
> complained that on a certain task it was performing slower than
> usual. The last time this happened I manually ran our optimazations
> job and it fixed the problem. After that I set up our optimazations
> job to run every night. This kept anything from happening for a
> while but just today we got the same call again and again it was
> fixed when I ran the optimazations job. How often are heavly used
> databases typically suppose to run the optimizations? Any help on
> this topic?
> Thanks,
> Brandon
What optimizations? How can you be sure you don't have performance
problems related to query performance? What about disk? CPU? There are a
number of issues that can be the cause. Most times it's the SQL itself.
Properly tuned queries reduce disk and CPU overhead greatly.
David Gugick
Imceda Software
www.imceda.com
|||Brandon
It is time to start tuning your queries/sp/views. In my experience 80% of
such kind of problems is caused by application (poor written queries).
"Brandon Owensby" <123@.abc.com> wrote in message
news:%23KDUctfvEHA.1392@.TK2MSFTNGP14.phx.gbl...
> We have a database that is getting fairly heavy use. Our client
complained
> that on a certain task it was performing slower than usual. The last time
> this happened I manually ran our optimazations job and it fixed the
problem.
> After that I set up our optimazations job to run every night. This kept
> anything from happening for a while but just today we got the same call
> again and again it was fixed when I ran the optimazations job. How often
> are heavly used databases typically suppose to run the optimizations?
Any
> help on this topic?
> Thanks,
> Brandon
>

Database Optimizations

We have a database that is getting fairly heavy use. Our client complained
that on a certain task it was performing slower than usual. The last time
this happened I manually ran our optimazations job and it fixed the problem.
After that I set up our optimazations job to run every night. This kept
anything from happening for a while but just today we got the same call
again and again it was fixed when I ran the optimazations job. How often
are heavly used databases typically suppose to run the optimizations? Any
help on this topic?
Thanks,
BrandonBrandon Owensby wrote:
> We have a database that is getting fairly heavy use. Our client
> complained that on a certain task it was performing slower than
> usual. The last time this happened I manually ran our optimazations
> job and it fixed the problem. After that I set up our optimazations
> job to run every night. This kept anything from happening for a
> while but just today we got the same call again and again it was
> fixed when I ran the optimazations job. How often are heavly used
> databases typically suppose to run the optimizations? Any help on
> this topic?
> Thanks,
> Brandon
What optimizations? How can you be sure you don't have performance
problems related to query performance? What about disk? CPU? There are a
number of issues that can be the cause. Most times it's the SQL itself.
Properly tuned queries reduce disk and CPU overhead greatly.
David Gugick
Imceda Software
www.imceda.com|||Brandon
It is time to start tuning your queries/sp/views. In my experience 80% of
such kind of problems is caused by application (poor written queries).
"Brandon Owensby" <123@.abc.com> wrote in message
news:%23KDUctfvEHA.1392@.TK2MSFTNGP14.phx.gbl...
> We have a database that is getting fairly heavy use. Our client
complained
> that on a certain task it was performing slower than usual. The last time
> this happened I manually ran our optimazations job and it fixed the
problem.
> After that I set up our optimazations job to run every night. This kept
> anything from happening for a while but just today we got the same call
> again and again it was fixed when I ran the optimazations job. How often
> are heavly used databases typically suppose to run the optimizations?
Any
> help on this topic?
> Thanks,
> Brandon
>