Showing posts with label type. Show all posts
Showing posts with label type. Show all posts

Tuesday, 14 February 2012

Configuring SQL

hi all,
i want to develop some script to configure sql externally, can anyone
tell me how can i do so? and wether this is possible or not?
the type of configurations that i need, setting sa password, deleting
guest account,Remove sample databases, Audit Login events, Restrict
CmdExec rights to SysAdmins,...
i want to develop a script to enforce the configurations above by
executing this script
any ideas??
> the type of configurations that i need, setting sa password, deleting
> guest account,Remove sample databases, Audit Login events, Restrict
> CmdExec rights to SysAdmins,...
1) sp_password (setting sa password)
2) sp_dropsuer 'guest'
3) drop database 'dbname' (Remove sample databases)
4) Run sql server Profiler (Audit Login events)
5) Read "CmdExec jobs" in the BOL (Restrict CmdExec rights to SysAdmins),
sp_droprolemember system stored procedure
<Eng.Rana@.gmail.com> wrote in message
news:1163934268.329344.18750@.m73g2000cwd.googlegro ups.com...
> hi all,
> i want to develop some script to configure sql externally, can anyone
> tell me how can i do so? and wether this is possible or not?
> the type of configurations that i need, setting sa password, deleting
> guest account,Remove sample databases, Audit Login events, Restrict
> CmdExec rights to SysAdmins,...
> i want to develop a script to enforce the configurations above by
> executing this script
> any ideas??
>
|||Hi
Some of the things you are wanting to do may be configurable during the
installation see
http://msdn2.microsoft.com/en-us/library/ms144259.aspx if using SQL2005. You
may also want to look at using SMO.
John
"Eng.Rana@.gmail.com" wrote:

> hi all,
> i want to develop some script to configure sql externally, can anyone
> tell me how can i do so? and wether this is possible or not?
> the type of configurations that i need, setting sa password, deleting
> guest account,Remove sample databases, Audit Login events, Restrict
> CmdExec rights to SysAdmins,...
> i want to develop a script to enforce the configurations above by
> executing this script
> any ideas??
>
|||thanx John
but actually i don want to do so while installation, i want to run such
a script to recfonfigure the already installed SQLs, to be secure
i'm using SQL 2000
John Bell wrote:[vbcol=seagreen]
> Hi
> Some of the things you are wanting to do may be configurable during the
> installation see
> http://msdn2.microsoft.com/en-us/library/ms144259.aspx if using SQL2005. You
> may also want to look at using SMO.
> John
> "Eng.Rana@.gmail.com" wrote:

Configuring SQL

hi all,

i want to develop some script to configure sql externally, can anyone
tell me how can i do so?? and wether this is possible or not??

the type of configurations that i need, setting sa password, deleting
guest account,Remove sample databases, Audit Login events, Restrict
CmdExec rights to SysAdmins,...

i want to develop a script to enforce the configurations above by
executing this script

any ideas???Have you considered using the Script-Task in the SSIS-package? AFAIK you
can access all functions there and write your Script in VB.NET code.

--
Benedikt Ries
----------------------
Benedikt Ries's Profile: http://www.dbtalk.net/m1098
View this thread: http://www.dbtalk.net/t345220|||Thanx Benedikt :),
plz note i'm using SQL server 2000

any other ideas??

Benedikt Ries wrote:

Quote:

Originally Posted by

Have you considered using the Script-Task in the SSIS-package? AFAIK you
can access all functions there and write your Script in VB.NET code.
>
>
--
Benedikt Ries
----------------------
Benedikt Ries's Profile: http://www.dbtalk.net/m1098
View this thread: http://www.dbtalk.net/t345220

|||Create a batch file that will use OSQL or ISQL, and run all script you
want.
something like :

SET SERVERNAME=XYZ
SET DBNAME=ABC
SET USERNAME=ABC
SET PSW=ABC

ISQLW -U%USERNAME% -P%PSW% -S%SERVERNAME% -d%DBNAME%
-ic:\temp\script1.SQL -oLOGFILE.LOG -FA -n
TYPE LOGFILE.LOG >FULLLOG.LOG

ISQLW -U%USERNAME% -P%PSW% -S%SERVERNAME% -d%DBNAME%
-ic:\temp\script3.SQL -oLOGFILE.LOG -FA -n
TYPE LOGFILE.LOG >FULLLOG.LOG

Eng.Rana@.gmail.com wrote:

Quote:

Originally Posted by

Thanx Benedikt :),
plz note i'm using SQL server 2000
>
any other ideas??
>
>
Benedikt Ries wrote:

Quote:

Originally Posted by

Have you considered using the Script-Task in the SSIS-package? AFAIK you
can access all functions there and write your Script in VB.NET code.

--
Benedikt Ries
----------------------
Benedikt Ries's Profile: http://www.dbtalk.net/m1098
View this thread: http://www.dbtalk.net/t345220