Wednesday, March 7, 2012
Data base structure question
I have a data base which hold a record for each contact in exchange
the records contain Status column
I have been asked to allow the user to do a search on both the status
and some other properties of the contact(currently FirstName and LastName)
in order to do that I am going to cache the FirstName and
LastName(searchable properties) of each contact using WebDAV
in my data base.
since in the future the searchable properties can be changed I am thinking
to save them in another table,here is my structure
Table Items
Id Status
1 Imported
Table KeyWords
ItemId Name Value
1 FirstName Julia
1 LastName Adriano
I would like to ask if this structure won't hurt performance espcially since
i am doing paging
using http://rosca.net/writing/articles/serverside_paging.asp sample
It is basically an asp.net intranet application with a single user
BTW:I couldnot uses a distribute query,or store anything in exchange
Thanks in advance
Hi Julia,
This is not really an Access question, but more of an Exchange one, but
since I've done some work in both, I can perhaps get you pointed in the
right direction. Using the Outlook client for Exchange, there are 4 custom
fields which you can use to hold any data you wish. You can also use any
other field which is unlikely to be used. Just remember to document it well.
Exchange identifies every entry of any kind using a 128 character GUID
string which in Exchange is called the EntryID. You can query the MAPI
namespace to get that value. Now, having that value in your database will
automatically define the record as being imported (at least from Exchange).
The structure you have is OK, but it requires user input when it would be
just as easy to get a value from Exchange.
Ask how to implement this in one of the Exchange newsgroups.
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
"Julia" <codewizard@.012.net.il> wrote in message
news:%23xGJipMdFHA.3076@.TK2MSFTNGP10.phx.gbl...
>
> Hi,
> I have a data base which hold a record for each contact in exchange
> the records contain Status column
> I have been asked to allow the user to do a search on both the status
> and some other properties of the contact(currently FirstName and LastName)
>
> in order to do that I am going to cache the FirstName and
> LastName(searchable properties) of each contact using WebDAV
> in my data base.
> since in the future the searchable properties can be changed I am thinking
> to save them in another table,here is my structure
> Table Items
> Id Status
> 1 Imported
> Table KeyWords
> ItemId Name Value
> 1 FirstName Julia
> 1 LastName Adriano
> I would like to ask if this structure won't hurt performance espcially
since
> i am doing paging
> using http://rosca.net/writing/articles/serverside_paging.asp sample
> It is basically an asp.net intranet application with a single user
> BTW:I couldnot uses a distribute query,or store anything in exchange
> Thanks in advance
>
|||Thanks,I know how to import it from exchange,actually I am using WebDav not
MAPI
I also familiar with the EntryId(i am using the entryid to identify the
contact) and custom fields,but as I wrote I CANNOT
change anything in exchange schema,actually sometimes it is not exchnage
rather other data base
I want to focus on the structure and performance that's all
Thanks,
"Arvin Meyer [MVP]" <a@.m.com> wrote in message
news:OmAlH$MdFHA.1288@.tk2msftngp13.phx.gbl...
> Hi Julia,
> This is not really an Access question, but more of an Exchange one, but
> since I've done some work in both, I can perhaps get you pointed in the
> right direction. Using the Outlook client for Exchange, there are 4 custom
> fields which you can use to hold any data you wish. You can also use any
> other field which is unlikely to be used. Just remember to document it
well.
> Exchange identifies every entry of any kind using a 128 character GUID
> string which in Exchange is called the EntryID. You can query the MAPI
> namespace to get that value. Now, having that value in your database will
> automatically define the record as being imported (at least from
Exchange).[vbcol=seagreen]
> The structure you have is OK, but it requires user input when it would be
> just as easy to get a value from Exchange.
> Ask how to implement this in one of the Exchange newsgroups.
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads:
> http://www.datastrat.com
> http://www.mvps.org/access
> "Julia" <codewizard@.012.net.il> wrote in message
> news:%23xGJipMdFHA.3076@.TK2MSFTNGP10.phx.gbl...
LastName)[vbcol=seagreen]
thinking
> since
>
|||I see nothing wrong with your structure. If you're using ASP and the MSDE
engine wit a client-side cursor, you may as well be using the JET engine. It
is designed as a client-side cursor database engine and in the respect
alone, it's performance is often better that t6he SS engine. The reason is
that Rushmore technology and JET are designed to send only the specific
indexes asked for, then return the data based on a criteria used with the
index(es). Client-side cursors with the SQL engine return the entire
dataset, irrespective of indexes. If you can perform your work with a
server-side cursor, you will usually get better performance with the
SQL-Server engine.
Arvin Meyer, MCP, MVP
Microsoft Access
Free Access downloads:
http://www.datastrat.com
http://www.mvps.org/access
"Julia" <codewizard@.012.net.il> wrote in message
news:eAYEViNdFHA.2076@.TK2MSFTNGP15.phx.gbl...
> Thanks,I know how to import it from exchange,actually I am using WebDav
not[vbcol=seagreen]
> MAPI
> I also familiar with the EntryId(i am using the entryid to identify the
> contact) and custom fields,but as I wrote I CANNOT
> change anything in exchange schema,actually sometimes it is not exchnage
> rather other data base
>
> I want to focus on the structure and performance that's all
> Thanks,
> "Arvin Meyer [MVP]" <a@.m.com> wrote in message
> news:OmAlH$MdFHA.1288@.tk2msftngp13.phx.gbl...
custom[vbcol=seagreen]
> well.
will[vbcol=seagreen]
> Exchange).
be
> LastName)
> thinking
>
|||Ok,Thanks
"Arvin Meyer [MVP]" <a@.m.com> wrote in message
news:e69$7mOdFHA.3156@.tk2msftngp13.phx.gbl...
> I see nothing wrong with your structure. If you're using ASP and the MSDE
> engine wit a client-side cursor, you may as well be using the JET engine.
It[vbcol=seagreen]
> is designed as a client-side cursor database engine and in the respect
> alone, it's performance is often better that t6he SS engine. The reason is
> that Rushmore technology and JET are designed to send only the specific
> indexes asked for, then return the data based on a criteria used with the
> index(es). Client-side cursors with the SQL engine return the entire
> dataset, irrespective of indexes. If you can perform your work with a
> server-side cursor, you will usually get better performance with the
> SQL-Server engine.
> --
> Arvin Meyer, MCP, MVP
> Microsoft Access
> Free Access downloads:
> http://www.datastrat.com
> http://www.mvps.org/access
> "Julia" <codewizard@.012.net.il> wrote in message
> news:eAYEViNdFHA.2076@.TK2MSFTNGP15.phx.gbl...
> not
but[vbcol=seagreen]
the[vbcol=seagreen]
> custom
any[vbcol=seagreen]
> will
> be
status[vbcol=seagreen]
espcially
>
data base size, help!
The server I'm on is running out of space and was wondering if you have ever
run into this problem and what I should do about it?
How can I move previous year records off the database?
Should I make a backup and then delete them from the current database?
Do I need the log file?
How do I reduce the size?
> The size of an sql server database has is 1gig and the log file is 1 gig.
> The server I'm on is running out of space and was wondering if you have
> ever
> run into this problem and what I should do about it?
Buy a bigger disk? Why does your server have a 2GB volume?
> How can I move previous year records off the database?
You can use dozens of methods, including DTS them to another database and
then delete.
> Do I need the log file?
Yes, you need the log file. It's not there because it's pretty.
> How do I reduce the size?
http://www.aspfaq.com/2471
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.
|||LU
http://support.microsoft.com/default...650-- how
to shrink tr log
http://support.microsoft.com/default...72318-- the
same shrink on sql2000
"LU" <LU@.discussions.microsoft.com> wrote in message
news:9765408F-F850-4531-8257-9F1A19867049@.microsoft.com...
> The size of an sql server database has is 1gig and the log file is 1 gig.
> The server I'm on is running out of space and was wondering if you have
ever
> run into this problem and what I should do about it?
> How can I move previous year records off the database?
> Should I make a backup and then delete them from the current database?
> Do I need the log file?
> How do I reduce the size?
data base size, help!
The server I'm on is running out of space and was wondering if you have ever
run into this problem and what I should do about it?
How can I move previous year records off the database?
Should I make a backup and then delete them from the current database?
Do I need the log file?
How do I reduce the size?> The size of an sql server database has is 1gig and the log file is 1 gig.
> The server I'm on is running out of space and was wondering if you have
> ever
> run into this problem and what I should do about it?
Buy a bigger disk? Why does your server have a 2GB volume?
> How can I move previous year records off the database?
You can use dozens of methods, including DTS them to another database and
then delete.
> Do I need the log file?
Yes, you need the log file. It's not there because it's pretty.
> How do I reduce the size?
http://www.aspfaq.com/2471
--
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||LU
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q256650-- how
to shrink tr log
http://support.microsoft.com/default.aspx?scid=kb;EN-US;q272318-- the
same shrink on sql2000
"LU" <LU@.discussions.microsoft.com> wrote in message
news:9765408F-F850-4531-8257-9F1A19867049@.microsoft.com...
> The size of an sql server database has is 1gig and the log file is 1 gig.
> The server I'm on is running out of space and was wondering if you have
ever
> run into this problem and what I should do about it?
> How can I move previous year records off the database?
> Should I make a backup and then delete them from the current database?
> Do I need the log file?
> How do I reduce the size?
data base size, help!
The server I'm on is running out of space and was wondering if you have ever
run into this problem and what I should do about it?
How can I move previous year records off the database?
Should I make a backup and then delete them from the current database?
Do I need the log file?
How do I reduce the size?> The size of an sql server database has is 1gig and the log file is 1 gig.
> The server I'm on is running out of space and was wondering if you have
> ever
> run into this problem and what I should do about it?
Buy a bigger disk? Why does your server have a 2GB volume?
> How can I move previous year records off the database?
You can use dozens of methods, including DTS them to another database and
then delete.
> Do I need the log file?
Yes, you need the log file. It's not there because it's pretty.
> How do I reduce the size?
http://www.aspfaq.com/2471
This is my signature. It is a general reminder.
Please post DDL, sample data and desired results.
See http://www.aspfaq.com/5006 for info.|||LU
http://support.microsoft.com/defaul...6650-- h
ow
to shrink tr log
http://support.microsoft.com/defaul...272318-- the
same shrink on sql2000
"LU" <LU@.discussions.microsoft.com> wrote in message
news:9765408F-F850-4531-8257-9F1A19867049@.microsoft.com...
> The size of an sql server database has is 1gig and the log file is 1 gig.
> The server I'm on is running out of space and was wondering if you have
ever
> run into this problem and what I should do about it?
> How can I move previous year records off the database?
> Should I make a backup and then delete them from the current database?
> Do I need the log file?
> How do I reduce the size?
Data Base Size
what matters is complexity
my biggest was 115 tables that i designed mineselbst
:) :)|||"In every large program there is a small program screaming to get out."|||in every complex database there is a simple denormalized table screaming to get out|||sheer volume is meaningless,
:) :)
So what you're saying is, size doesn't matter ;)|||In a very large database, there is a full table scan waiting to ruin your day.|||By that count I have worked with about 310 tables at a time... and there is a table i like to call MasterBuster ... tblCodes in which all simple master tables are combined... about 35 odd|||ah yes, the One True Lookup Table (or OTLT as it is known)
many otherwise intelligent modellers have fallen victim to the evil OTLT|||ah yes, the One True Lookup Table (or OTLT as it is known)
many otherwise intelligent modellers have fallen victim to the evil OTLT
I believe one reason the OTLT approach surfaced was because some early DBMS's had a small limit on the number of joins in one statement. I remember writing SQL statements with a limit of 8 joins... easy to exceed with lookup tables.
I have quit OTLT's, cold turkey. It was almost as hard as giving up cigarrettes.
Data Base Shrink
a Database Consists of:-
1-Single Database File .
2-single transaction log file(initial size 2 MB).
I have Observed that the transaction log file'Capacity
reaches 23 Giga Byte so I Made a Backup for the whole
database and then I tried to shrink the log file using
enterprise manager shrink database wizard.then I
discovered that the physical file capacity was not
reduced, although enterprise manager gave me a message
that the file has been shrinked.
I tried More And More But No result.
Help will be so much appreciated
Best Regards:-
Ahmed NourGood shrink article can be found :-
http://www.mssqlserver.com/faq/logs-shrinklog.asp
--
HTH
Ryan Waight, MCDBA, MCSE
"Ahmed Nour" <a_m_nour@.hotmail.com> wrote in message
news:0d7201c393e7$706c2590$a401280a@.phx.gbl...
> I have SQL Server 2000 on WIN2k Advanced Server And I have
> a Database Consists of:-
> 1-Single Database File .
> 2-single transaction log file(initial size 2 MB).
> I have Observed that the transaction log file'Capacity
> reaches 23 Giga Byte so I Made a Backup for the whole
> database and then I tried to shrink the log file using
> enterprise manager shrink database wizard.then I
> discovered that the physical file capacity was not
> reduced, although enterprise manager gave me a message
> that the file has been shrinked.
> I tried More And More But No result.
> Help will be so much appreciated
> Best Regards:-
> Ahmed Nour|||Ahmed ,
Refer to following urls
http://www.support.microsoft.com/?id=256650 INF: How to Shrink the SQL
Server 7.0 Tran Log
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow and AutoShrink
http://www.support.microsoft.com/?id=272318 INF: Shrinking Log in SQL
Server 2000 with DBCC SHRINKFILE
http://www.support.microsoft.com/?id=317375 Log File Grows too big
http://www.support.microsoft.com/?id=110139 Log file filling up
http://www.mssqlserver.com/faq/logs-shrinklog.asp Shrink File
http://www.support.microsoft.com/?id=315512 Considerations for Autogrow and AutoShrink
--
- Vishal
data base name
another sql server 7. the data base name was 'Item CS'
there is a blank in the name (between Item and CS).
I used the restore command to restore from backup copy
but it got a syntax error.
RESTORE DATABASE Item CS FROM c:\backup\Item CS.BAK
This command gave an error because a 'blank' between Item
CS
How can we get around to use the restore command for a
data base with this kind of name ?
Thanks
VanTry:
RESTORE DATABASE [Item CS]
FROM DISK='c:\backup\Item CS.BAK'
--
Hope this helps.
Dan Guzman
SQL Server MVP
--
SQL FAQ links (courtesy Neil Pike):
http://www.ntfaq.com/Articles/Index.cfm?DepartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--
"VanHo" <vanho@.ispwest.com> wrote in message
news:08f301c378eb$e5b70390$a301280a@.phx.gbl...
> I have to migrate one data base from sqlserver 7 to
> another sql server 7. the data base name was 'Item CS'
> there is a blank in the name (between Item and CS).
> I used the restore command to restore from backup copy
> but it got a syntax error.
> RESTORE DATABASE Item CS FROM c:\backup\Item CS.BAK
> This command gave an error because a 'blank' between Item
> CS
>
> How can we get around to use the restore command for a
> data base with this kind of name ?
> Thanks
> Van
Data Base Mirroring in SQL server 2005 Express Edition
HI,
Does SQL server 2005 Express Edition or
Does SQL server 2005 Express Edition Sp1 supports Data base Mirroring?
Here is direct quote from BOL,
http://msdn2.microsoft.com/en-us/library/ms188712.aspx
Before you use the Mirroring page to configure database mirroring, ensure that the following requirements have been met:
The principal and mirror server instances must be running the same edition of SQL Server-either Standard Edition or Enterprise Edition. Also, we strongly recommend that they run on comparable systems that can handle identical workloads.
Data base mirroring fail over clients redirects
I have recently installed and configured SQL 2005 SE with database mirroring
configured with high safety with automatic failover synchronous mode.
My question is (I probably missed the principle idea) in case of failover
occurred how do the clients redirect to the second node transparently.
Thanks in advanced.
Tal shalom
You must specify the initial principal server and database in the
connection string and the failover partner server.
Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial
Catalog=myDataBase;Integrated Security=True;
"Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
news:65B28837-DFDB-45A6-858E-F73D291E86F1@.microsoft.com...
> Hello,
> I have recently installed and configured SQL 2005 SE with database
> mirroring
> configured with high safety with automatic failover synchronous mode.
> My question is (I probably missed the principle idea) in case of failover
> occurred how do the clients redirect to the second node transparently.
> Thanks in advanced.
|||Shalom Uri
Thanks for the answer, will it be the right option to use also Microsoft SQL
Server Native Client and choosing mirror server will it achieve the same
results.
Thanks
"Uri Dimant" wrote:
> Tal shalom
> You must specify the initial principal server and database in the
> connection string and the failover partner server.
> Data Source=myServerAddress;Failover Partner=myMirrorServer;Initial
> Catalog=myDataBase;Integrated Security=True;
>
> "Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
> news:65B28837-DFDB-45A6-858E-F73D291E86F1@.microsoft.com...
>
>
|||Hi Tal
Yes, I forgot to mention that you have to use ADO.NET or the SQL Native
Client .
"Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
news:26F6792F-0750-4E87-B438-A602908DA166@.microsoft.com...[vbcol=seagreen]
> Shalom Uri
> Thanks for the answer, will it be the right option to use also Microsoft
> SQL
> Server Native Client and choosing mirror server will it achieve the same
> results.
> Thanks
>
> "Uri Dimant" wrote:
|||thanks
cheers
"Uri Dimant" wrote:
> Hi Tal
> Yes, I forgot to mention that you have to use ADO.NET or the SQL Native
> Client .
>
>
> "Tal Bar-Or" <TalBarOr@.discussions.microsoft.com> wrote in message
> news:26F6792F-0750-4E87-B438-A602908DA166@.microsoft.com...
>
>
Data Base Maintenance Plan
t
working. I also did the same thing for .bak and it works fine for those. I
am not sure what else I need to do for this. Could someone please help me
out?Perhaps you have some databases for which you are trying to do log backup bu
t the database(s) is/are
in simple recovery mode?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Takia" <Takia@.discussions.microsoft.com> wrote in message
news:320A9D9B-BDBC-4C3B-802A-C61BA5E7F08A@.microsoft.com...
>I have set this to remove .trn files that are older than 4 days and it is n
ot
> working. I also did the same thing for .bak and it works fine for those.
I
> am not sure what else I need to do for this. Could someone please help me
> out?
Data Base Maintenance Plan
working. I also did the same thing for .bak and it works fine for those. I
am not sure what else I need to do for this. Could someone please help me
out?
Perhaps you have some databases for which you are trying to do log backup but the database(s) is/are
in simple recovery mode?
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Takia" <Takia@.discussions.microsoft.com> wrote in message
news:320A9D9B-BDBC-4C3B-802A-C61BA5E7F08A@.microsoft.com...
>I have set this to remove .trn files that are older than 4 days and it is not
> working. I also did the same thing for .bak and it works fine for those. I
> am not sure what else I need to do for this. Could someone please help me
> out?
Data Base Maintenance Plan
working. I also did the same thing for .bak and it works fine for those. I
am not sure what else I need to do for this. Could someone please help me
out?Perhaps you have some databases for which you are trying to do log backup but the database(s) is/are
in simple recovery mode?
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
http://www.sqlug.se/
"Takia" <Takia@.discussions.microsoft.com> wrote in message
news:320A9D9B-BDBC-4C3B-802A-C61BA5E7F08A@.microsoft.com...
>I have set this to remove .trn files that are older than 4 days and it is not
> working. I also did the same thing for .bak and it works fine for those. I
> am not sure what else I need to do for this. Could someone please help me
> out?
Data base learning resources?
Hello:
I'm a beginner in data bases and I'm looking for data base theory,learning, preactices and another resources. Can you recommend me books, e-books, journals, web sites and communities? I'll aprreciate your help.
Thanks.
You might want to start at the top of the posts; there is a listing here.
Give a look to the discussion here. A number of good books are referenced.
|||My latest book "Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)" (Addison Wesley) is currently holding a 5-star rating on Amazon. It has helped thousands of developers at every skill level from beginner to pro.
I've written a dozen books over the years--many written while I was at Microsoft writing the data access help topics and Data Access Guides for Visual Basic versions 2-5. In my own books I wanted to provide a more independent and comprehensive set of documentation using a style and focus that Microsoft would not permit me to use. Since I focus almost exclusively on Visual Studio and SQL Server readers don’t have to be confused by irrelevant designs or features that don’t apply in their applications.
The 7th Edition is also designed for you--the beginner. It contains content designed to bring your skills up to speed across the wide spectrum of tools and .NET Framework classes you'll need to design, code, build, debug and deploy successful applications and server-side executables. I talk about how to design applications given your and your company's skills, requirements and constraints. I talk about how SQL Server works behind the scenes in a way that makes it easy to understand how to leverage its power. I show how to best use Visual Studio to leverage this power and how to use SQL Server Management Studio and the other SQL Server tools like the Profiler to manage the databases you create. I talk about SQL Server Express, SQL Server Compact Edition and all of the other editions as well, understanding that many readers need to leverage the free versions of SQL Server as they get up to speed or work to prototype a larger application.
Key topic coverage includes:
? Data access architectures and how to choose the best strategy for Windows Forms, ASP.NET, XML Web Services, and SQL Server CLR executables. Where do these make sense and how much will they cost to build and maintain?
? SQL Server and relational database fundamentals and inner-machinery. How does SQL Server work and why is it important that developers know?
? Making the development experience more productive through judicious use of the Visual Studio toolset, and how to know when the wizards can help.
? Using the latest ADO.NET data provider efficiently and safely.
? How to protect the security of your database–and your job–by avoiding common mistakes.
? How to build secure, efficient, scalable applications in less time with fewer resources–how to create faster code faster.
? How to leverage the potential of SQL Server CLR executables and knowing
when these features make sense.
? How to work with your DBA to maintain database integrity and security.
? Working with the new Visual Studio report controls to expose your organization’s data safely and easily with or without leveraging existing SQL Server Reporting Services technology.
The book also contains a GUID that can be used to gain access to the premium area on the book’s unique support website. There I provide additional errata and a question-and-answer area for those needing direct support from me and the other readers. The book includes a DVD that contains a wealth of examples and sample databases that illustrate the points in the book.
I hope this helps.
William Vaughn
Microsoft MVP, Mentor, Author, Dad, Granddad
Data base learning resources?
Hello:
I'm a beginner in data bases and I'm looking for data base theory,learning, preactices and another resources. Can you recommend me books, e-books, journals, web sites and communities? I'll aprreciate your help.
Thanks.
You might want to start at the top of the posts; there is a listing here.
Give a look to the discussion here. A number of good books are referenced.
|||My latest book "Hitchhiker's Guide to Visual Studio and SQL Server (7th Edition)" (Addison Wesley) is currently holding a 5-star rating on Amazon. It has helped thousands of developers at every skill level from beginner to pro.
I've written a dozen books over the years--many written while I was at Microsoft writing the data access help topics and Data Access Guides for Visual Basic versions 2-5. In my own books I wanted to provide a more independent and comprehensive set of documentation using a style and focus that Microsoft would not permit me to use. Since I focus almost exclusively on Visual Studio and SQL Server readers don’t have to be confused by irrelevant designs or features that don’t apply in their applications.
The 7th Edition is also designed for you--the beginner. It contains content designed to bring your skills up to speed across the wide spectrum of tools and .NET Framework classes you'll need to design, code, build, debug and deploy successful applications and server-side executables. I talk about how to design applications given your and your company's skills, requirements and constraints. I talk about how SQL Server works behind the scenes in a way that makes it easy to understand how to leverage its power. I show how to best use Visual Studio to leverage this power and how to use SQL Server Management Studio and the other SQL Server tools like the Profiler to manage the databases you create. I talk about SQL Server Express, SQL Server Compact Edition and all of the other editions as well, understanding that many readers need to leverage the free versions of SQL Server as they get up to speed or work to prototype a larger application.
Key topic coverage includes:
? Data access architectures and how to choose the best strategy for Windows Forms, ASP.NET, XML Web Services, and SQL Server CLR executables. Where do these make sense and how much will they cost to build and maintain?
? SQL Server and relational database fundamentals and inner-machinery. How does SQL Server work and why is it important that developers know?
? Making the development experience more productive through judicious use of the Visual Studio toolset, and how to know when the wizards can help.
? Using the latest ADO.NET data provider efficiently and safely.
? How to protect the security of your database–and your job–by avoiding common mistakes.
? How to build secure, efficient, scalable applications in less time with fewer resources–how to create faster code faster.
? How to leverage the potential of SQL Server CLR executables and knowing
when these features make sense.
? How to work with your DBA to maintain database integrity and security.
? Working with the new Visual Studio report controls to expose your organization’s data safely and easily with or without leveraging existing SQL Server Reporting Services technology.
The book also contains a GUID that can be used to gain access to the premium area on the book’s unique support website. There I provide additional errata and a question-and-answer area for those needing direct support from me and the other readers. The book includes a DVD that contains a wealth of examples and sample databases that illustrate the points in the book.
I hope this helps.
William Vaughn
Microsoft MVP, Mentor, Author, Dad, Granddad
data base in suspend mode
In my sql7 the msdb and one user database are both in suspect mode. This is
the state for several hours so I can assume it will not change.
I suspect the user database is causing msdb to get in suspect mode.
However, I am looking for the information regarding the option to force the
bit causing the suspect mode which will then change the mode.
Thanks,
YancoYaniv,shalom
If you have backup of these databases I'd recommend you to restore it.
Also you can reset the status of suspect database by
UPDATE master..sysdatabases SET status = status ^ 256
WHERE name = 'Database_Name'
Note: It's strongly not recommended to update system tables.
"yaniv" <yanive@.nice.com> wrote in message
news:e7DOr#fnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> Hi,
> In my sql7 the msdb and one user database are both in suspect mode. This
is
> the state for several hours so I can assume it will not change.
> I suspect the user database is causing msdb to get in suspect mode.
> However, I am looking for the information regarding the option to force
the
> bit causing the suspect mode which will then change the mode.
>
> Thanks,
> Yanco
>|||Thanks,
I did not have a recent backup of the user database.
I used sp_configure to allow update to system tbls and then sp_resetstatus
and it did the job for both databases, the next time sql srv started the
status was normal.
I will latter look into the log files try understanding the cause to the
problem.
--
"Uri Dimant" <urid@.iscar.co.il> wrote in message
news:uUQKyCgnDHA.708@.TK2MSFTNGP10.phx.gbl...
> Yaniv,shalom
> If you have backup of these databases I'd recommend you to restore it.
> Also you can reset the status of suspect database by
> UPDATE master..sysdatabases SET status = status ^ 256
> WHERE name = 'Database_Name'
> Note: It's strongly not recommended to update system tables.
>
> "yaniv" <yanive@.nice.com> wrote in message
> news:e7DOr#fnDHA.1708@.TK2MSFTNGP12.phx.gbl...
> > Hi,
> >
> > In my sql7 the msdb and one user database are both in suspect mode. This
> is
> > the state for several hours so I can assume it will not change.
> >
> > I suspect the user database is causing msdb to get in suspect mode.
> >
> > However, I am looking for the information regarding the option to force
> the
> > bit causing the suspect mode which will then change the mode.
> >
> >
> >
> > Thanks,
> > Yanco
> >
> >
>
Data base growth control
or tuneup the MS SQL Server
Quote:
Originally Posted by Ashutosh Keskar
Please anybody can explain how to reduce MDF LDF files size
or tuneup the MS SQL Server
I'm not absolutely sure what you're after but you can change the size and growth properties of both files in Enterprise Manager: right click on the database -> Properties -> Data files and Transaction Log tab.|||Hi Ashutosh Keskar and welcome to TSDN MSSQL Forum,
You can also take a look at the maintenance plan - Enterprise manager -> Server -> Management -> Database Maintenance and see if you are running a job to reorg the data and index pages( may be part of your backup), there is also an option to free unused space.
I cannot guarantee it will help (there is a small chance it could make performance worse) but it is worth a look.
Regards Purple
Data base File is suspect
detached the database , delete the log file and try to attach it again using
enterprise manager however it saying it can't do it.
I have no backup of log or database for the day our backup was also not
working.
What I can do to recover the database.
Thanks for the help
TanweerHi,
Why did you delete the transaction log file before analyzing the cause for
suspect? I feel that cause for the suspect is because some
file (MDF or LDF) was using by some other process (backup or anti virus)
during startup. This would have been easily resolved by
running the system proc sp_resetstatus. Now since you deleted the LDF file
from query analyzer you could try sp_attach_single_file_db (see books online
for usage). If this fails then:-
You could try the below steps to make your database online using MDF file
only. Since in this processes the LDF file willnot be used on startup
(Emergency mode) , the data integrity might be an issue. (This step can be
used if you do not have any backups). Once the database become online move
the objects to a new database using DTS.
Steps:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. Start SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files in start up
Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768 where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO
6. Restart sql server. now the database will be in emergency mode
7. Create a new database and use DTS to copy the objects and data to new
database.
You can use this new database.
Note:
If you have the backup file, it is always recommended to use the backup file
to restore the database. SO that data integrity will be maintained.
.
Thanks
Hari
SQL Server MVP
"Tanweer" <Tanweer@.discussions.microsoft.com> wrote in message
news:F86755A1-3C2A-4CC8-9463-F2E4E5E5F7D6@.microsoft.com...
> My server crashed and when it came back it has database marked as suspect,
> I
> detached the database , delete the log file and try to attach it again
> using
> enterprise manager however it saying it can't do it.
> I have no backup of log or database for the day our backup was also not
> working.
> What I can do to recover the database.
>
> Thanks for the help
> Tanweer|||Have a look here:
http://www.karaszi.com/SQLServer/in..._suspect_db.asp
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
--
"Tanweer" <Tanweer@.discussions.microsoft.com> schrieb im Newsbeitrag
news:F86755A1-3C2A-4CC8-9463-F2E4E5E5F7D6@.microsoft.com...
> My server crashed and when it came back it has database marked as suspect,
> I
> detached the database , delete the log file and try to attach it again
> using
> enterprise manager however it saying it can't do it.
> I have no backup of log or database for the day our backup was also not
> working.
> What I can do to recover the database.
>
> Thanks for the help
> Tanweer
Data base File is suspect
detached the database , delete the log file and try to attach it again using
enterprise manager however it saying it can't do it.
I have no backup of log or database for the day our backup was also not
working.
What I can do to recover the database.
Thanks for the help
Tanweer
Hi,
Why did you delete the transaction log file before analyzing the cause for
suspect? I feel that cause for the suspect is because some
file (MDF or LDF) was using by some other process (backup or anti virus)
during startup. This would have been easily resolved by
running the system proc sp_resetstatus. Now since you deleted the LDF file
from query analyzer you could try sp_attach_single_file_db (see books online
for usage). If this fails then:-
You could try the below steps to make your database online using MDF file
only. Since in this processes the LDF file willnot be used on startup
(Emergency mode) , the data integrity might be an issue. (This step can be
used if you do not have any backups). Once the database become online move
the objects to a new database using DTS.
Steps:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. Start SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files in start up
Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768 where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO
6. Restart sql server. now the database will be in emergency mode
7. Create a new database and use DTS to copy the objects and data to new
database.
You can use this new database.
Note:
If you have the backup file, it is always recommended to use the backup file
to restore the database. SO that data integrity will be maintained.
..
Thanks
Hari
SQL Server MVP
"Tanweer" <Tanweer@.discussions.microsoft.com> wrote in message
news:F86755A1-3C2A-4CC8-9463-F2E4E5E5F7D6@.microsoft.com...
> My server crashed and when it came back it has database marked as suspect,
> I
> detached the database , delete the log file and try to attach it again
> using
> enterprise manager however it saying it can't do it.
> I have no backup of log or database for the day our backup was also not
> working.
> What I can do to recover the database.
>
> Thanks for the help
> Tanweer
|||Have a look here:
http://www.karaszi.com/SQLServer/inf...suspect_db.asp
HTH, Jens Suessmeyer.
http://www.sqlserver2005.de
"Tanweer" <Tanweer@.discussions.microsoft.com> schrieb im Newsbeitrag
news:F86755A1-3C2A-4CC8-9463-F2E4E5E5F7D6@.microsoft.com...
> My server crashed and when it came back it has database marked as suspect,
> I
> detached the database , delete the log file and try to attach it again
> using
> enterprise manager however it saying it can't do it.
> I have no backup of log or database for the day our backup was also not
> working.
> What I can do to recover the database.
>
> Thanks for the help
> Tanweer
Data base File is suspect
detached the database , delete the log file and try to attach it again using
enterprise manager however it saying it can't do it.
I have no backup of log or database for the day our backup was also not
working.
What I can do to recover the database.
Thanks for the help
TanweerHi,
Why did you delete the transaction log file before analyzing the cause for
suspect? I feel that cause for the suspect is because some
file (MDF or LDF) was using by some other process (backup or anti virus)
during startup. This would have been easily resolved by
running the system proc sp_resetstatus. Now since you deleted the LDF file
from query analyzer you could try sp_attach_single_file_db (see books online
for usage). If this fails then:-
You could try the below steps to make your database online using MDF file
only. Since in this processes the LDF file willnot be used on startup
(Emergency mode) , the data integrity might be an issue. (This step can be
used if you do not have any backups). Once the database become online move
the objects to a new database using DTS.
Steps:
1. Create a new database with the same name and same MDF and LDF files
2. Stop sql server and rename the existing MDF to a new one and copy the
original MDF to this location and delete the LDF files.
3. Start SQL Server
4. Now your database will be marked suspect
5. Update the sysdatabases to update to Emergency mode. This will not use
LOG files in start up
Sp_configure "allow updates", 1
go
Reconfigure with override
GO
Update sysdatabases set status = 32768 where name = "BadDbName"
go
Sp_configure "allow updates", 0
go
Reconfigure with override
GO
6. Restart sql server. now the database will be in emergency mode
7. Create a new database and use DTS to copy the objects and data to new
database.
You can use this new database.
Note:
If you have the backup file, it is always recommended to use the backup file
to restore the database. SO that data integrity will be maintained.
.
Thanks
Hari
SQL Server MVP
"Tanweer" <Tanweer@.discussions.microsoft.com> wrote in message
news:F86755A1-3C2A-4CC8-9463-F2E4E5E5F7D6@.microsoft.com...
> My server crashed and when it came back it has database marked as suspect,
> I
> detached the database , delete the log file and try to attach it again
> using
> enterprise manager however it saying it can't do it.
> I have no backup of log or database for the day our backup was also not
> working.
> What I can do to recover the database.
>
> Thanks for the help
> Tanweer|||Have a look here:
http://www.karaszi.com/SQLServer/info_corrupt_suspect_db.asp
--
HTH, Jens Suessmeyer.
--
http://www.sqlserver2005.de
--
"Tanweer" <Tanweer@.discussions.microsoft.com> schrieb im Newsbeitrag
news:F86755A1-3C2A-4CC8-9463-F2E4E5E5F7D6@.microsoft.com...
> My server crashed and when it came back it has database marked as suspect,
> I
> detached the database , delete the log file and try to attach it again
> using
> enterprise manager however it saying it can't do it.
> I have no backup of log or database for the day our backup was also not
> working.
> What I can do to recover the database.
>
> Thanks for the help
> Tanweer
Data base encodings
I am looking to check and set the encoding of the database using sql
commands that work both for SQL-Server and JET.
something equivalent to the postgreSQL commands:
'SHOW server_encoding'
Thanks in advance,
Maartenmaarten (maarten.mostert@.wanadoo.fr) writes:
Quote:
Originally Posted by
I am looking to check and set the encoding of the database using sql
commands that work both for SQL-Server and JET.
>
something equivalent to the postgreSQL commands:
>
'SHOW server_encoding'
In SQL Server you can set the collation per table column if you like.
But there is a default collation for the server, which you can find
with
SELECT serverproperty('Collation')
The default collation for a database can be determined with:
SELECT databasepropertyex('Db', 'Collation')
--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se
Books Online for SQL Server 2005 at
http://www.microsoft.com/technet/pr...oads/books.mspx
Books Online for SQL Server 2000 at
http://www.microsoft.com/sql/prodin...ions/books.mspx