.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Database across multiple drives

Posted By:      Posted Date: September 22, 2010    Points: 0   Category :Sql Server

I have database spread across a few drives as below table.

The issue is that shouldnt SQL be intelligent enough to fill each drive equally??? I have my Netwrok drives being filled unevenly.

Logical Name     Type    FileGroup        Initial size   Autogrwoth                              Path
Database_Data     Data     Primary             86               By 10%, unrestricted growth     M:\MDF file
Database_Data_1  Data     Data File Gp1     30632         By 10%, unrestricted growth     N:\NDF file
Database_Data_2  Data     Data File Gp1     8725           By 10%, unrestricted growth     O:\MDF file
Database_Data_3  Data     Data File Gp1 &

View Complete Post

More Related Resource Links

Multiple database support with Entity Framework

One of the features introduced in Entity Framework is being database independent. Which mean each database provider can support Entity Framework by implementing its provider.

This feature allows you build applications independent from the underplaying database provider. In this post I'm going to show how to build an application that support multiple databases using same conceptual model made by Entity Framework.

Adding Multiple Columns and Rows in GridView without using a Database

This article describes on how to add multiple columns and rows in GridView without using a database. Basically the GridView will be populated with data based on the values entered in each TextBoxes on Button Click and retain the GridView data on post back.

Exposing WCF Service for multiple clients with the feature of multiple database support

i have ceated a WCF service and hosted it properly. now i want to Exposing this Service for multiple clients with the feature of multiple database support.In this functionality how could i do the proper multiple database management. what i am doing now:1. i am taking database string from the client.2. Then setting the refference of above provided database to the all functions call.ISSUE: if the mulitple clients calling the service at the same time and both are giving different database string then the database string provided by the clients is overlapping.....

database design for multiple vendors

 I have constructed a simple database schema with one vendor.now i would like to add multiple vendors who can/may provide similar products. so i am looking for a design that lists products,there attributes and can be filtered on respective Product Sizes,Brand,Colour easily.    

SQL Server database restore with multiple logicalfiles by using t-sql

Hi,   I have set of database backups created in the production sql server 2005. I need restore these backups into another sql server 2005 by using t-sql script(stored procedure). Each database will have different number of logical files in it. The physical location of the target server may be different for these logical files. I know that i should use WITH MOVE 'YourMDFLogicalName' TO 'D:DataYourMDFFile.mdf' clause. Now i want to know how would i put it in a t-script stored procedure such a way that it automatically identifies all the logical files and create a physical file on the target server. User will supply source of bakup file and target folder for mdf,ldf, etc files. Do i need to populate the sql query as string by looping through all the logical files? If so how would i execute the populated sql query as string ?  Mr Genius


the database result is as follows DATE     code   class1 class2  class3 1/8/10     M1     10       20     30     3/8/10     V2      20       30     10      1/8/10      H1      1           2      3         7/8/10     ! ! 8/8/10     !M2    5      5      5       3/8/10     B2      4      4     4       1/8/10     V1      3      7     3       THE OUTPUT SHOULD BE AS FOLLOWS:- DATE           M1                          M2           

Update Statement help from Multiple database

Hi I am having two separate datbase on same sever one datasbase name private from where i am executing my below query and other name is ODS Table name in Private=[A].[DimCapabilitySpecialty] Table name in ODS = [A].[CapabilitySpecialty]   both of them having column SpecialtyCd   i want to update the flag value of ODS table where there is particular specialitycd missing in source means table in private database   so for that i wrote below query   update A.DimCapabilitySpecialty set ActiveInd ='I' where SpecialtyCd !=[ODS].[A].[CapabilitySpecialty].[SpecialtyCd]   But it is giving me this error   Msg 4104, Level 16, State 1, Line 1 The multi-part identifier "ODS.CapabilitySpecialty.SpecialtyCd" could not be bound.

Insert multiple files to SQL Database in VB

My files are being inserted but the byte array is showing as a 0x0000... etc for every file after the first inserted file. The first inserted image is correct. The database is set up as an Image type. The problem exists in the code here. Thank you in advance! Dim uploads As HttpFileCollection uploads = HttpContext.Current.Request.FilesFor i As Integer = 0 To (uploads.Count - 1) If (uploads(i).ContentLength > 0) Then Dim c As String = System.IO.Path.GetFileName(uploads(i).FileName) 'Dim upload As HttpPostedFile = uploads(i) If Not fileUpEx.PostedFile Is Nothing And _ fileUpEx.PostedFile.ContentLength > 0 Then Try If CallingTab >= "" Then Call UploadImage(c, uploads(i).ContentLength, uploads(i).ContentType, uploads(i).InputStream, _ strUsername, intSiteID, intCompanyID, strDocumentType, CallingTab, NewVersionNumber) Else lblStatus.Text = "Document Not successfully uploaded to the database! Problem occured with the Calling Tab" End If Catch Exc As Exception Response.Write("Error: " & Exc.Message) End Try

Multiple images from database

Hi, I have what I hope is an easy question. I am building a report which will show some images of a site. Some sites may have 1 image stored in the database while others have more (the number varies). I can get the image control to show the first image but not the rest. Is there a way to get an image control to repeat (like rows in a table) depending on how many images there are? Thanks    

Multiple Data Files Per Database Not Allocating

We recently read that I/O performance can be increased by creating multiple data files for a database: "As a general guideline, create one data file for each CPU" So went ahead and did this, and restarted the SQL engine, but still it is writing all data to the first file "Production_data_1". We would assume after we restarted it would reallocate the data across all four data files. Currently, the other three data files have 1GB of space allocated, but the engine is not writing data to the other three files. How can we distribute the existing data across all four data files? See a screenshot we took at: http://www.ftoperations.net/screenshot.png

creation of multiple .aspx pages from database name


 hi ,
i am making an internal social networking application for my small organisation where i work  .i have a list of all employee  names in a mssql 2000 database that are the names of 5000 employees of the company  one by one arranged in rows in a single coloumn of a table . i have a folder ,i want to make  .aspx files/pages in that folder ,the file name should be same as names of the person in database coloumn.can any help me with codes to automatically make the .aspx pages with the same names as it is in database coloumn.(note that folder will not take any duplicate values(name will not be repeated)) .i am making application using asp.net 2.0.file will be automatically created in the folder as soon as new name is entered in database.its very difficult to make 5000 aspx page with each employee name and it will be difficult to make new pages again and again after new employees names are entered.so i want that files will be automatically created after employee names are registered.  

thanks in advance.

hoping for help for someone.

Multiple Images upload to SQL Database C# code help pls !



I have a web form where user can upload image and store to SQL database. (SQL tables has a relation like one title has multiple images fields).

Title: <asp:TextBox ID="txtTitle" runat="server" Width="300px"></asp:TextBox>

Image Name:<asp:TextBox ID="txtImage" runat="server" Width="200px"></asp:TextBox>

<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID="btnSubmit" runat="server" Text="Submit Information" 
               onclick="btnSubmit_Click" />

aspx.cs code:

 protected void btnSubmit_Click(object sender, EventArgs e)
//to store image into sql database.
         string strImageName = txtImage.Text.ToString();      

                    if (FileUpload1.PostedFile != null &&
                    FileUpload1.PostedFile.FileName != "")
                           byte[] imageSize = new byte[FileUpload1.PostedFile.ContentLength];

Database snapshots do not work well with databases having multiple log files


It appears there is a bug in the implementation of database snapshots.

If you create a snapshot on a database with multiple log files:

Then restore from the snapshot:

then all of you log files, but one will disappear. As a result the backup command will fail with the following message:
Msg 3636, Level 16, State 2, Line 1
An error occurred while processing 'BackupMetadata' metadata for database id 12 file id 10.
Msg 3046, Level 16, State 2, Line 1
Inconsistent metadata has been encountered. The on

multiple access to sql server database, one table


I have multiple apps running which access a sql server database. I had initially a table set aside for each app but now I was told to put everything into one table and have all apps access the database. I just want to make sure that just changing my connection string for all apps will suffice and that I do not have to make any other changes for all apps to write to one table. Will this be ok? The apps are writing to the database table which has a unique index on one column and a auto incremented primary id key. I changed the stored procedures I had for each app since the connection strings were the same as they access the same database. Just want to make sure there will be no conflict issues when each tries to write to the same table. None of the apps will be querying the table at any time except when I run manual queries myself.

Multiple Database on same portal


I am working on a project where on the same portal people from different location will login, so they get connected to different database depending on the location they choose at the time of login. There will be a dropdown list during login, where user can choose the location

I use ASP.NET Login control, security/membership class.

So what is the best way to implement this, should i save different connection string in web.config and based on location choosen by user read them? I would also have to change LocalSqlServer connection string for login control, how do i do this dynamicaly?

Restore database from single disk to multiple disks?


We have expanded our drive layout on a particular server from 1 huge disk (10TB) to 8 (1.2TB) disks. 


My question is how do you restore a database and have the data spread across the 8 disks? We have about 10 DB's to restore so it could be quite a challenge.




Multiple database Persistence


We are developing an application based on multi tenant database architecture. We will create multiple accounts using our application. Each account will point separate databases (for example: Account1 à Account1_db, Account2 à Account2_db).  We are developing a workflow as a Workflow service using Workflow Foundation 4.0.  

Currently we have a common persistence database for all accounts in that application. Instead of having the common persistence database, we plan to implement the persistence in account databases. So each account database will have own their persistence.

I don’t know how to implement the custom persistence for Workflow service.

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend