Showing posts with label modify. Show all posts
Showing posts with label modify. Show all posts

Tuesday, March 27, 2012

Change included columns when modifying table

Is there a reason you can't modify included columns when modifying an index on a table?

Well, the primary reason would be due to the fact that adding additional included columns would touch all of the leaf pages in an index, and probably force a fair majority of pages to split multiple times, so in reality most of the time recreating the index from scratch would probably be faster and more efficient once completed. Additionally, a heavy heavy number of disk seeks would be incurred jumping from the position last updated in the index to the table data to read the data to be added and then jump back again.

Basically, I'm sure you'd find that rebuilding the index will almost always give you both faster results, and additionally a more efficient (clean) index when the operation completes.

HTH,

|||I full appreciate that the index needs to be rebuilt, however SSMS manages that for you when you change the columns, clustering, file groups etc. So why can't I change the included columns and SSMS just do a drop_existing.

Thursday, March 22, 2012

change default port

We have a lot of applications dependent upon SQL at the moment. If i change
my default port number of 1433, is there something I need to add/modify to
the existing connection info from my clients or will it just work ?
Using SQL 2KHassan
Yes , you will have to add with connection string
server=MyServer,Portnumber;
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23JS5jIdTFHA.2128@.TK2MSFTNGP14.phx.gbl...
> We have a lot of applications dependent upon SQL at the moment. If i
change
> my default port number of 1433, is there something I need to add/modify to
> the existing connection info from my clients or will it just work ?
> Using SQL 2K
>|||... or us Client Network Utility on the client machines.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:eKIJZChTFHA.2520@.TK2MSFTNGP09.phx.gbl.
.
> Hassan
> Yes , you will have to add with connection string
> server=MyServer,Portnumber;
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23JS5jIdTFHA.2128@.TK2MSFTNGP14.phx.gbl...
> change
>sql

change default port

We have a lot of applications dependent upon SQL at the moment. If i change
my default port number of 1433, is there something I need to add/modify to
the existing connection info from my clients or will it just work ?
Using SQL 2K
Hassan
Yes , you will have to add with connection string
server=MyServer,Portnumber;
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23JS5jIdTFHA.2128@.TK2MSFTNGP14.phx.gbl...
> We have a lot of applications dependent upon SQL at the moment. If i
change
> my default port number of 1433, is there something I need to add/modify to
> the existing connection info from my clients or will it just work ?
> Using SQL 2K
>
|||... or us Client Network Utility on the client machines.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:eKIJZChTFHA.2520@.TK2MSFTNGP09.phx.gbl...
> Hassan
> Yes , you will have to add with connection string
> server=MyServer,Portnumber;
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23JS5jIdTFHA.2128@.TK2MSFTNGP14.phx.gbl...
> change
>

change default port

We have a lot of applications dependent upon SQL at the moment. If i change
my default port number of 1433, is there something I need to add/modify to
the existing connection info from my clients or will it just work ?
Using SQL 2KHassan
Yes , you will have to add with connection string
server=MyServer,Portnumber;
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23JS5jIdTFHA.2128@.TK2MSFTNGP14.phx.gbl...
> We have a lot of applications dependent upon SQL at the moment. If i
change
> my default port number of 1433, is there something I need to add/modify to
> the existing connection info from my clients or will it just work ?
> Using SQL 2K
>|||... or us Client Network Utility on the client machines.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Uri Dimant" <urid@.iscar.co.il> wrote in message news:eKIJZChTFHA.2520@.TK2MSFTNGP09.phx.gbl...
> Hassan
> Yes , you will have to add with connection string
> server=MyServer,Portnumber;
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23JS5jIdTFHA.2128@.TK2MSFTNGP14.phx.gbl...
>> We have a lot of applications dependent upon SQL at the moment. If i
> change
>> my default port number of 1433, is there something I need to add/modify to
>> the existing connection info from my clients or will it just work ?
>> Using SQL 2K
>>
>

Thursday, March 8, 2012

Change attribute value in stored procedure

Can someone show me the syntax (if it is possible) to modify an attribute value in a stored proc? For example if I have an element that is being passed in as text like
<CustomerName id="2" /> Is there SQLXML functionality that I can use to change the 2 to something else (like a 3) depending on a condition? Or do I have to use the built in SQL String parsing funtions (e.g. SUBSTRING) to change the value? Will someone
please let me know? Many Thanks!
There's no XML manipulation functionality built into SQL Server 2000 (other
than shredding the XML into a table, performing your update, and retrieving
it back out as XML again using a FOR XML query - definitely not an efficient
approach!) You could use SUBSTRING as you suggest, but to be honest you'd be
better performing this kind of logic in the client application before
submitting it to the stored procedure (apply a style sheet or use an XML API
like the DOM or the XmlDocument in .NET).
The next release of SQL Server includes some extensions to XQuery that allow
you to modify data within an XML value, which is great if you can wait until
then, but probably of no practical use to you at the moment - sorry!
Cheers,
Graeme
--
Graeme Malcolm
Principal Technologist
Content Master Ltd.
www.contentmaster.com
www.microsoft.com/mspress/books/6137.asp
"vonbrownz" <vonbrownz@.discussions.microsoft.com> wrote in message
news:62DFF8F0-CF80-46E6-8F42-673D8C0E3BFA@.microsoft.com...
Can someone show me the syntax (if it is possible) to modify an attribute
value in a stored proc? For example if I have an element that is being
passed in as text like
<CustomerName id="2" /> Is there SQLXML functionality that I can use to
change the 2 to something else (like a 3) depending on a condition? Or do I
have to use the built in SQL String parsing funtions (e.g. SUBSTRING) to
change the value? Will someone please let me know? Many Thanks!
|||Thanks Graeme! That is exactly what I was looking for.
"Graeme Malcolm" wrote:

> There's no XML manipulation functionality built into SQL Server 2000 (other
> than shredding the XML into a table, performing your update, and retrieving
> it back out as XML again using a FOR XML query - definitely not an efficient
> approach!) You could use SUBSTRING as you suggest, but to be honest you'd be
> better performing this kind of logic in the client application before
> submitting it to the stored procedure (apply a style sheet or use an XML API
> like the DOM or the XmlDocument in .NET).
> The next release of SQL Server includes some extensions to XQuery that allow
> you to modify data within an XML value, which is great if you can wait until
> then, but probably of no practical use to you at the moment - sorry!
> Cheers,
> Graeme
> --
> --
> Graeme Malcolm
> Principal Technologist
> Content Master Ltd.
> www.contentmaster.com
> www.microsoft.com/mspress/books/6137.asp
>
> "vonbrownz" <vonbrownz@.discussions.microsoft.com> wrote in message
> news:62DFF8F0-CF80-46E6-8F42-673D8C0E3BFA@.microsoft.com...
> Can someone show me the syntax (if it is possible) to modify an attribute
> value in a stored proc? For example if I have an element that is being
> passed in as text like
> <CustomerName id="2" /> Is there SQLXML functionality that I can use to
> change the 2 to something else (like a 3) depending on a condition? Or do I
> have to use the built in SQL String parsing funtions (e.g. SUBSTRING) to
> change the value? Will someone please let me know? Many Thanks!
>
>

Wednesday, March 7, 2012

Change "Report is being generated" text

Is there a way to modify or suppress the "Report is being generated" text and
image? I am trying to setup reports in the Report Viewer webpart on a
Sharepoint site (Sharepoint 2007, SQL Server 2005 SP2, Reporting Services in
Sharepoint integrated mode), but do not want the user to see that message.
Any suggestions?
Thanks!
dawI think that I answered my own question in this scenario. There is an
Asynchronous Rendering checkbox in the properties of the webpart. That seems
to solve it.
I would be interested to know if there is a way to do this outside of
Sharepoint. I'm not a programmer, so it may be something obvious.
Thanks!
daw
"daw" wrote:
> Is there a way to modify or suppress the "Report is being generated" text and
> image? I am trying to setup reports in the Report Viewer webpart on a
> Sharepoint site (Sharepoint 2007, SQL Server 2005 SP2, Reporting Services in
> Sharepoint integrated mode), but do not want the user to see that message.
> Any suggestions?
> Thanks!
> daw