Showing posts with label enable. Show all posts
Showing posts with label enable. Show all posts

Friday, March 9, 2012

OO storage? How to store large graphs and enable efficient graph operations?

Storing large graph in relational form doesn't allow us to perform graph operations such as shortest path quite efficiently. I'm wondering if storing the graph as objects would be better? How should I design the schema? Thanks!There is an entire chapter (ch.9) dedicated to graphs, hierachies, etc. in Itzik's book. Highly recommend it.

http://www.amazon.com/Inside-Microsoft-SQL-Server-2005/dp/0735623139/ref=pd_sim_b_2/002-5855731-9288849?ie=UTF8&qid=1172821634&sr=8-4|||THanks, oj. But ch 9 is Transactions. Is that what you meant?|||No. Chapter 9 is about graphs, trees, hierachies, and recursive queries. Did I post the wrong url for T-SQL Querying book?|||this is what I found of this book:

Inside Microsoft SQL Server 2005: T-SQL

Programming

byItzik Ben-Gan,

Dejan SarkaandRoger Wolter

Microsoft Press

2006 (532 pages)

ISBN:0735621977

Written by a T-SQL guru, this thorough, hands-on

reference for database developers and administrators focuses on language

features and how they are interpreted and processed by the SQL Server execution

engine.


Table of Contents

Inside Microsoft SQL Server 2005— T-SQL Programming

Foreword

Preface

Introduction

Chapter 1

-

Datatype-Related Problems, XML, and CLR

UDTs

Chapter 2

-

Temporary Tables and Table

Variables

Chapter 3

-

Cursors

Chapter 4

-

Dynamic SQL

Chapter 5

-

Views

Chapter 6

-

User-Defined

Functions

Chapter 7

-

Stored

Procedures

Chapter 8

-

Triggers

Chapter 9

-

Transactions

Chapter 10

-

Exception

Handling

Chapter 11

-

Service Broker

Appendix A

-

Companion to CLR

Routines

Index

List of Figures

List of Tables

List of Listings

List of Sidebars

|||No. You want T-SQL QUERYING (not programming).

Wednesday, March 7, 2012

Only see my local server in my parter server list

Hello,
I'm trying to enable Subscribers to synchronize with alternate publisher,
I go to the properties of the publication and then to sync partners, then I
enable the Allow Subscribers to synchronize with other partners than the
Publisher from which the subscription was created, but the only server that
I see is my local server. Do I have to do something else in order to make
my two SQL servers partners?
Thank you very much in advance,
Marlene A. Roman
Register the other server in Enterprise Manager.
Mike
Principal Mentor
Solid Quality Learning
"More than just Training"
SQL Server MVP
http://www.solidqualitylearning.com
http://www.mssqlserver.com
|||you also have to run sp_addmergealternatepublisher on your subscriber and
configure your merge publication to allow synchronization with alternate
sync partners by setting @.allow_synctoalternate to true on
sp_addmergepublication.
"Michael Hotek" <mhotek@.nomail.com> wrote in message
news:uG5KSPmLEHA.4052@.TK2MSFTNGP11.phx.gbl...
> Register the other server in Enterprise Manager.
> --
> Mike
> Principal Mentor
> Solid Quality Learning
> "More than just Training"
> SQL Server MVP
> http://www.solidqualitylearning.com
> http://www.mssqlserver.com
>

Saturday, February 25, 2012

Only enable the string truncation prevention of ANSI_WARNINGS

I'm working with some long standing VB/SQL Server applications and for
the second time we've suffered from having the parameters to a stored
procedure call get silently truncated now that the data field has got
much larger than when the code was developed all those years ago. This
is always very hard to debug and I'd really like SQL Server to throw
an error when this happens.

I don't feel confident enablying the full ANSI_WARNINGS as it is
likely to affect lots of functionality in the database in
unanticipated ways.

What I'd like to be able to do is enable only the ANSI check for the
string data getting truncated but haven't been able to find a way to
do this. Is it possible?

Cheers
Dave"David Sharp" <dave@.daveandcaz.freeserve.co.uk> wrote in message
news:ca434844.0401080924.40dd7da1@.posting.google.c om...
> I'm working with some long standing VB/SQL Server applications and for
> the second time we've suffered from having the parameters to a stored
> procedure call get silently truncated now that the data field has got
> much larger than when the code was developed all those years ago. This
> is always very hard to debug and I'd really like SQL Server to throw
> an error when this happens.
> I don't feel confident enablying the full ANSI_WARNINGS as it is
> likely to affect lots of functionality in the database in
> unanticipated ways.
> What I'd like to be able to do is enable only the ANSI check for the
> string data getting truncated but haven't been able to find a way to
> do this. Is it possible?
> Cheers
> Dave

There's no 'subset' of ANSI_WARNINGS which will only raise an error on
string truncation, so your best bet is to fix your application, either by
making the stored proc parameter longer, or by validating the input in the
front end.

If neither of those are possible, then there aren't many options left,
except perhaps to raise an error if the parameter value is the same size as
the maximum possible size of the parameter data type. So if you have
char(20), assume that only values up to 19 characters are valid. But it
would be much better to fix the problem at the source, and validate the
input.

Simon|||David Sharp (dave@.daveandcaz.freeserve.co.uk) writes:
> I'm working with some long standing VB/SQL Server applications and for
> the second time we've suffered from having the parameters to a stored
> procedure call get silently truncated now that the data field has got
> much larger than when the code was developed all those years ago. This
> is always very hard to debug and I'd really like SQL Server to throw
> an error when this happens.
> I don't feel confident enablying the full ANSI_WARNINGS as it is
> likely to affect lots of functionality in the database in
> unanticipated ways.
> What I'd like to be able to do is enable only the ANSI check for the
> string data getting truncated but haven't been able to find a way to
> do this. Is it possible?

To add to what Simon said, you would probably have any use for ANSI_WARNINGS
anyway. ANSI_WARNINGS produces an error if you try to assign a column
a value which is too long. However, variable and parameter assignment
still truncates silently, even with ANSI_WARNINGS ON.

I would however encourage you to switch to ANSI_WARNINGS for other reasons.
This setting is required is some contexts, more precisely in distributed
queries and when you used indexed views and indexed computed columns.

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

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp|||Erland Sommarskog <sommar@.algonet.se> wrote in message news:<Xns946B48FD1863Yazorman@.127.0.0.1>...
> I would however encourage you to switch to ANSI_WARNINGS for other reasons.
> This setting is required is some contexts, more precisely in distributed
> queries and when you used indexed views and indexed computed columns.

Thanks for your help. Sounds like there's no short cut to identify
when this happens. We'll have to physically go through and make sure
it is checked for in each sproc.

Cheers
Dave