Can You Create Folders Under Databases In SMS

Aug 20, 2006

I see under databases in the object explorer of SQL Server Management Studio that there are two sub-folders: System Databases and Database Snapshots.

Is there a way to create other folders here? It would be nice to be able to group the various databases (ex. Samples).

tia

View 1 Replies


ADVERTISEMENT

T-SQL (SS2K8) :: Function To Create Folders (and Sub Folders)

Jun 5, 2014

I'm using sp_OACreate in a scalar function to create a folder if it doesn't exist, and it works fine if you're asking it to create a single folder. For instance: C:Newfolder

It creates "Newfolder"

However, if I try to ask it to create C:NewfolderNewsubfolder

It doesn't work

Here's the code:

DECLARE @Exists int, @ObjFile int, @ObjFileSystem int, @Folder nvarchar(500) = 'C:',
@Action tinyint = 1 --(0 to check if folder exists, 1 to actually create it)

EXEC dbo.sp_OACreate 'Scripting.FileSystemObject', @ObjFileSystem OUT
EXEC dbo.sp_OAMethod @ObjFileSystem, 'FolderExists', @Exists OUT, @Folder

[Code] .....

View 1 Replies View Related

Databases In Separate Folders?

Mar 15, 2006

In Enterprise Manager, is there a way to group Databases into Separate folders?

View 6 Replies View Related

System Databases Folders Disappeared From SSMS 9.0

Jun 14, 2007

Suddently System Databases Folder is not showing on Studio 9.0 for all the SQL servers instance. Do you know why ? Is there any option other than De-attach them?

View 4 Replies View Related

Attach Databases Dialog Doesn't Give Mw Access To My VWD Folders

Mar 25, 2007

I'm using SQL Server Management Studio eExpress and I'm tryng to link to a database created in Visual Web Developer Express. My problem is that I can't see large parts of my file system when I try to attach a database in SQL Server Express. Web Developer Express likes to put its databases in C:Documents and Settings<User Name>My DocumentsVisual Studio 2005WebSites<Site Name>App_Data. However, when I try to attach a database in that location to SQL Server Express (Right Click Databases node, select Attach from the shortcut menu then Add from the Attach Databases dialog) I get a folder tree that won’t let me go any further than C:Documents and Settings<User Name>. There seem to be large parts of my folder structure that I cannot access with this dialog.
 
Just in case this is a permissions issue, I am using Windows XP Pro on a stand alone machine. I log on as Administrator, and the <User Name> in the above paths is Administrator. The Administrator is a member of the Administrators group. I have never logged on as anything else and never made any changes to the way permissions are set. When I start SQL Server express I select Windows Authentication.
 
TIA

View 3 Replies View Related

Create Folders In Object Explorer - Wish...

May 4, 2007

Here's one thing that I'd like to see come out in some version of the SQL Server Management Studio...
The ability to create folders under the database node so that databases can be grouped on one server.

We have over 100 databases on our development server and these are created by a range of consultants and developers and even support staff as needed.

Being able to group the databases by product, etc would be a nice touch since we have client databases that don't fit naming conventions etc.

Multiple instances are another way around this but are expensive and resource hungry - we develop and support models, not use them for transactions too much.



Yes there are 'better' ways such as setting security correctly but we are too busy working and not maintaining.

Folders or database groups would be a nice touch.



Cheers

View 1 Replies View Related

SQL Server 2008 :: Delete Folders / Sub Folders Older Than N No Of Days

Jul 30, 2015

If I run the below command, it clean up the files inside the folders but unable to clean up the folder and sub-folders older than 30 days. xp_ cmd shell ' forfiles -p "D:abcd" -s -m *.* -d -30 -c "cmd /c del /Q @path"'

View 4 Replies View Related

How To Create Databases In SQL Express

Jun 15, 2006

 Autofreak wrote:

Hi All,

I have installed the SQL Server 2005 Express edition and its running fine.

I like to connect to the server and create database. Should I do it

through command prompt only or any tool is available like

Enterprise manager for this ?





View 1 Replies View Related

Create And Configure Databases Via C#

Feb 20, 2008



I am using Visual Studio 2008 and have created a .mdf database within my project. I want to be able to do a few things and I am not quite sure where to start. The program I am writing manages rental properties. Thus, each rental property that the user owns needs its own sql express database. For this to work:

1. I need to be able to dynamically create a database for each property that the user owns.
Is it best to do this as described here http://msdn2.microsoft.com/en-us/library/bb399420.aspx ? Or is it best to have a template database and then make a duplicate of the database using the File.Copy() method.

If it is best to do it programatically as shown in the link above, how do you create relationships between tables?

2. I need to be able to dynamically add users to the database via c# code. How does one do this? Is it possible do through LINQ?


Hopefully someone can point me in the right direction. Thanks

Nick

View 6 Replies View Related

Create A Relationship In Defirent Databases

Jun 16, 2008

Hi,
 Is it possible to create a relationship between to tables in a deferent databases and How to do it from SQL Server Management Server!?
 
Thanks.

View 1 Replies View Related

Does SQL7 Create All Databases On C: Drive Only?

Dec 8, 1998

Hi,
Will SQL7 create all databases on C: drive only
from now on?

After SQL7 Beta3 installation I tried to create a new db
but in the 'Browse' window in 'Create DB' procedure
I can see only C: & D: drives (btw D: is CD-ROM).
It doesn't see my E:, F: & G: hard drives.
When I try to create my db using 'create database'
statement it again gives me an error 'path not found'.

Also, I have 512 Mb free on C: drive, but
when I create new db with 100-mb data + 50-mb log
on C: SQL7 says that I don't have enough space for
this db.

Does anybody had the same problem already?
I need to convert my Sybase db into SQL Server7
and got this problem with creating db right in the start.

Thank you

View 1 Replies View Related

Cannot Create Databases On SQL Express 2005

Aug 9, 2006

Help me please!
I've installed SQL Express 2005 on my XP. I'm trying to create a database but I keep getting the error no matter what I do.

Msg 1802, Level 16, State 4, Server MYCOMPUTERSQLSERV, Line 1
CREATE DATABASE failed. Some file names listed could not be created. Check related errors.
Msg 5123, Level 16, State 1, Server MYCOMPUTERSQLSERV, Line 1
CREATE FILE encountered operating system error 5(error not found) while attempting to open or create the physical file 'C:Program FilesExos9300DatabaseExos93.mdf'.

View 1 Replies View Related

How To Create A Report Using Multiple Databases

Jan 31, 2007

Hi, I am a beginner of Reporting Service. I am trying to create a report using multiple databses. For example, I want to create a report called RevenueByCustomer, so I need to get data from the Customer Table of CRM database, which contains customer information, and I also need to get data from Transaction table of Sales database, which contains all the revenue information. In order to get data from both database, I have created two dataset. One is Customer dataset, which get all required customer data from CRM database, and the other is Revenue dataset, which gets data from Sales database, they used seperate datasource (because each datasource only contains one database connection). Now my problem is how can I make them be displayed in one report ? It seems to be like a Master-Detail report, I need to sum up all trasactions for a particular customer and also need to display the customer name with each TotalAmount, but how can I make these two dataset can be merged together or used an extra query to do it?

Please help me, thanks a lot

This Query below is used to calculate the total amount for each customer in Revenue dataset:

SELECT CustomerID, sum(TotalAmount - TotalTaxAmount) AS TotalExcTax, sum(TotalAmount) AS TotalIncTax
FROM TransactionMaster
WHERE (Updated >= @Start) AND (Updated <= @End)
Group By CustomerID

the other one here is used to get customer code and name in Customer dataset:

SELECT ID, Code, Name
FROM Customer

View 10 Replies View Related

How To Create A Report Using Multiple Databases

Jan 31, 2007

I have two database:

FoxPro database - contains client info (name, address)

SQL Server database - contains appointmetns, orders, jobs etc.

How can I create reports using both databases?

Thank you

View 3 Replies View Related

Can't Create Databases In Management Studio

Feb 5, 2006

I seem to be having a number of problems using managment studio (MS) against my locally installed SQL 2005 Standard Edition. E.g. when I create a default database using MS it says...



TITLE: Microsoft SQL Server Management Studio
------------------------------

Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476

------------------------------
ADDITIONAL INFORMATION:

An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)

------------------------------

The server could not load DCOM. (Microsoft SQL Server, Error: 7404)

For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=7404&LinkId=20476



However, the hyperlinks are less than helpful. I also get problems doing various maintance work from MS. I don't think its a database engine problem 'cause I can do all the work via TSQL DDL but the interface is so much easier to use (or should be). BTW it's running on XP Pro (firewall problem?).

View 6 Replies View Related

Cannot Create Databases (and Other Issues) From Management Studio

Feb 6, 2006

 
I seem to be having a number of problems using managment studio (MS) against my locally installed SQL 2005 Standard Edition. E.g. when I create a default database using MS it says...
 
TITLE: Microsoft SQL Server Management Studio------------------------------
Failed to retrieve data for this request. (Microsoft.SqlServer.SmoEnum)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&LinkId=20476
------------------------------ADDITIONAL INFORMATION:
An exception occurred while executing a Transact-SQL statement or batch. (Microsoft.SqlServer.ConnectionInfo)
------------------------------
The server could not load DCOM. (Microsoft SQL Server, Error: 7404)
For help, click: http://go.microsoft.com/fwlink?ProdName=Microsoft+SQL+Server&ProdVer=09.00.1399&EvtSrc=MSSQLServer&EvtID=7404&LinkId=20476
 
However, the hyperlinks are less than helpful. I also get problems doing various maintance work from MS. I don't think its a database engine problem 'cause I can do all the work via TSQL DDL but the interface is so much easier to use (or should be). BTW it's running on XP Pro (firewall problem?).

View 2 Replies View Related

SQL Server 2008 :: Create View For Each Table In The Databases?

May 27, 2015

We have two databases with same schema and tables (same table names, basically main DB and a copy of the main DB). following is example of table names from 2 DBs.

CREATE TABLE #SourceDatabase (SourceColumn1 VARCHAR(50))
INSERT INTO #SourceDatabase VALUES('TABLE1') , ('TABLE2'),('TABLE3') , ('TABLE4'),('TABLE5') , ('TABLE6')
SELECT * FROM #SourceDatabase
DROP TABLE #SourceDatabase
CREATE TABLE #ArchiveDatabase (SourceColumn2 VARCHAR(50))
INSERT INTO #ArchiveDatabase VALUES('TABLE1') , ('TABLE2'),('TABLE3') , ('TABLE4'),('TABLE5') , ('TABLE6')
SELECT * FROM #ArchiveDatabase
DROP TABLE #ArchiveDatabase

We need a T_SQL statement that can create one view for each table from both the databases(assuming both databases have same number of tables and same table names). so that we can run the T_SQL on a thrid database and the third DB has all the views (one view for each table from the 2 DBs). and the name of the view should be same as the tables name. and all 3 DBs are on the same server.

the 2 temp tables are just examples, DBs have around 1700 tables each. so we ned something like following for each table.

CREATE VIEW DBO.TABLE1 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE1] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE1]
CREATE VIEW DBO.TABLE2 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE2] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE2]
CREATE VIEW DBO.TABLE3 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE3] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE3]
CREATE VIEW DBO.TABLE4 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE4] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE4]
CREATE VIEW DBO.TABLE5 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE5] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE5]
CREATE VIEW DBO.TABLE6 AS SELECT * FROM [SourceDatabase].[dbo].[TABLE6] UNION ALL SELECT * FROM [ArchiveDatabase].[dbo].[TABLE6]

View 6 Replies View Related

Large Databases - Create Indexes For Fields That Are Used In Where Statements?

Aug 29, 2013

For large databases is it a good idea to create indexes for fields that are used in Where statements? Does that improve performance and reduce overhead?

View 4 Replies View Related

Two Databases/servers - Can I Connect To Both To Create New Table On One Server?

Nov 20, 2007



Good morning all,

I need to create a new table on a SQL Server 2005 Database, but the data needed for the table is kept in different databases on different servers.

Half the data is on the SQL 2005 database, so that shouldn't be too much of a problem, but the other half is on a SQL Express database on a different server, is it possible to write a T-SQL query to retrieve this data on the other server?

Normally I use a create table + insert into kind of query to create custom tables but I don't know how to connect to the SQL Express server/database using T-SQL (if it's possible at all?) to do this.

Any tips, hints, ideas very welcome. Please use small words and short sentences.

Thanks,

Paul

View 3 Replies View Related

Cannot Open / Create SQL Express Databases (.mdf Files) In Visual Studio 2005 Professional Edition

Sep 7, 2007

Hi, I am trying to open or create a sqlexpress database within Visual Studio 2005 Professional in the App_Data folder.  If I attempt either method, I get the following dialog box:Required Components MissingConnections to SQL Server files (*.mdf) require SQL Server Express 2005 to function properly.  Please verify the installation of the component or download from the URL:  http://go.microsoft.com/fwlink/?LinkID=49251 The link above just takes you to the download page for Sql Server Express 2005. I have both SQL Server 2005 Developer and SQL Server 2005 Expression instances running.  The existing database will work properly in my web application, however I cannot access it through Visual Studio.As background, I did have a problem connecting to the database via the web application, receiving a "Failed to generate a User Instance of SQL Server" error.  But I was able to fix that by renaming my SQLEXPRESS folder in C:Documents and SettingsuserLocal SettingsApplication DataMicrosoftMicrosoft SQL Server Data.  When the web page ran, it created another SQLEXPRESS folder.However, I cannot figure out why I am having the other issue.Thanks in advancePatrick  

View 1 Replies View Related

Two (2) App_Data Folders?

Apr 25, 2007

I loaded an application to my server with the app_data folder intact in the application folder which is a sub folder of the root web.
 Through my host enableing SQL somehow a second App_Data folder has been created in the root of the web and the db has been duplicated.  Without a doubt this is causing a problem with the application not running correctly.  The application is the asp.net membership app which is trying to read and write to the .mdf file.
 Can we simply delete the App_data folder in the the root web or will this rebuild itself?  Or do we need to edit the web config files?
How / Why did this happen?
 Server is running Win2k with SQL Express 2005
 TRU
 

View 2 Replies View Related

How To Add Folders In SQL 2005

Jun 13, 2007

does anyone have idea How to add folders in SQL 2005
thanks in advance

View 12 Replies View Related

Two MDF Files With Same Name In Different Folders

Apr 25, 2015

Is it OK to have two mdf files with the same name placed in different folders and attached with different names.

Example:
DATADB1Hotel.mdf attached as hotel1
DATADB2Hotel.mdf attached as hotel2

View 6 Replies View Related

How To Enumerate IS Folders ?

Dec 5, 2007



Hi All,

I need to get access to stored packages. To do so I use
Microsoft.SqlServer.Dts.Runtime.Application class.
There are methods: Application.FolderExistsOnDtsServer, Application.FolderExistsOnSqlServer
but I need to enumerate existed folders.
Are there something like: Application.GetFolders(String ParentFolderName) ?
I have searched in doc but there is not any useful except:



"To verify that the folder was created, the following Transact-SQL query selects all packages stored in the File System folder of the Stored Packages package store.

select * from sysdtspackages90 "

It is not suitable for me because I don't have permissions to access database

Thanks,
Sergiy

View 3 Replies View Related

Deploying To Sub Folders

Feb 21, 2008



hi all

using sqlserver 2005 Reporting Services

When I go to deploy

my main folder = Reports
my sub folder = reAct or Managers Reports or Onboarding etc

how do I deploy directly to the sub-folders?

thanks
jewel

View 13 Replies View Related

Dynamically Name Folders

Feb 12, 2007

Apologies in advance for the newbie question. I'm new to Integration Services and am trying to build my first project.

I want to dynamically create folders based on the results of a stored procedure. The resultset is limited to one column but can contain multiple rows. (It returns a list of 8-character strings representing dates.) This returned value needs to be combined with the path where the new folders should be created.

Can someone point me in the right direction? I've run the stored procedure and put the resultset into a RecordSet Destination that uses a variable of type Object. (At least, I think I've done it correctly.) But I have not been able to figure out how to access this data to actually create the folders.

Thanks for the help,

Chris

View 3 Replies View Related

SQl Dbase Query From Different Folders

Feb 4, 2008

HI, I have a Dbase Database stored in several subfolders. I allready made my connection with a sqldatasource and a gridview, and all works fine when i do a query with the tables in to root folder. The problem is when I try to include tables from the subfolders, the compiler send me a syntax error in the FROM Clausule
I Allready try this.
 SELECT products.id, products.descri, condition.discount  from products, clientscondition where products.line=condition.line
 SELECT producst.id, products.descri, clientscondition.discount from products, clientscondition where products.line=condition.line
 SELECT products.id, products.descri, condition.discount from products, condition in 'clients' where products.line=condition.line
 SELECT producst.id, products.descri, clientscondition.discount from products, 'clients'.condition where products.line=condition.line
And many other different combinations. I would like to be helped if you know the correct syntax or a link where i can consult the syntax for VB.net and dbase with several folders
Another option a tried is having a query from 2 different datasources, but I don´t know how to make a reference to the 2 sqldatassources in a new one to be linked to the gridview

View 7 Replies View Related

Hide Folders In Report Mng

May 12, 2008

Hi All,

I would like to control user access to my Report Manager.In detail,I would like to hide some report folders from certain users when they access the Report Manager.Some of the users are not suppose to see certain folders on the report manager,and some users are suppose to see all report folders.

How can I do this?.Where should I include this settings?

View 4 Replies View Related

Deleting Folders Using SQL Triggers

Jun 24, 2007

I need to delete the empty subfolders under my "uploads" folder

how can i perform that using triggers

i need to delete old records in database and the folders associated with them, i've used triggers to delete the records before 180 days, but i don't know how to remove the folders associated with each folder.

note:
name of folders is the same as record number

is that possible?

View 1 Replies View Related

Restricting Access To Certain Folders?

Jan 6, 2007

Hi all,

I have a user who I only want to provide access to a single folder within
RS2005. I don't seem to be able todo this, they can either see everything or
nothing at all.

What am I missing? Any help much appreciated.

Kind regards
Tarun

View 10 Replies View Related

Granting Permission To Folders

Feb 12, 2008

Within my Report Manager, I have several folders, and I would like these folders to be only visible to certain users and groups. In the Active Directory I have DOMAINGroupName1. If I add this group to the folder I want them to have access to with a Browser role, when they open Report Manager they do not see the folder at all. Then I added the same group to the HOME folder also, but again they could not see their folder when they opened the Report Manager. If I add the Users of this group individually (DOMAINUser1, DOMAINUser2 etc) then they can see the folder and run reports just fine. This is not an ideal solution as groups will change over time and I don't want to have to keep adding and deleting members. Anyone got any ideas why they can't see their folder?
Thanks!

View 4 Replies View Related

How To Suft Through MSDB Folders?

Feb 7, 2007

Hi everyone,

Primary platform is Framework 2.0.

My target now is to know programatically how many folder exists under MSDB folder as well as its names.

How to accomplish this?

Thanks in advance and regards,

View 3 Replies View Related

Adding Folders Under The Solution

Jul 5, 2007

In RS, can one add a folder under the Reports folder? I don't see where I can do this. We work with many different state's and we would like to organize reports by state.



Thanks for the information.

View 4 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved