Showing posts with label scripts. Show all posts
Showing posts with label scripts. Show all posts

Monday, March 26, 2012

Encryption in SQL Server 2005.

Can anyone tell me what is the best approach for Encyrption in SQLServer 200
5
? If there is any sample scripts that you link me to. Thanks,
Sam.
Message posted via http://www.droptable.comHow much of your data are you encrypting?
"SAM via droptable.com" <u33747@.uwe> wrote in message
news:7c011375421da@.uwe...
> Can anyone tell me what is the best approach for Encyrption in SQLServer
> 2005
> ? If there is any sample scripts that you link me to. Thanks,
> Sam.
> --
> Message posted via http://www.droptable.com
>|||I need to encrypt 2 colums in a table.Which contains the SQL login and the
password. The record count is around 100.
Decryption should be done by specific sql user /or role /or a Window Active
directory login. Any help would be appreciated. Thanks
Mike C# wrote:[vbcol=seagreen]
>How much of your data are you encrypting?
>
Message posted via http://www.droptable.com|||Check this out
Simple demo for how to encrypt and decrypt a table column in SQL Server 2005
http://blogs.msdn.com/lcris/archive.../09/427523.aspx
This uses the concept of keys in SQL Server 2005 with samples
"Prem via droptable.com" <u33747@.uwe> wrote in message
news:7c01762276e56@.uwe...
>I need to encrypt 2 colums in a table.Which contains the SQL login and the
> password. The record count is around 100.
> Decryption should be done by specific sql user /or role /or a Window
> Active
> directory login. Any help would be appreciated. Thanks
>
> Mike C# wrote:
> --
> Message posted via http://www.droptable.com
>

Wednesday, March 7, 2012

Enabling the UnRestricted File Growth option using Query

Hello,
Can any one help me by providing me the scripts to Enable the
UNRESTRICTED FILE GROWTH FOR A DATABASE.
As i dont have access for the enterprise manage to open and do it
Thanks in Advance
Please it is very urgent
Cheers,
SaranALTER DATABASE Test1
MODIFY FILE
(NAME = test1dat3,
MAXSIZE = UNLIMITED,
FILEGROWTH = 10%)
GO
HTH. Ryan
<csesaravana@.gmail.com> wrote in message
news:1147705749.879232.101310@.j73g2000cwa.googlegroups.com...
> Hello,
> Can any one help me by providing me the scripts to Enable the
> UNRESTRICTED FILE GROWTH FOR A DATABASE.
> As i dont have access for the enterprise manage to open and do it
> Thanks in Advance
> Please it is very urgent
> Cheers,
> Saran
>|||Saran,
Use "alter database" statement.
Example:
use master
go
exec sp_helpdb northwind
go
alter database northwind
modify file (name=Northwind, MAXSIZE = 100MB)
go
exec sp_helpdb northwind
go
alter database northwind
modify file (name=Northwind, MAXSIZE = UNLIMITED)
go
exec sp_helpdb northwind
go
AMB|||Thanks for your reply
But when i try to execute the following query ,,
alter database D0015c0c_des
modify file (name=D0015c0c_des_data, MAXSIZE = UNLIMITED)
go
The following Error message is displayed
Server: Msg 226, Level 16, State 6, Line 1
ALTER DATABASE statement not allowed within multi-statement
transaction.
Please help me...
Thanks and Regards,
Saran|||Where do you execute this command? Query Analyzer? SQL Server Management Studio? Visual Studio?
Bottom line is that you seem to have opened a transaction when you execute this command, and the
error message clearly states that you cannot execute this command inside a transaction.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Saran" <csesaravana@.gmail.com> wrote in message
news:1147709905.925400.202260@.i40g2000cwc.googlegroups.com...
> Thanks for your reply
> But when i try to execute the following query ,,
> alter database D0015c0c_des
> modify file (name=D0015c0c_des_data, MAXSIZE = UNLIMITED)
> go
>
> The following Error message is displayed
> Server: Msg 226, Level 16, State 6, Line 1
> ALTER DATABASE statement not allowed within multi-statement
> transaction.
>
> Please help me...
> Thanks and Regards,
> Saran
>|||Thanks for ur reply!
I have solved the issues
Thank you once again for your help!!
Regards,
Saran

Enabling the UnRestricted File Growth option using Query

Hello,
Can any one help me by providing me the scripts to Enable the
UNRESTRICTED FILE GROWTH FOR A DATABASE.
As i dont have access for the enterprise manage to open and do it
Thanks in Advance
Please it is very urgent
Cheers,
SaranALTER DATABASE Test1
MODIFY FILE
(NAME = test1dat3,
MAXSIZE = UNLIMITED,
FILEGROWTH = 10%)
GO
HTH. Ryan
<csesaravana@.gmail.com> wrote in message
news:1147705749.879232.101310@.j73g2000cwa.googlegroups.com...
> Hello,
> Can any one help me by providing me the scripts to Enable the
> UNRESTRICTED FILE GROWTH FOR A DATABASE.
> As i dont have access for the enterprise manage to open and do it
> Thanks in Advance
> Please it is very urgent
> Cheers,
> Saran
>|||Saran,
Use "alter database" statement.
Example:
use master
go
exec sp_helpdb northwind
go
alter database northwind
modify file (name=Northwind, MAXSIZE = 100MB)
go
exec sp_helpdb northwind
go
alter database northwind
modify file (name=Northwind, MAXSIZE = UNLIMITED)
go
exec sp_helpdb northwind
go
AMB|||Thanks for your reply
But when i try to execute the following query ,,
alter database D0015c0c_des
modify file (name=D0015c0c_des_data, MAXSIZE = UNLIMITED)
go
The following Error message is displayed
Server: Msg 226, Level 16, State 6, Line 1
ALTER DATABASE statement not allowed within multi-statement
transaction.
Please help me...
Thanks and Regards,
Saran|||Where do you execute this command? Query Analyzer? SQL Server Management Stu
dio? Visual Studio?
Bottom line is that you seem to have opened a transaction when you execute t
his command, and the
error message clearly states that you cannot execute this command inside a t
ransaction.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"Saran" <csesaravana@.gmail.com> wrote in message
news:1147709905.925400.202260@.i40g2000cwc.googlegroups.com...
> Thanks for your reply
> But when i try to execute the following query ,,
> alter database D0015c0c_des
> modify file (name=D0015c0c_des_data, MAXSIZE = UNLIMITED)
> go
>
> The following Error message is displayed
> Server: Msg 226, Level 16, State 6, Line 1
> ALTER DATABASE statement not allowed within multi-statement
> transaction.
>
> Please help me...
> Thanks and Regards,
> Saran
>|||Thanks for ur reply!
I have solved the issues
Thank you once again for your help!!
Regards,
Saran

Enabling SQL Server Agent by using scripts

Hi NG,
how do I have to enable the SQL Server Agent by using command line scripts
(without the Enterprise Manager). According to SQLServer books online the
command line command sqlagent should only be used for diagnostic purposes.
thanks for help, reneRene,
To start SQL Server Agent from the commandline you can do this:
net start sqlserveragent
--
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Re Fo wrote:
> Hi NG,
> how do I have to enable the SQL Server Agent by using command line scripts
> (without the Enterprise Manager). According to SQLServer books online the
> command line command sqlagent should only be used for diagnostic purposes.
> thanks for help, rene
>|||Thanks,
can I set it somewhere in the registry that the service will alwyas be
started, as I can set it in the Services properties?
Thanks for help, rene
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:ec0Gbwf4EHA.1976@.TK2MSFTNGP09.phx.gbl...
> Rene,
> To start SQL Server Agent from the commandline you can do this:
> net start sqlserveragent
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Re Fo wrote:
> > Hi NG,
> >
> > how do I have to enable the SQL Server Agent by using command line
scripts
> > (without the Enterprise Manager). According to SQLServer books online
the
> > command line command sqlagent should only be used for diagnostic
purposes.
> >
> > thanks for help, rene
> >
> >|||There are two places you can do this.
1)
Enterprise Manager-->General Tab, Tick AutoStart SQL Server Agent
2)
In Services Control Panel Applet, you can set the SQLServerAgent service
to AutoStart.
or if these don't work, you could even do this:
3)
CREATE PROC sp_startagent
AS
exec master..xp_cmdshell 'net start sqlserveragent', no_output
GO
exec sp_procoption N'sp_startagent', N'startup', N'true'
GO
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Re Fo wrote:
> Thanks,
> can I set it somewhere in the registry that the service will alwyas be
> started, as I can set it in the Services properties?
> Thanks for help, rene
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
> news:ec0Gbwf4EHA.1976@.TK2MSFTNGP09.phx.gbl...
>>Rene,
>>To start SQL Server Agent from the commandline you can do this:
>>net start sqlserveragent
>>--
>>Mark Allison, SQL Server MVP
>>http://www.markallison.co.uk
>>Looking for a SQL Server replication book?
>>http://www.nwsu.com/0974973602m.html
>>
>>Re Fo wrote:
>>Hi NG,
>>how do I have to enable the SQL Server Agent by using command line
> scripts
>>(without the Enterprise Manager). According to SQLServer books online
> the
>>command line command sqlagent should only be used for diagnostic
> purposes.
>>thanks for help, rene
>>
>
>

Enabling SQL Server Agent by using scripts

Hi NG,
how do I have to enable the SQL Server Agent by using command line scripts
(without the Enterprise Manager). According to SQLServer books online the
command line command sqlagent should only be used for diagnostic purposes.
thanks for help, rene
Rene,
To start SQL Server Agent from the commandline you can do this:
net start sqlserveragent
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Re Fo wrote:
> Hi NG,
> how do I have to enable the SQL Server Agent by using command line scripts
> (without the Enterprise Manager). According to SQLServer books online the
> command line command sqlagent should only be used for diagnostic purposes.
> thanks for help, rene
>
|||Thanks,
can I set it somewhere in the registry that the service will alwyas be
started, as I can set it in the Services properties?
Thanks for help, rene
"Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
news:ec0Gbwf4EHA.1976@.TK2MSFTNGP09.phx.gbl...[vbcol=seagreen]
> Rene,
> To start SQL Server Agent from the commandline you can do this:
> net start sqlserveragent
> --
> Mark Allison, SQL Server MVP
> http://www.markallison.co.uk
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602m.html
>
> Re Fo wrote:
scripts[vbcol=seagreen]
the[vbcol=seagreen]
purposes.[vbcol=seagreen]
|||There are two places you can do this.
1)
Enterprise Manager-->General Tab, Tick AutoStart SQL Server Agent
2)
In Services Control Panel Applet, you can set the SQLServerAgent service
to AutoStart.
or if these don't work, you could even do this:
3)
CREATE PROC sp_startagent
AS
exec master..xp_cmdshell 'net start sqlserveragent', no_output
GO
exec sp_procoption N'sp_startagent', N'startup', N'true'
GO
Mark Allison, SQL Server MVP
http://www.markallison.co.uk
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602m.html
Re Fo wrote:
> Thanks,
> can I set it somewhere in the registry that the service will alwyas be
> started, as I can set it in the Services properties?
> Thanks for help, rene
> "Mark Allison" <marka@.no.tinned.meat.mvps.org> wrote in message
> news:ec0Gbwf4EHA.1976@.TK2MSFTNGP09.phx.gbl...
>
> scripts
>
> the
>
> purposes.
>
>