Showing posts with label thereis. Show all posts
Showing posts with label thereis. Show all posts

Thursday, February 16, 2012

Changing file grouth automaticly

Hello there
Is there a way to build sql script that changes all the file growth of all
the databases in the current server?Roy Goldhammer a crit :
> Hello there
> Is there a way to build sql script that changes all the file growth of all
> the databases in the current server?
>
use the hidden procedure sp_MSforeachdb and inside the string use the
character ? in place of db name.
A +
Frdric BROUARD, MVP SQL Server, expert bases de donnes et langage SQL
Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
Audit, conseil, expertise, formation, modlisation, tuning, optimisation
********************* http://www.datasapiens.com ***********************|||Whell SQLPro
I can't find any help on this store procedure.
Can you give me the exact syntax for using sp_MSforeachdb?
"SQLpro [MVP]" <brouardf@.club-internet.fr> wrote in message
news:%23tHAQnDTGHA.5172@.TK2MSFTNGP12.phx.gbl...
> Roy Goldhammer a crit :
> use the hidden procedure sp_MSforeachdb and inside the string use the
> character ? in place of db name.
> A +
> --
> Frdric BROUARD, MVP SQL Server, expert bases de donnes et langage SQL
> Le site sur le langage SQL et les SGBDR : http://sqlpro.developpez.com
> Audit, conseil, expertise, formation, modlisation, tuning, optimisation
> ********************* http://www.datasapiens.com ***********************|||It's actually not hidden, and can be found in the master database. However,
it is not documented (at least not officially).
http://www.dbazine.com/sql/sql-articles/larsen5
http://groups.google.com/groups?q=sp_MSforeachdb&hl=en
"Roy Goldhammer" <roy@.hotmail.com> wrote in message
news:eXRt70DTGHA.2088@.TK2MSFTNGP14.phx.gbl...
> Whell SQLPro
> I can't find any help on this store procedure.
> Can you give me the exact syntax for using sp_MSforeachdb?
> "SQLpro [MVP]" <brouardf@.club-internet.fr> wrote in message
> news:%23tHAQnDTGHA.5172@.TK2MSFTNGP12.phx.gbl...
>

Changing Fiirst Letter to capital

Hello there
Is there a simple way to change first letter on string to capital letter?[Reposted, as posts from outside msnews.microsoft.com does not seem to make
it in.]
Roy Goldhammer (roy@.hotmail.com) writes:
> Is there a simple way to change first letter on string to capital letter?
SELECT upper(substring(strcol, 1, 1)) + substring(strcol, 2, len(strcol))
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.seBooks Online for SQL
Server 2005
athttp://www.microsoft.com/technet/prodtechnol/sql/2005/downloads/books.mspx
Books Online for SQL Server 2000
athttp://www.microsoft.com/sql/prodinfo/previousversions/books.mspx

Changing Fiirst Letter to capital

Hello there
Is there a simple way to change first letter on string to capital letter?"Roy Goldhammer" <roy@.hotmail.com> wrote

> Is there a simple way to change first letter on string to capital letter?
write user-defined function.
CREATE FUNCTION dbo.FirstCapital (@.str VARCHAR(255))
RETURNS VARCHAR(255)
AS
BEGIN
DECLARE @.FirstLetter CHAR(1)
SET @.FirstLetter = LEFT(@.str,1)
IF @.FirstLetter between 'a' and 'z'
SET @.FirstLetter = CHAR(ASCII(@.FirstLetter) + (ASCII('A') - ASCII('a')))
SET @.str = @.FirstLetter +RIGHT(@.str, LEN(@.str)-1)
RETURN @.str
END
Then
SELECT dbo.FirstCapital ('test string')|||didn't wake up yet
CREATE FUNCTION dbo.FirstCapital (@.str VARCHAR(255))
RETURNS VARCHAR(255)
AS
BEGIN
RETURN UPPER(LEFT(@.str,1))+RIGHT(@.str, LEN(@.str)-1)
END
"Anatoli Dontsov" <Anatoli@.dontsov.com> wrote in message
news:eJ9pjtOUGHA.5808@.TK2MSFTNGP12.phx.gbl...
> "Roy Goldhammer" <roy@.hotmail.com> wrote
>
> write user-defined function.
> CREATE FUNCTION dbo.FirstCapital (@.str VARCHAR(255))
> RETURNS VARCHAR(255)
> AS
> BEGIN
> DECLARE @.FirstLetter CHAR(1)
> SET @.FirstLetter = LEFT(@.str,1)
> IF @.FirstLetter between 'a' and 'z'
> SET @.FirstLetter = CHAR(ASCII(@.FirstLetter) + (ASCII('A') - ASCII('a')))
> SET @.str = @.FirstLetter +RIGHT(@.str, LEN(@.str)-1)
> RETURN @.str
> END
>
> Then
> SELECT dbo.FirstCapital ('test string')
>