473,405 Members | 2,300 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

How to export SQL Database properties

Hello there,

I have about 30 sql servers runnign multiple databases amd i need to
audit them so what i want to do is to log onto each server and then
maybe export the database properties into an excel sheet or text file.

Anyone know how to do that i am quite new to sql any help will be
awesome.

Regards and thanx in advance

Nov 27 '06 #1
2 7242
Do a select from the sysdatabases table in the master database. All
the database property information is there. You may need to look up
sysdatabases in Books Online to interpret the status column.

Joe

Guvnor wrote:
Hello there,

I have about 30 sql servers runnign multiple databases amd i need to
audit them so what i want to do is to log onto each server and then
maybe export the database properties into an excel sheet or text file.

Anyone know how to do that i am quite new to sql any help will be
awesome.

Regards and thanx in advance
Nov 27 '06 #2
Hi.

I will suggest to you a solution that isn't the best but it works.
This is "static solution", because you must to have standardized xls
document with columns that you want to export.

I will show you solution without Integration services (you can try with IS).

There are a few steps that you must process:
1. Execute this script to enable requirement for openrowset (export data
to excel with query):
2. Create xls document and put columns into it (the same column like
your statement)
EXEC sp_configure 'show advanced options', 1
GO
RECONFIGURE
GO
exec sp_configure 'Ad Hoc Distributed Queries', 1
GO
RECONFIGURE
3. Execute followed script for export data to excel:
insert into OPENROWSET('Microsoft.Jet.OLEDB.4.0',
'Excel 8.0;DATABASE=c:\db_properties.xls', 'SELECT name,
create_date, collation_name FROM [Sheet1$]') SELECT name, create_date,
collation_name FROM sys.databases

Once more, you must have the same columns in your query and in predefined
xls document.

Database properties exists in system catalog: sys.databases,
sys.master_files.......

Try to make stored procedure and modify this query as you wish.
Good luck.
Nov 28 '06 #3

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

13
by: DarkSpy | last post by:
many c++ compilers including "gcc" have not implemented the "export" keyword, but the comeau compilers made it (just i knew). i want to know about: is it too difficult to implement "export"...
3
by: Bennett Haselton | last post by:
I'm working on an ASP.Net project where I want to test code on a local machine using a local database as a back-end, and then export it to the production machine where it uses the hosting...
1
by: frankvfox | last post by:
I need a code sample using VB ASP.Net 2003 which exports a tab delimited text file resident on the server into an Excel spreadsheet which will be saved through the browser to the client's local...
1
by: Michael | last post by:
I have an application that will export two files to fixed width text to combine as a single text file. The first export will be a query containing header information for the file, the second query...
16
by: David Lauberts | last post by:
Hi Wonder if someone has some words of wisdom. I have a access 2002 form that contains 2 graph objects that overlay each other and would like to export them as a JPEG to use in a presentation....
10
by: Neil | last post by:
Hi guyz, just trying out this google feature so if i post if in the wrong area i appologize. now to my question. BTW i'm new to access programming, i've done a little vb6.0 and vb.net but access...
0
by: Henry | last post by:
I have written an ASP/VB.Net application via VS 2003 (Crystal V9) that uses MS Access 2000 as its database. I can export reports that have no linked sub reports for printing. However, I'm unable...
4
by: Agnes | last post by:
I searched from previous post and got that there is a solution which export the data to export without using Excel auotmation. However, my database is SQL server, How can I amend...
1
by: learning_codes | last post by:
Hi , I'm wondering if there is a way for me to export some tables including data and structure from old database to a new database and then save as new database name. I try to create a marco...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.