Showing posts with label related. Show all posts
Showing posts with label related. Show all posts

Thursday, March 22, 2012

Book recommendations?

I do software support for software that works with both Oracle and SQL
Server, so I mostly just write queries to look at the data related to
the software. When I first started, I bought a couple of books to learn
the basics, intentionally going with generic books that would help with
both types of databases. I've got the basics down, and now I'm looking
for a really detailed reference book that goes really indepth into
querying for SQL Server specifically. Currently, we only work with the
2000 version, but we'll be going to 2005 soon, so I think I'd rather go
with a book on 2005, although if you know one that covers the
differences between them, that would be great. Any recommendations?

Besides just writing queries, I'd also like to learn more about SQL
Server in general. DBA software support, so I'd like to head my
career in that direction. I was looking at Microsoft's new
certification path for SQL 2005. Given that my company won't pay to
send me for training, and I really don't want to have to put down
$2200+ to pay for a class, I was thinking that I might be able to learn
enough on my own to pass the first test and get the MCTS title. I
ordered the Training Kit from Microsoft Press for that, which comes
with a 180 day trial of SQL Server 2005 to play with, along with a huge
book. Does anyone have any other recommendations for resources to help
learn this stuff?

--Richardblueghost73@.yahoo.com (blueghost73@.yahoo.com) writes:

Quote:

Originally Posted by

I do software support for software that works with both Oracle and SQL
Server, so I mostly just write queries to look at the data related to
the software. When I first started, I bought a couple of books to learn
the basics, intentionally going with generic books that would help with
both types of databases. I've got the basics down, and now I'm looking
for a really detailed reference book that goes really indepth into
querying for SQL Server specifically. Currently, we only work with the
2000 version, but we'll be going to 2005 soon, so I think I'd rather go
with a book on 2005, although if you know one that covers the
differences between them, that would be great. Any recommendations?


The ultimate book on writing queries on SQL 2005 simply must be "Inside
T-SQL Querying" by Itzik Ben-Gan on Microsoft Press. If there is a problem
he can't write a query for, then there is simple is no query to write - or
the query is not worth writing. I'm just about to read the book myself,
so I cannot say how much he compares with SQL 2000.

--
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|||According to Amazon, Ken Henderson is not even planning to release a
book about 2005 yet. What a pity.|||Erland Sommarskog wrote:

Quote:

Originally Posted by

>
The ultimate book on writing queries on SQL 2005 simply must be "Inside
T-SQL Querying" by Itzik Ben-Gan on Microsoft Press.


Here's a link to the book:
http://www.microsoft.com/MSPress/books/9615.asp
and the actual title is:
"Inside Microsoft SQL Server 2005: T-SQL Querying"|||metaperl wrote:

Quote:

Originally Posted by

Erland Sommarskog wrote:
>

Quote:

Originally Posted by


The ultimate book on writing queries on SQL 2005 simply must be "Inside
T-SQL Querying" by Itzik Ben-Gan on Microsoft Press.


>
Here's a link to the book:
http://www.microsoft.com/MSPress/books/9615.asp
>
and the actual title is:
"Inside Microsoft SQL Server 2005: T-SQL Querying"


So apparently, there's a consensus that this is THE book for T-SQL.
That's just odd. I've been using Usenet for 15 years, and I've never
seen an agreement before. Where's the usual flame war? :P

In looking into this book, I noticed that the author posted some
comments on amazon.com that the rest of you might be interested in.
Here they are:

--
FAQ - what's the difference between the two books ("T-SQL Querying" and
"T-SQL Programming")?

I often get this question, so I'll use this opportunity to clarify
things.

The original intention was to cover T-SQL Querying and Programming in
one book, but we realized that it would end up with 1,200 - 1,300
pages. So we decided to split the content into two books. You can think
of T-SQL Querying as Volume 1 and of T-SQL Programming as Volume 2.

T-SQL Querying focuses on querying and query tuning/optimization.
T-SQL Programming focuses on programmatic constructs (T-SQL and CLR
routines, XML, Service Broker, Dynamic SQL, Cursors, etc.).

Make sure you read T-SQL Querying before T-SQL Programming.

Here's the TOC for T-SQL Querying:
Chapter 01 - Logical Query Processing
Chapter 02 - Physical Query Processing
Chapter 03 - Query Tuning
Chapter 04 - Subqueries, Table Expressions and Ranking Functions
Chapter 05 - Joins and Set Operations
Chapter 06 - Aggregating and Pivoting Data
Chapter 07 - TOP and APPLY
Chapter 08 - Data Modification
Chapter 09 - Graphs, Trees, Hierarchies and Recursive Queries
Appendix A - Logic Puzzles

And here's the TOC for T-SQL Programming:
Chapter 01 - Datatype Related Problems, XML, and CLR UDTs
Chapter 02 - Temporary Tables and Table Variables
Chapter 03 - Cursors
Chapter 04 - Dynamic SQL
Chapter 05 - Views

T-SQL and CLR Routines:
Chapter 06 - User Defined Functions
Chapter 07 - Stored Procedures
Chapter 08 - Triggers

Chapter 09 - Transactions
Chapter 10 - Exception Handling
Chapter 11 - Service Broker
Appendix A - Companion to CLR Routines

Let me know if you have any questions.

Itzik
--
Hi all,

You can find detailed info about the book at www.insidetsql.com
including: TOC, Sample Chapters (just uploaded), Source Code, Links to
Related Resources, Corrections, Letter to the Reader, Author BIOs.
Please let me know if the organization of the website is convenient for
you or if you think that some things should be changed/added. Also, I'd
be glad to get any comments/questions regarding the book. You can
contact me through the website or through
itzik@.solidqualitylearning.com.

Cheers,
Itzik
--sql

Monday, March 19, 2012

blocks hangup database when inserting in 1 specific table

Hi,

We use a database with about 40 related tables. Some tables contain as
much as 30.000 records. We use Access97 as an interface to the
database. Now recently we have the problem that when we want to insert
a row in one specific table (alwasy the same) the database makes
blocks.

Details:
- about 10% of the data was inserted using copying from Excel, before
this action there was no problem, though there is no evidence that
this causes the problem.
- inserting rows via the Query Analyzer works fine, via Access causes
trouble.
- the tempdb lofile has grown to 48Mb.

Has anyone ideas about what is going on and what I can do to solve the
problem?

TAV,
Jan WillemsJan Willems (jwillems@.xs4all.nl) writes:
> We use a database with about 40 related tables. Some tables contain as
> much as 30.000 records. We use Access97 as an interface to the
> database. Now recently we have the problem that when we want to insert
> a row in one specific table (alwasy the same) the database makes
> blocks.

"Makes blocks"? You mean that the INSERT operation is blocked, and you
have to cancel the operation to continue?

When the situation occurs, use sp_who from Query Analyzer, and see if
any process has a non-zero value in the Blk column. In such case, the
process listed in Blk, blocks the spid of that row.

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

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

Sunday, February 19, 2012

Blank Password Policy problem

Hi all,

We recently started to receive complaints about our install project not
working and giving and shitload of error messages related to SQL. We
later found out that the problem was the users we were trying to bind
to we're not created because of the domain password policy feature
implemented into SQL Server 2005.

After much dabbling around the SQL scripts that created the database
structure, we came to the conclusion that only this piece of code could
correct our problem :

CREATE LOGIN mynewuser WITH PASSWORD = '', CHECK_POLICY = OFF,
CHECK_EXPIRATION = OFF

This runs perfectly fine on SQL2005, but not on SQL2000. We have been
searching for a way to have code in SQL files executed on install that
doesn't fail to compile when run against the server and that will
bypass the password policy in case it's a SQL Server 2005...

Right now we are testing a feature available in MSI that can filter
scripts not matching a database version, but the problem with this, is
that we are missing a lot of features that InstallShield has. In short,
we need Help to fix this issue and be able to continue with
development.

In hopes to receive a a prompt anwserOh and by the way, the SQL2000 code we use is the following:

exec sp_addlogin N'mynewuser', null, @.logindb, @.loginlang

PS : @.logindb and @.loginlang are valid variables that contain correct
info for this SP to work|||crazyone wrote:

Quote:

Originally Posted by

Oh and by the way, the SQL2000 code we use is the following:
>
exec sp_addlogin N'mynewuser', null, @.logindb, @.loginlang
>
PS : @.logindb and @.loginlang are valid variables that contain correct
info for this SP to work


Why not just set a sensible password to start with? The same password
for each login if you like (anything must be better than a blank
password). Have you ever had a security audit?

Otherwise I think having two versions of your code may be your only
option.

--
David Portas, SQL Server MVP

Whenever possible please post enough code to reproduce your problem.
Including CREATE TABLE and INSERT statements usually helps.
State what version of SQL Server you are using and specify the content
of any error messages.

SQL Server Books Online:
http://msdn2.microsoft.com/library/...US,SQL.90).aspx
--|||My boss produced the code linking to the database with THAT user, it's
a read-only user but doesn't have password. I don't feel it's safe too,
but my boss doesn't want to recode the app to change the password, but
he does want me to spend (up to now) 20 hours to remake the install
software and the sql scripts... strange no?