I need a query (script) or a tool to obtain a report (or audit report) for
all databases instanced into SQL Server, just for an entittlement review aun
audit reports.
The fields are:
User, role, permissions, last date access
Best regards to everyone.
JosSee:-
SYSPROTECT system table and system procedure SP_HELPROTECT
Thanks
Hari
SQL Server MVP
"Jos Archondo" <jarchondo@.spvs.gov.bo> wrote in message
news:uMv%23UlC1FHA.664@.tk2msftngp13.phx.gbl...
>I need a query (script) or a tool to obtain a report (or audit report) for
> all databases instanced into SQL Server, just for an entittlement review
> aun
> audit reports.
> The fields are:
> User, role, permissions, last date access
> Best regards to everyone.
> Jos
>|||You should also run sp_helplogins. That will help define where
sp_helprotect should be run.
RLF
"Jos Archondo" <jarchondo@.spvs.gov.bo> wrote in message
news:uMv%23UlC1FHA.664@.tk2msftngp13.phx.gbl...
>I need a query (script) or a tool to obtain a report (or audit report) for
> all databases instanced into SQL Server, just for an entittlement review
> aun
> audit reports.
> The fields are:
> User, role, permissions, last date access
> Best regards to everyone.
> Jos
>
Showing posts with label databases. Show all posts
Showing posts with label databases. Show all posts
Wednesday, March 21, 2012
Monday, February 27, 2012
How can I get the name of databases
Hi,
How can I get the name of the databases from SQL 2000, to a combo box.
Thanks
DibSELECT name
FROM master..sysdatabases
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>|||Hi
select [name] from master.dbo.sysdatabases
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>|||A combo box where? VB? ASP? ...?
The query part of it is:
SELECT name FROM master.dbo.sysdatabases ORDER BY name
To populate the combobox using this query, please see a newsgroup dedicated
to whatever technology you are using to create the combobox...
http://www.aspfaq.com/
(Reverse address to reply.)
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>
How can I get the name of the databases from SQL 2000, to a combo box.
Thanks
DibSELECT name
FROM master..sysdatabases
Adam Machanic
SQL Server MVP
http://www.sqljunkies.com/weblog/amachanic
--
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>|||Hi
select [name] from master.dbo.sysdatabases
Regards
--
Mike Epprecht, Microsoft SQL Server MVP
Zurich, Switzerland
IM: mike@.epprecht.net
MVP Program: http://www.microsoft.com/mvp
Blog: http://www.msmvps.com/epprecht/
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>|||A combo box where? VB? ASP? ...?
The query part of it is:
SELECT name FROM master.dbo.sysdatabases ORDER BY name
To populate the combobox using this query, please see a newsgroup dedicated
to whatever technology you are using to create the combobox...
http://www.aspfaq.com/
(Reverse address to reply.)
"Dib" <dNOSPAMshahene@.conNOSPAMsoftware.com> wrote in message
news:uBtHy51IFHA.1392@.TK2MSFTNGP10.phx.gbl...
> Hi,
> How can I get the name of the databases from SQL 2000, to a combo box.
> Thanks
> Dib
>
Friday, February 24, 2012
hOW CAN i GET THE dts PACKAGES TO WORK WITH MSDE
I have masde Installation which have to execute dts packages to connect
to my sql server and load the data to the SQL databases.
Would anyone have any experience with this and know how to make this
work?
to my sql server and load the data to the SQL databases.
Would anyone have any experience with this and know how to make this
work?
Thanking you in anticipation.
Ajay GargDTS works with MSDE in exactly the same way as MSSQL. The only
difference is that MSDE has no graphical client tools, so you don't
have the DTS package designer, but I guess you're probably designing
your packages on MSSQL anyway.
If you have a specific problem with DTS, then you should give more
details about exactly what you're trying to do, what errors or
unexpected results you get and so on. There's also a DTS newsgroup:
microsoft.public.sqlserver.dts.
Simon
Sunday, February 19, 2012
How can I fix bad design?
I've been asked to work on database for my employer. One field in one table
utilizes one of the worst violations of relational databases: multiple value
s
are stored in the same database field. Now I have a varchar(20) field with
values like ADEJG, BFGMR, GJNV etc., where each letter inidates a piece of
information about the record, uniquely identified by a recordID. Is there a
n
easy way to separate all these values out into recordID:value pairs other
than running "...select recordid,'A' where datafield like '%A%' 26 times,
once for each letter a to z?
The only thing I can tell you about the data is that if "A" is present it is
always first and "V" (currently last letter being used) is always last.
Position means nothing and any letter can be in any position save A up to it
s
order in the alphabet.
TIAWhat about something like this (See script below)
You don't have to query on Like A, B, C etc as you can rely on the string
you're interested in being only one character wide.
Let me know how you get on.
Damien
DROP TABLE #tmp
CREATE TABLE #tmp ( record_id INT IDENTITY PRIMARY KEY, multiple_values
VARCHAR(20) NOT NULL )
SET NOCOUNT ON
-- Dummy values for demo
INSERT INTO #tmp ( multiple_values ) VALUES ( 'ADEJG' )
INSERT INTO #tmp ( multiple_values ) VALUES ( 'BFGMR' )
INSERT INTO #tmp ( multiple_values ) VALUES ( 'GJNV' )
-- Create a control table based on the max width of multiple_values
DROP TABLE #control
CREATE TABLE #control ( control_no INT PRIMARY KEY )
DECLARE @.i INT
SET @.i = 1
WHILE @.i <= ( SELECT MAX( LEN ( multiple_values ) ) FROM #tmp )
BEGIN
INSERT INTO #control VALUES ( @.i )
SET @.i = @.i + 1
END
SET NOCOUNT OFF
-- Now, split your combined field into a temp table ( or make it permanent )
DROP TABLE #single_values
CREATE TABLE #single_values ( sv_id INT IDENTITY UNIQUE NOT NULL, record_id
INT NOT NULL, single_value CHAR(1) NOT NULL, PRIMARY KEY( record_id,
single_value ) )
INSERT INTO #single_values ( record_id, single_value )
SELECT t.record_id, SUBSTRING( t.multiple_values, x.control_no, 1 )
FROM #tmp t, #control x
WHERE LEN( t.multiple_values ) >= x.control_no
-- List normalized values
SELECT *
FROM #single_values
"Matthew Speed" wrote:
> I've been asked to work on database for my employer. One field in one tab
le
> utilizes one of the worst violations of relational databases: multiple val
ues
> are stored in the same database field. Now I have a varchar(20) field wi
th
> values like ADEJG, BFGMR, GJNV etc., where each letter inidates a piece of
> information about the record, uniquely identified by a recordID. Is there
an
> easy way to separate all these values out into recordID:value pairs other
> than running "...select recordid,'A' where datafield like '%A%' 26 times,
> once for each letter a to z?
> The only thing I can tell you about the data is that if "A" is present it
is
> always first and "V" (currently last letter being used) is always last.
> Position means nothing and any letter can be in any position save A up to
its
> order in the alphabet.
> TIA
utilizes one of the worst violations of relational databases: multiple value
s
are stored in the same database field. Now I have a varchar(20) field with
values like ADEJG, BFGMR, GJNV etc., where each letter inidates a piece of
information about the record, uniquely identified by a recordID. Is there a
n
easy way to separate all these values out into recordID:value pairs other
than running "...select recordid,'A' where datafield like '%A%' 26 times,
once for each letter a to z?
The only thing I can tell you about the data is that if "A" is present it is
always first and "V" (currently last letter being used) is always last.
Position means nothing and any letter can be in any position save A up to it
s
order in the alphabet.
TIAWhat about something like this (See script below)
You don't have to query on Like A, B, C etc as you can rely on the string
you're interested in being only one character wide.
Let me know how you get on.
Damien
DROP TABLE #tmp
CREATE TABLE #tmp ( record_id INT IDENTITY PRIMARY KEY, multiple_values
VARCHAR(20) NOT NULL )
SET NOCOUNT ON
-- Dummy values for demo
INSERT INTO #tmp ( multiple_values ) VALUES ( 'ADEJG' )
INSERT INTO #tmp ( multiple_values ) VALUES ( 'BFGMR' )
INSERT INTO #tmp ( multiple_values ) VALUES ( 'GJNV' )
-- Create a control table based on the max width of multiple_values
DROP TABLE #control
CREATE TABLE #control ( control_no INT PRIMARY KEY )
DECLARE @.i INT
SET @.i = 1
WHILE @.i <= ( SELECT MAX( LEN ( multiple_values ) ) FROM #tmp )
BEGIN
INSERT INTO #control VALUES ( @.i )
SET @.i = @.i + 1
END
SET NOCOUNT OFF
-- Now, split your combined field into a temp table ( or make it permanent )
DROP TABLE #single_values
CREATE TABLE #single_values ( sv_id INT IDENTITY UNIQUE NOT NULL, record_id
INT NOT NULL, single_value CHAR(1) NOT NULL, PRIMARY KEY( record_id,
single_value ) )
INSERT INTO #single_values ( record_id, single_value )
SELECT t.record_id, SUBSTRING( t.multiple_values, x.control_no, 1 )
FROM #tmp t, #control x
WHERE LEN( t.multiple_values ) >= x.control_no
-- List normalized values
SELECT *
FROM #single_values
"Matthew Speed" wrote:
> I've been asked to work on database for my employer. One field in one tab
le
> utilizes one of the worst violations of relational databases: multiple val
ues
> are stored in the same database field. Now I have a varchar(20) field wi
th
> values like ADEJG, BFGMR, GJNV etc., where each letter inidates a piece of
> information about the record, uniquely identified by a recordID. Is there
an
> easy way to separate all these values out into recordID:value pairs other
> than running "...select recordid,'A' where datafield like '%A%' 26 times,
> once for each letter a to z?
> The only thing I can tell you about the data is that if "A" is present it
is
> always first and "V" (currently last letter being used) is always last.
> Position means nothing and any letter can be in any position save A up to
its
> order in the alphabet.
> TIA
Labels:
database,
databases,
design,
employer,
field,
fix,
microsoft,
mysql,
oracle,
relational,
server,
sql,
tableutilizes,
violations,
worst
Subscribe to:
Posts (Atom)