Showing posts with label files. Show all posts
Showing posts with label files. Show all posts

Friday, March 30, 2012

How to continue package execution during error?

We have a package that loads the data from several excel files into database in a forloop.

Everything works files until the package hits the bad file.

My goal is to continue the loop to process the rest of the files by skipping the bad file and error. In each task OnError I am creating custom error message to send an error/ sucess summary email out at end of the process.

How can force the for loop to continue when there is an error?

Is there any way to reset the errors?

Thanks

R

The behavior is mostly controlled by three properties: MaxErrorCount, FailPackageOnFailure and FailParentOnFailure. You can increas error count and set "fail" properties to false to make package continue inspite of an error.

Monday, March 26, 2012

how to connect to a remote sql DB

Hi all,

myDB is located atX:\Program Files\Microsoft SQL Server\MSSQL\Data\myDB.mdf
and my code is located at : C:\Inetpub\wwwroot\applicationfolder
how do I code my server.mapPath?

Btw, can I get VS 2005 to detect the server path when using server solution.Thanks

sub Page_Load
dim dbconn,sql,dbcomm,dbread
dbconn = New OleDbConnection("Provider=Microsoft.Jet.OLEDB.4.0;data source=" & Server.MapPath("X:\Program Files\Microsoft SQL Server\MSSQL\Data\myDB.mdf"))
dbconn.Open()
sql = "SELECT * FROM myTable"
dbcomm=New OleDbCommand(sql,dbconn)
dbread=dbcomm.ExecuteReader()
myDB.DataSource = dbread
myDB.DataBind()
dbread.Close()
dbconn.Close()
end sub

One big problem you are pointing to Access database which lets you map the path and SQL Server which controls the path so if your database is Access you can map the path, if it is SQL Server you cannot map the path because the database is not the runtime the relational engine is the runtime. Hope this helps.

Friday, March 23, 2012

how to connect to .mdf file with sqmcmd?

Hi,
i have several mdf files for several asp.net applications. How can i reach
such a database with sqlcmd?
Thanks
BobThe .mdf is just the data file it is not the server. Have you looked up
sqlcmd in BooksOnLine?
Andrew J. Kelly SQL MVP
"Bob" <bob@.omail.nl> wrote in message
news:OuGOrItVHHA.496@.TK2MSFTNGP06.phx.gbl...
> Hi,
> i have several mdf files for several asp.net applications. How can i reach
> such a database with sqlcmd?
> Thanks
> Bob
>|||Take a look into the below URL:-
http://msdn2.microsoft.com/en-us/library/ms162773.aspx
Thanks
Hari
"Bob" <bob@.omail.nl> wrote in message
news:OuGOrItVHHA.496@.TK2MSFTNGP06.phx.gbl...
> Hi,
> i have several mdf files for several asp.net applications. How can i reach
> such a database with sqlcmd?
> Thanks
> Bob
>|||Thanks, i know that mdf is not the server. All i ask is: is it possible to
manage such a database with sqlcmd (something like 'use mymdf_file'). Maybe
that file is attached to the server ...
"Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schreef in bericht
news:%233v%23A1uVHHA.1036@.TK2MSFTNGP03.phx.gbl...
> The .mdf is just the data file it is not the server. Have you looked up
> sqlcmd in BooksOnLine?
> --
> Andrew J. Kelly SQL MVP
> "Bob" <bob@.omail.nl> wrote in message
> news:OuGOrItVHHA.496@.TK2MSFTNGP06.phx.gbl...
>|||Not that I know of. Ssqlcmd talks to the server instance not the file. You
can specify a db name in the connection string but not a file.
Andrew J. Kelly SQL MVP
"Ken" <kns@.shdv.sd> wrote in message
news:%23M3$h8yVHHA.4404@.TK2MSFTNGP03.phx.gbl...
> Thanks, i know that mdf is not the server. All i ask is: is it possible to
> manage such a database with sqlcmd (something like 'use mymdf_file').
> Maybe that file is attached to the server ...
> "Andrew J. Kelly" <sqlmvpnooospam@.shadhawk.com> schreef in bericht
> news:%233v%23A1uVHHA.1036@.TK2MSFTNGP03.phx.gbl...
>

Monday, March 19, 2012

how to configure one-way merge replication?

With the appropriate replacements, this should do the job:
C:\Program Files\Microsoft SQL Server\80\COM>replmerg -
Publisher DH1791628 -PublisherDB xxxPublisher -
Publication xxxPublishertClients -Subscriber DH1791628 -Su
bscriberDB sub1 -Distributor DH1791628 -DistributorLogin
sa -DistributorPassword sa -ExchangeType 2
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
Thank you Paul responding back. I tried the script but I keep getting this
error 'the process could not connect to the distributor.sql server does not
exist or access denied'. which login and password are we supposed to be
using? is it same as what the sqlserver agent is running as?
here is my script:
C:\Program Files\Microsoft SQL Server\80\COM>replmerg -publisher westcoast
-publisherDB westcoast -publication westcoast -subcriber testwestcoast
-subscriberDB testwestcoast -Distributor westcoast -distributorLogin sa
-distributorpassword sa -exchangeType 2
I set the log in and password to what my sqlserveragent was running under.
It still doesnt work. Please give me your suggestion on this. Thanks
Jessy
"Paul Ibison" wrote:

> With the appropriate replacements, this should do the job:
> C:\Program Files\Microsoft SQL Server\80\COM>replmerg -
> Publisher DH1791628 -PublisherDB xxxPublisher -
> Publication xxxPublishertClients -Subscriber DH1791628 -Su
> bscriberDB sub1 -Distributor DH1791628 -DistributorLogin
> sa -DistributorPassword sa -ExchangeType 2
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Is this push or pull?
According to the script you have a server called
westcoast, which has a published database called
westcoast and a publication called westcoast - is this
correct?
It looks like it must be a pull, as your distributor is
also westcoast.
If you want to use trusted security for the merge agent,
then set the -SubscriberSecurityMode parameter to 1. It
defaults to SQL Server security, so in the original
script I put sa and a password of sa - don't laugh - I
saw this and blank recently.
Rgds,
Paul Ibison
|||Paul, I am still getting the same error. "could not connect to the
distributor'.
My publisher and publication is called westcoast. I have 'pull' from
subscriber. i am setting my distributor on the same server as my publisher.
Where do you look to check the distributor properties. I check under
Distribution Agent, but its blank. Is this is correct? When you set up the
merge replication the distribution db automactically is generated. what is
this used for?
I set the subscribersecuritymode to 0 because i am using the sql server
authenticaton. I am still having problems setting this up correctly.
Jessy
"Paul Ibison" wrote:

> Is this push or pull?
> According to the script you have a server called
> westcoast, which has a published database called
> westcoast and a publication called westcoast - is this
> correct?
> It looks like it must be a pull, as your distributor is
> also westcoast.
> If you want to use trusted security for the merge agent,
> then set the -SubscriberSecurityMode parameter to 1. It
> defaults to SQL Server security, so in the original
> script I put sa and a password of sa - don't laugh - I
> saw this and blank recently.
> Rgds,
> Paul Ibison
>
|||Can you log into testwestcoast and open up a query
analyser window (connection) to westcoast, using your
values for -DistributorLogin and -DistributorPassword to
log in and check that this works.
The distribution database holds merge metadata and things
like the next identity range to be used, and you'll need
a valid sql server login for your publisher/distributor
for this to work.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||Paul - I was able to run script w/o any errors. however its not doing what
i want. I need to only pull from the publisher to the subscriber. If i add
new records in subscriber it gets updated to the publisher. I dont want
data send back to the publisher. What am i doing wrong here?
C:\Program Files\Microsoft SQL Server\80\COM>replmerg -Publisher [TN5347]
-PublisherDB [westcoast] -Publication [westcoast] -Subscriber [TN5347]
-SubscriberDB [testwestcoast] -subscriberlogin sa -subscriberpassword
mypassword -subscribersecuritymode 0 -subscriptionType 1 -Distributor
[TN5347] -distributorlogin sa -distributorpassword sibu27 -exchangetype 2
Here is what the result was after running the script :
Connecting to Subscriber 'TN5347'
Connecting to Distributor 'TN5347'
Initializing
Connecting to Publisher 'TN5347'
Retrieving publication information
Retrieving subscription information
The merge process is cleaning up meta data in database 'westcoast'.
The merge process cleaned up 0 row(s) in MSmerge_genhistory, 0 row(s) in
MSmerge
_contents, and 0 row(s) in MSmerge_tombstone.
The merge process is cleaning up meta data in database 'testwestcoast'.
The merge process cleaned up 0 row(s) in MSmerge_genhistory, 0 row(s) in
MSmerge
_contents, and 0 row(s) in MSmerge_tombstone.
Downloading data changes to the Subscriber
No data needed to be merged.
No data needed to be merged.
"Paul Ibison" wrote:

> Can you log into testwestcoast and open up a query
> analyser window (connection) to westcoast, using your
> values for -DistributorLogin and -DistributorPassword to
> log in and check that this works.
> The distribution database holds merge metadata and things
> like the next identity range to be used, and you'll need
> a valid sql server login for your publisher/distributor
> for this to work.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
|||Jessy,
I think we're almost there. Please try -exchangetype 1.
Rgds,
Paul Ibison
"Jessy" <Jessy@.discussions.microsoft.com> wrote in message
news:9395EC21-B200-4ED4-9413-1F3FE22912B3@.microsoft.com...[vbcol=seagreen]
> Paul - I was able to run script w/o any errors. however its not doing
> what
> i want. I need to only pull from the publisher to the subscriber. If i
> add
> new records in subscriber it gets updated to the publisher. I dont want
> data send back to the publisher. What am i doing wrong here?
> C:\Program Files\Microsoft SQL Server\80\COM>replmerg -Publisher [TN5347]
> -PublisherDB [westcoast] -Publication [westcoast] -Subscriber [TN5347]
> -SubscriberDB [testwestcoast] -subscriberlogin sa -subscriberpassword
> mypassword -subscribersecuritymode 0 -subscriptionType 1 -Distributor
> [TN5347] -distributorlogin sa -distributorpassword sibu27 -exchangetype 2
> Here is what the result was after running the script :
> Connecting to Subscriber 'TN5347'
> Connecting to Distributor 'TN5347'
> Initializing
> Connecting to Publisher 'TN5347'
> Retrieving publication information
> Retrieving subscription information
> The merge process is cleaning up meta data in database 'westcoast'.
> The merge process cleaned up 0 row(s) in MSmerge_genhistory, 0 row(s) in
> MSmerge
> _contents, and 0 row(s) in MSmerge_tombstone.
> The merge process is cleaning up meta data in database 'testwestcoast'.
> The merge process cleaned up 0 row(s) in MSmerge_genhistory, 0 row(s) in
> MSmerge
> _contents, and 0 row(s) in MSmerge_tombstone.
> Downloading data changes to the Subscriber
> No data needed to be merged.
> No data needed to be merged.
>
> "Paul Ibison" wrote:
|||Paul- i tried the exchangetype 1 but its not working. I mean everything is
updated on both ends. I thought i should be using exchangeType 2 if i want
the publisher to only send data and not get data back. 'A value of 2
indicates that the agent should download data changes from the Publisher to
the Subscriber'. Do we need to reintalize in order for this to work?
Also I am using numeric id 'yes(not for replication)'. I know rowguid is
generated when we set up merge replication. however i noticed the numeric
id's show up twice on the table. If table 1 generated person 1 with id 1
this number is also added to the other table 2 as the same number. but table
2 already has a person with the same number 1. Is this correct?
Lastly, i previously deleted a replication on another database and ran some
store procedures sp_removedbreplication to clean up the merge replication
from publisher and subscriber. But the publications are still displayed in
the publisher folder and snapshot agent folder under replication monitor. So
my replication monitor is showing a red 'X'. How do you get rid of the
deleted publications on the replication monitor?
"Paul Ibison" wrote:

> Jessy,
> I think we're almost there. Please try -exchangetype 1.
> Rgds,
> Paul Ibison
> "Jessy" <Jessy@.discussions.microsoft.com> wrote in message
> news:9395EC21-B200-4ED4-9413-1F3FE22912B3@.microsoft.com...
>
>
|||Jessy,
yes, this value is incorrectly reported in some places so apologies. A value
of 1 indicates uploads to publisher only, 2 means subscriber to publisher.
Actually your previous post indicates you have it set correctly! I just
assumed you'd got the values the wrong way round. "Downloading data changes
to the Subscriber" appears and not the corresponding upload message. There's
no data exchange, but does it report the same message when you add a row to
publisher and subscriber ie no uploads?
Reinitialization is not necessary. Are you using MSDE? If not, then add the
parameter to the merge agents middle step and try there.
For the identity columns, it looks like you haven't enabled automatic range
management. You'll need this to partition the ranges. The best thing here is
to drop your subscription and then edit the article properties (elipsis
button) to enable a large identity range for the publisher and subscriber.
To get rid of the red x running sp_MSload_replication_status normally clears
this error or restarting the sql server service also works - tempdb needs
clearing out and this'll rebuild it.
Rgds,
Paul Ibison SQL Server MVP, www.replicationanswers.com
(recommended sql server 2000 replication book:
http://www.nwsu.com/0974973602p.html)
|||where do I look for the message report? I dont see any messages displayed
when i am inserting to the subscriber or publisher. I just click on the "!"
and the whatever i entered in the subscriber is still showing on the
publisher. How do i fix this?
I am using MSDE for just testing purpose. When i get this replication
working the way i want i will i try this on the server box. I believe thats
a standard/enterprise SQL Server.
"Paul Ibison" wrote:

> Jessy,
> yes, this value is incorrectly reported in some places so apologies. A value
> of 1 indicates uploads to publisher only, 2 means subscriber to publisher.
> Actually your previous post indicates you have it set correctly! I just
> assumed you'd got the values the wrong way round. "Downloading data changes
> to the Subscriber" appears and not the corresponding upload message. There's
> no data exchange, but does it report the same message when you add a row to
> publisher and subscriber ie no uploads?
> Reinitialization is not necessary. Are you using MSDE? If not, then add the
> parameter to the merge agents middle step and try there.
> For the identity columns, it looks like you haven't enabled automatic range
> management. You'll need this to partition the ranges. The best thing here is
> to drop your subscription and then edit the article properties (elipsis
> button) to enable a large identity range for the publisher and subscriber.
> To get rid of the red x running sp_MSload_replication_status normally clears
> this error or restarting the sql server service also works - tempdb needs
> clearing out and this'll rebuild it.
> Rgds,
> Paul Ibison SQL Server MVP, www.replicationanswers.com
> (recommended sql server 2000 replication book:
> http://www.nwsu.com/0974973602p.html)
>
>

Monday, March 12, 2012

How to configure DataReader Source for DataFlow

Dear Friends,

I have to import dBASE files to SQL Server. For this I have created one ODBC connection manager for those dBASE files. This I have to set for DataReader Source. But I am unable to configure the DataReader Source.

So, Please tell me how to configure DataReader Source for ODBC connection Manager.

Eagerly waiting for your valuable reply............

Santosh

INDIA

Are you getting any error?

Once in the data reader; you should provide the query and the connection manager information.

|||

Hello Santosh

Instead of creating an ODBC Connection Manager, you should create a ADO.NET Connnection Manager that uses the OdbcClient provider, and configure it to use the DSN you've set up for dBASE. I haven't tried dBASE specifically, but as a general statement the DataReader Source works only with ADO.NET connections.

-David

How to configure DataReader Source for DataFlow

Dear Friends,

I have to import dBASE files to SQL Server. For this I have created one ODBC connection manager for those dBASE files. This I have to set for DataReader Source. But I am unable to configure the DataReader Source.

So, Please tell me how to configure DataReader Source for ODBC connection Manager.

Eagerly waiting for your valuable reply............

Santosh

INDIA

Are you getting any error?

Once in the data reader; you should provide the query and the connection manager information.

|||

Hello Santosh

Instead of creating an ODBC Connection Manager, you should create a ADO.NET Connnection Manager that uses the OdbcClient provider, and configure it to use the DSN you've set up for dBASE. I haven't tried dBASE specifically, but as a general statement the DataReader Source works only with ADO.NET connections.

-David

how to configure a server as distributor

When configuring my SQL Server as a distributor I get the following
error:
Error 14113:Could not execute 'copy "
C:\Program Files\Microsoft SQL Server\MSSQL\DATA\DISTMDL.MDF"
"C:\Program Files\Microsoft SQL Server\MSSQL\DATA\distribution.MDF"'.
Check
'instdist.out' in the install directory
I could not find a file named instdist.out in the install directory.
Please Help!!
Thanks.
The setup will require you to be a system administrator - are you logged on
as one?
Also has the distribution database been created?
Also, check that you have sufficient room for a copy of the distribution
database.
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||I've logged in as system administrator.
distmodel database is also there and have sufficient space on my disk.
but still the problem has not been solved.
please show me a way.
thanx
jeff
Paul Ibison wrote:
> The setup will require you to be a system administrator - are you logged on
> as one?
> Also has the distribution database been created?
> Also, check that you have sufficient room for a copy of the distribution
> database.
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||I'd set it up manually and see where the issue is:
sp_adddistributor
sp_adddistributiondb
sp_adddistpublisher
Cheers,
Paul Ibison SQL Server MVP, www.replicationanswers.com .
|||First disable distribution from the Replication menu
Then try below commands in query analyser
sp_helpserver ( to see server name)
sp_dropserver 'SERVERNAME','DROPLOGINS'
sp_addserver 'SERVERNAME','LOCAL'
Then try creating Distribution again
"Paul Ibison" <Paul.Ibison@.Pygmalion.Com> wrote in message
news:u7Y6pBCBHHA.3540@.TK2MSFTNGP03.phx.gbl...
> I'd set it up manually and see where the issue is:
> sp_adddistributor
> sp_adddistributiondb
> sp_adddistpublisher
> Cheers,
> Paul Ibison SQL Server MVP, www.replicationanswers.com .
>
|||Take the database distmodel to Offline
EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com

How to conditionally create Flat File Destination for Lookup Redirects

Hi all,

I am redirecting the critical lookup errors to the flat files. These flat files got created regardless if there are lookup errors or not.

Is there a better way to conditionally create them only when there are lookup errors?

Thanks.

Its not really possible, no.

What you could do is count the number of records (using a ROWCOUNT component). Then, probably in the OnPostExecute eventhandler for the data-flow, delete the file if the rowcount is zero.

Or you could push everything into a recordset destination and then, in the eventhandler, push the stuff into a flat file IF the rowcount is greater than zero.

-Jamie

Wednesday, March 7, 2012

How to compare two databases using their DDLs?

Hello all!

My question is: how to compare two database structures if I only have
their DDL files? As the result I would expect an sql-script upgrating
one database structure to another.

The most 3rd-party tools I tested require connection to both databases.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!"Evgeny Gopengauz" <evgop@.ucs.ru> wrote in message
news:4124caa2$0$14418$c397aba@.news.newsgroups.ws.. .
> Hello all!
> My question is: how to compare two database structures if I only have
> their DDL files? As the result I would expect an sql-script upgrating
> one database structure to another.
> The most 3rd-party tools I tested require connection to both databases.
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!

Personally, I would use the DDL to create two databases, then compare them
with a tool. If you want to be able to compare two databases without having
MSSQL available, then you would have to look for a tool which supports that.
I believe ERwin does, although I'm not sure (and it's rather expensive).

Simon

Friday, February 24, 2012

how to combine text data rows into single row?

Hi!!!!

Need some quick help on SQL.....DTS packages.

I’ve loaded data from text files into a table which is in the following format.....

Seq_No

Row_No

Data

1

1

ABC

2

2

DEF

3

3

GHI

4

4

JKL

5

1

MNO

6

2

PQR

7

3

STU

8

4

VWX

Every four lines correspond to one single logical record. So, all the data in every 4 rows have to be combined into one big string which’ll then be loaded into one col of another temporary table .....structure below.....

Record_No

Data

1

ABCDEFGHIJKL

2

MNOPQRSTUVWX

I’m looking for a way to achieve this WITHOUT using Cursors (as it’ll slow down performance)......

Any suggestions will be highly appreciated.

what data type is the Data column?|||

One way is to use the CLR Aggregate function for string concatenation shown in the BOL

http://msdn2.microsoft.com/en-us/library/ms254508.aspx

and then run a query like this

select ((Seq_No-1) / 4)+1 as Record_No, dbo.Concatenate(Data) as Data
into dest
from source
group by ((Seq_No-1) / 4)+1
go

select * from dest
go

|||

hi pramy,

please refer to this post

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=586833&SiteID=1

regards

|||

hi Derek,

thanks for ur reply. the data type is of varchar.

|||

pramy, you still need help on this issue? if not please mark an answer.

thanks,

derek

|||

hi all,

thanks for ur response.

Derek, i've got the solution for my problem and the query is as given below.

select 'data' = convert(varchar(100),(a.data)+''+(b.data)+''+(c.data)+''+(d.data))

from test_data a,test_data b,test_data c,test_data d

where ((b.seqno=a.seqno+1 and b.rowno=a.rowno+1)and(c.seqno=b.seqno+1 and c.rowno=b.rowno+1)and(d.seqno=c.seqno+1 and d.rowno=c.rowno+1))

how to combine text data rows into single row?

Hi!!!!

Need some quick help on SQL.....DTS packages.

I’ve loaded data from text files into a table which is in the following format.....

Seq_No

Row_No

Data

1

1

ABC

2

2

DEF

3

3

GHI

4

4

JKL

5

1

MNO

6

2

PQR

7

3

STU

8

4

VWX

Every four lines correspond to one single logical record. So, all the data in every 4 rows have to be combined into one big string which’ll then be loaded into one col of another temporary table .....structure below.....

Record_No

Data

1

ABCDEFGHIJKL

2

MNOPQRSTUVWX

I’m looking for a way to achieve this WITHOUT using Cursors (as it’ll slow down performance)......

Any suggestions will be highly appreciated.

what data type is the Data column?|||

One way is to use the CLR Aggregate function for string concatenation shown in the BOL

http://msdn2.microsoft.com/en-us/library/ms254508.aspx

and then run a query like this

select ((Seq_No-1) / 4)+1 as Record_No, dbo.Concatenate(Data) as Data
into dest
from source
group by ((Seq_No-1) / 4)+1
go

select * from dest
go

|||

hi pramy,

please refer to this post

http://forums.microsoft.com/MSDN/ShowPost.aspx?PostID=586833&SiteID=1

regards

|||

hi Derek,

thanks for ur reply. the data type is of varchar.

|||

pramy, you still need help on this issue? if not please mark an answer.

thanks,

derek

|||

hi all,

thanks for ur response.

Derek, i've got the solution for my problem and the query is as given below.

select 'data' = convert(varchar(100),(a.data)+''+(b.data)+''+(c.data)+''+(d.data))

from test_data a,test_data b,test_data c,test_data d

where ((b.seqno=a.seqno+1 and b.rowno=a.rowno+1)and(c.seqno=b.seqno+1 and c.rowno=b.rowno+1)and(d.seqno=c.seqno+1 and d.rowno=c.rowno+1))

Sunday, February 19, 2012

How to choose file structure on SQL database?

I created MDF file and LDF for one database on SQL server 2000.
I need to create more DNF files on other 5 logical drives for this datanase.
All these logical drives are located in SAN storage configured with RAID10.
Should I create one NDF on each logical drive OR create multiple DNF on each
logical drive?
Which way is better for performance?
Thanks,
Mike
What is DNF files? Is it NDF? Have you monitor your SQL Server to make such
decision?
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:FDBA14B3-18FC-4723-8D73-08A46ECD921C@.microsoft.com...
>I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this
> datanase.
> All these logical drives are located in SAN storage configured with
> RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on
> each
> logical drive?
> Which way is better for performance?
> Thanks,
|||Hello,
Probably you should be talking about NDF files. Since it is SAN just try
creating the database in a Single Logical drive (1 logical drive for MDF
and another for LDF) and see how database performs. See the I/O queue length
counter in perfmon and seee how well it goes.
If it quue length is always <=1 then you are good. I have the similar
environemnt and I have created database based on this strategy.
I will recommend you to keep the files in multiple drives if you have
multiple controllers running. Otherwise even if you create files
in multiple logical drives you will not get any performance improvements.
Thanks
Hari
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:FDBA14B3-18FC-4723-8D73-08A46ECD921C@.microsoft.com...
>I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this
> datanase.
> All these logical drives are located in SAN storage configured with
> RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on
> each
> logical drive?
> Which way is better for performance?
> Thanks,

How to choose file structure on SQL database?

I created MDF file and LDF for one database on SQL server 2000.
I need to create more DNF files on other 5 logical drives for this datanase.
All these logical drives are located in SAN storage configured with RAID10.
Should I create one NDF on each logical drive OR create multiple DNF on each
logical drive?
Which way is better for performance?
Thanks,Mike
What is DNF files? Is it NDF? Have you monitor your SQL Server to make such
decision?
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:FDBA14B3-18FC-4723-8D73-08A46ECD921C@.microsoft.com...
>I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this
> datanase.
> All these logical drives are located in SAN storage configured with
> RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on
> each
> logical drive?
> Which way is better for performance?
> Thanks,|||Mike Torry wrote:
> I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this datanas
e.
> All these logical drives are located in SAN storage configured with RAID10
.
> Should I create one NDF on each logical drive OR create multiple DNF on ea
ch
> logical drive?
> Which way is better for performance?
> Thanks,
Hi,
If it's logical drives rather than physical drives, it won't help you a
lot to split the files on several drives. If you want to increase
performance, the data will have to placed on different physical spindles
and also preferably on different controllers (in most cases you'll just
have your MDF files disks on one controller and your ldf files disks on
a second controller). If you have any influence on hos your SAN is being
configured, you should also consider have more spindles in an array
rather than having many arrays. Depending on the usage of your database
it will give a better performance to have more spindles to read from
rather than splitting the load on several arrays/disks.
Regards
Steen Schlüter Persson
Database Administrator / System Administrator|||Hello,
Probably you should be talking about NDF files. Since it is SAN just try
creating the database in a Single Logical drive (1 logical drive for MDF
and another for LDF) and see how database performs. See the I/O queue length
counter in perfmon and seee how well it goes.
If it quue length is always <=1 then you are good. I have the similar
environemnt and I have created database based on this strategy.
I will recommend you to keep the files in multiple drives if you have
multiple controllers running. Otherwise even if you create files
in multiple logical drives you will not get any performance improvements.
Thanks
Hari
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:FDBA14B3-18FC-4723-8D73-08A46ECD921C@.microsoft.com...
>I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this
> datanase.
> All these logical drives are located in SAN storage configured with
> RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on
> each
> logical drive?
> Which way is better for performance?
> Thanks,

How to choose file structure on SQL database?

I created MDF file and LDF for one database on SQL server 2000.
I need to create more DNF files on other 5 logical drives for this datanase.
All these logical drives are located in SAN storage configured with RAID10.
Should I create one NDF on each logical drive OR create multiple DNF on each
logical drive?
Which way is better for performance?
Thanks,Mike
What is DNF files? Is it NDF? Have you monitor your SQL Server to make such
decision?
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:FDBA14B3-18FC-4723-8D73-08A46ECD921C@.microsoft.com...
>I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this
> datanase.
> All these logical drives are located in SAN storage configured with
> RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on
> each
> logical drive?
> Which way is better for performance?
> Thanks,|||Mike Torry wrote:
> I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this datanase.
> All these logical drives are located in SAN storage configured with RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on each
> logical drive?
> Which way is better for performance?
> Thanks,
Hi,
If it's logical drives rather than physical drives, it won't help you a
lot to split the files on several drives. If you want to increase
performance, the data will have to placed on different physical spindles
and also preferably on different controllers (in most cases you'll just
have your MDF files disks on one controller and your ldf files disks on
a second controller). If you have any influence on hos your SAN is being
configured, you should also consider have more spindles in an array
rather than having many arrays. Depending on the usage of your database
it will give a better performance to have more spindles to read from
rather than splitting the load on several arrays/disks.
--
Regards
Steen Schlüter Persson
Database Administrator / System Administrator|||Hello,
Probably you should be talking about NDF files. Since it is SAN just try
creating the database in a Single Logical drive (1 logical drive for MDF
and another for LDF) and see how database performs. See the I/O queue length
counter in perfmon and seee how well it goes.
If it quue length is always <=1 then you are good. I have the similar
environemnt and I have created database based on this strategy.
I will recommend you to keep the files in multiple drives if you have
multiple controllers running. Otherwise even if you create files
in multiple logical drives you will not get any performance improvements.
Thanks
Hari
"Mike Torry" <MikeTorry@.discussions.microsoft.com> wrote in message
news:FDBA14B3-18FC-4723-8D73-08A46ECD921C@.microsoft.com...
>I created MDF file and LDF for one database on SQL server 2000.
> I need to create more DNF files on other 5 logical drives for this
> datanase.
> All these logical drives are located in SAN storage configured with
> RAID10.
> Should I create one NDF on each logical drive OR create multiple DNF on
> each
> logical drive?
> Which way is better for performance?
> Thanks,