Showing posts with label create. Show all posts
Showing posts with label create. Show all posts

Friday, March 30, 2012

please help me about :Unable to connect to SQL Server database.

To All Members,

When I create a new project and try to use theASP.Net web application administration :security tab, I get the following :

Thereis a problem with your selected data store. This can be caused by aninvalid server name or credentials, or by insufficient permission. Itcan also be caused by the role manager feature not being enabled. Clickthe button below to be redirected to a page where you can choose a newdata store.

The following message may help in diagnosing the problem:Unable to connect to SQL Server database.

I am usingMicrosoft Visual Web Developer 2005 Express Edition with a localMS SQL Server 2000.

I am new to all of this so a little help would be great

Thanks.

please mail me todehackers@.linuxmail.org

or izzuan@.malysia.com

Dear Izzuan,

I think the bug comes from your connection string, it should be as follows:

Data Source=myServerAddress;Initial Catalog=myDataBase;User Id=myUsername;Password=myPassword;

where

myServerAddress is the ip address or UNC name of your server (you can also use . character in place of your local server) If you are using a SQL instance, you should add it in this section: myServerAddress\instanceName|||

What I am guessing is that your DB Server does not have ASPNETDB database. First check to see if there is a database named ASPNETDB. If not, runaspnet_regsql.exe. You can find this exe in the following location:

C:\WINDOWS\Microsoft.NET\Framework\v2.0.50727 (XP)

C:\WINNT\Microsoft.NET\Framework\v2.0.50727 (Windows Server 2003)

This exe creates ASPNETDB database in your DB Server instance.

|||

Oh thaks sago...

i`ll try the solution u gave to me, but it still same eror running...

Actually in my server i have 2 localhost are running at the same time i want

to build a new localhost that using ASP.Net configuration

but it containt eror....

my previous d.base are use by MS accsess...

if i remove the MS SQL 2000 then i install WAMP application

either the d.Base (MS Access) are still running or maybe it will be crash?

|||

Hi izzuan,

Asp.net web site administration tool is indenpent of your IIS settings. Whether you have 2 localhost running at the same time or not have very little things to do with the administration tool. So i guess it's not the problem.

The web site administration tool will only connect to your application service database(aspnnetdb), make sure you have that database build up successfully. I suggest you to follow the suggestionbullpit gave you. Run aspnet_regsql first(since you are using sql2000) and then put some new providers into your web.config (another way is to add a new connection string named "localsqserver" into your web.config and direct it to the newaspnetdb which you get from asqnet_regsql).

You can refer to this link for more information:http://msdn2.microsoft.com/en-us/library/x28wfk74.aspx

Hope my suggestion helps

Wednesday, March 28, 2012

Please help debug.

Hi,
What's wrong with the following code? Please help. I am using MS SQL
2000.
create table one (
a float NOT NULL,
b varchar (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
alter table one
alter column a {drop} NOT NULL
alter column b {drop} NOT NULL
;
Thanks,
Mike
Please do not multi post.
Syntax usage is incorrect. Please use the below code to modify NOT NULL to
NULL
alter table one alter column a Float NULL
alter table one alter column b Varchar(50) NULL
Thanks
Hari
"Michael" wrote:

> Hi,
> What's wrong with the following code? Please help. I am using MS SQL
> 2000.
> create table one (
> a float NOT NULL,
> b varchar (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> )
> alter table one
> alter column a {drop} NOT NULL
> alter column b {drop} NOT NULL
> ;
> Thanks,
> Mike
>

Please help debug.

Hi,
What's wrong with the following code? Please help. I am using MS SQL
2000.
create table one (
a float NOT NULL,
b varchar (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
alter table one
alter column a {drop} NOT NULL
alter column b {drop} NOT NULL
;
Thanks,
MikePlease do not multi post.
Syntax usage is incorrect. Please use the below code to modify NOT NULL to
NULL
alter table one alter column a Float NULL
alter table one alter column b Varchar(50) NULL
Thanks
Hari
"Michael" wrote:
> Hi,
> What's wrong with the following code? Please help. I am using MS SQL
> 2000.
> create table one (
> a float NOT NULL,
> b varchar (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> )
> alter table one
> alter column a {drop} NOT NULL
> alter column b {drop} NOT NULL
> ;
> Thanks,
> Mike
>

Please help debug.

Hi,
What's wrong with the following code? Please help. I am using MS SQL
2000.
create table one (
a float NOT NULL,
b varchar (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
)
alter table one
alter column a {drop} NOT NULL
alter column b {drop} NOT NULL
;
Thanks,
MikePlease do not multi post.
Syntax usage is incorrect. Please use the below code to modify NOT NULL to
NULL
alter table one alter column a Float NULL
alter table one alter column b Varchar(50) NULL
Thanks
Hari
"Michael" wrote:

> Hi,
> What's wrong with the following code? Please help. I am using MS SQL
> 2000.
> create table one (
> a float NOT NULL,
> b varchar (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL
> )
> alter table one
> alter column a {drop} NOT NULL
> alter column b {drop} NOT NULL
> ;
> Thanks,
> Mike
>

Please help - unusual warning when creating a column

Hi everyone,
This is weird. I create a new column programatically using the "ALTER
TABLE" command (you know the one) inside SQL Query Analyzer. The
column is indeed created but the following warning is thrown:
WARNING: The table 'OrderRecords' has been created but its maximum row
size (15,420) exceeds the maximum number of bytes per row (8060).
INSERT or UPDATE of a row in this table will fail if the resulting row
length exceeds 8060 bytes
I then checked a likely column. I ran a wee query to find the maximum
row and it returned a row of maximum length of 2,647 characters.
Now I'm totally confused. Does anyone know why such a warning is being
thrown? Any suggestions/comments/ideas/queries to run - much
appreciated.
Puzzled,
Al.
The whole size of the rows exceeds 8060 bytes, thats the most possible
bytes SQl Server can handle per row, so this is just a warning (not an
error), that it might could be if you exceed the magic border, data
will be truncated.
If you are aware of that and you=B4ll be happy with it or you have
another way to handle this, this is fine, but you should keep that in
mind. For the best you should redesign your table by putting some
values in another table or thinking of changing the actual types of the
columns, if that is possible.
HTH, Jens Suessmeyer.
|||This means that the sum of all you columns can in theory be 15,420
bytes
If someone inserts data and it exceeds 8060 bytes, then the statement
will fail
look at all the field sizes in this table and make sure they don't
exceed 8060 bytes
http://sqlservercode.blogspot.com/
|||> This is weird. I create a new column programatically using the "ALTER
> TABLE" command (you know the one) inside SQL Query Analyzer. The
> column is indeed created but the following warning is thrown:
> WARNING: The table 'OrderRecords' has been created but its maximum row
> size (15,420) exceeds the maximum number of bytes per row (8060).
> INSERT or UPDATE of a row in this table will fail if the resulting row
> length exceeds 8060 bytes
It is a WARNING about the maximum possible rowsize based on the columns
defined for the table. Just guessing, but it is likely that you have a
couple (or a bunch) of large varchar columns in the table that could, if
completely filled with data, exceed the maximum possible rowsize supported
by sql server.
|||Thanks everyone - that's fine. I can live with that. Thanks for all
your feedback.
Al.
The happy one.

Please help - unusual warning when creating a column

Hi everyone,
This is weird. I create a new column programatically using the "ALTER
TABLE" command (you know the one) inside SQL Query Analyzer. The
column is indeed created but the following warning is thrown:
WARNING: The table 'OrderRecords' has been created but its maximum row
size (15,420) exceeds the maximum number of bytes per row (8060).
INSERT or UPDATE of a row in this table will fail if the resulting row
length exceeds 8060 bytes
I then checked a likely column. I ran a wee query to find the maximum
row and it returned a row of maximum length of 2,647 characters.
Now I'm totally confused. Does anyone know why such a warning is being
thrown? Any suggestions/comments/ideas/queries to run - much
appreciated.
Puzzled,
Al.The whole size of the rows exceeds 8060 bytes, thats the most possible
bytes SQl Server can handle per row, so this is just a warning (not an
error), that it might could be if you exceed the magic border, data
will be truncated.
If you are aware of that and you=B4ll be happy with it or you have
another way to handle this, this is fine, but you should keep that in
mind. For the best you should redesign your table by putting some
values in another table or thinking of changing the actual types of the
columns, if that is possible.
HTH, Jens Suessmeyer.|||This means that the sum of all you columns can in theory be 15,420
bytes
If someone inserts data and it exceeds 8060 bytes, then the statement
will fail
look at all the field sizes in this table and make sure they don't
exceed 8060 bytes
http://sqlservercode.blogspot.com/|||> This is weird. I create a new column programatically using the "ALTER
> TABLE" command (you know the one) inside SQL Query Analyzer. The
> column is indeed created but the following warning is thrown:
> WARNING: The table 'OrderRecords' has been created but its maximum row
> size (15,420) exceeds the maximum number of bytes per row (8060).
> INSERT or UPDATE of a row in this table will fail if the resulting row
> length exceeds 8060 bytes
It is a WARNING about the maximum possible rowsize based on the columns
defined for the table. Just guessing, but it is likely that you have a
couple (or a bunch) of large varchar columns in the table that could, if
completely filled with data, exceed the maximum possible rowsize supported
by sql server.|||Thanks everyone - that's fine. I can live with that. Thanks for all
your feedback.
Al.
The happy one.

Monday, March 26, 2012

Please help - unusual warning when creating a column

Hi everyone,
This is weird. I create a new column programatically using the "ALTER
TABLE" command (you know the one) inside SQL Query Analyzer. The
column is indeed created but the following warning is thrown:
WARNING: The table 'OrderRecords' has been created but its maximum row
size (15,420) exceeds the maximum number of bytes per row (8060).
INSERT or UPDATE of a row in this table will fail if the resulting row
length exceeds 8060 bytes
I then checked a likely column. I ran a wee query to find the maximum
row and it returned a row of maximum length of 2,647 characters.
Now I'm totally confused. Does anyone know why such a warning is being
thrown? Any suggestions/comments/ideas/queries to run - much
appreciated.
Puzzled,
Al.The whole size of the rows exceeds 8060 bytes, thats the most possible
bytes SQl Server can handle per row, so this is just a warning (not an
error), that it might could be if you exceed the magic border, data
will be truncated.
If you are aware of that and you=B4ll be happy with it or you have
another way to handle this, this is fine, but you should keep that in
mind. For the best you should redesign your table by putting some
values in another table or thinking of changing the actual types of the
columns, if that is possible.
HTH, Jens Suessmeyer.|||This means that the sum of all you columns can in theory be 15,420
bytes
If someone inserts data and it exceeds 8060 bytes, then the statement
will fail
look at all the field sizes in this table and make sure they don't
exceed 8060 bytes
http://sqlservercode.blogspot.com/|||> This is weird. I create a new column programatically using the "ALTER
> TABLE" command (you know the one) inside SQL Query Analyzer. The
> column is indeed created but the following warning is thrown:
> WARNING: The table 'OrderRecords' has been created but its maximum row
> size (15,420) exceeds the maximum number of bytes per row (8060).
> INSERT or UPDATE of a row in this table will fail if the resulting row
> length exceeds 8060 bytes
It is a WARNING about the maximum possible rowsize based on the columns
defined for the table. Just guessing, but it is likely that you have a
couple (or a bunch) of large varchar columns in the table that could, if
completely filled with data, exceed the maximum possible rowsize supported
by sql server.|||Thanks everyone - that's fine. I can live with that. Thanks for all
your feedback.
Al.
The happy one.

Please help - setting order of select in a self-referencing table

Hello,
I have a table of product categories that looks like this (air code, so
could be some typos, but it's basically right)...
create table producttypes (
ptype int not null identity(1,1) primary key,
typename varchar(50) not null default '',
ParentCat int references producttypes(ptype)
)
This allows categories to contain subcategories and so on.
In order to allow me to see the hierarchy, I am using the following
code, modified from some found in "Inside SQL Server 7.0" by Kalen
Delaney.
-- SQL starts
declare @.level int, @.current int
create table #stack (depthlevel int, ptype int)
create table #orgchart (seqno int identity, orglevel int not null, ptype int
not null)
set rowcount 1
select @.level=1, @.current=ptype from producttypes where ptype=parentcat
set rowcount 0
insert into #stack (depthlevel, ptype) values (@.level, @.current)
while (@.level>0)
begin
if exists (select * from #stack where depthlevel=@.level)
begin
set rowcount 1
select @.current=ptype from #stack where depthlevel=@.level
set rowcount 0
insert into #orgchart (orglevel, ptype) select @.level, @.current
delete from #stack where depthlevel=@.level and ptype=@.current
insert into #stack select @.level+1, ptype from producttypes where parentcat=
@.current and parentcat<>ptype
if @.@.ROWCOUNT > 0 select @.level=@.level+1
end
else
select @.level=@.level-1
end
select o.orglevel, e.ptype, e.parentcat, e.typename from #orgchart as o
join producttypes as e on e.ptype=o.ptype order by o.seqno
drop table #stack, #orgchart
-- SQL ends
This produces a set of results that gives me all the categories. I can
use the orglevel field to tell what level I'm at, so if it changes, I
can see if I've gone up or down the hierarchy.
Now, the problem is that I can't work out how to set the order of
categories. For example, if the above SQL produces...
1 16 16 Products
2 17 16 Outdoor Toys
3 1 17 Trampolines
3 2 17 Slides
3 3 17 Swings
3 4 17 Accessories
3 5 17 Climbing Frames
3 7 17 Bicycles
you can see that the categories on level 3 are not in any obvious order.
I would like to have them in alphabetical order.
Any ideas how I would modify the above SQL to do this? TIA
Alan Silver
(anything added below this line is nothing to do with me)Try
select o.orglevel, e.ptype, e.parentcat, e.typename from #orgchart as o
join producttypes as e on e.ptype=o.ptype order by o.seqno, e.typename
The results should be sorted first by the orglevel, and results within the
same orglevel will be sorted alphabetically. The syntax reads like "order
results first by o.seqno, then by e.typename"
"Alan Silver" wrote:

> Hello,
> I have a table of product categories that looks like this (air code, so
> could be some typos, but it's basically right)...
> create table producttypes (
> ptype int not null identity(1,1) primary key,
> typename varchar(50) not null default '',
> ParentCat int references producttypes(ptype)
> )
> This allows categories to contain subcategories and so on.
> In order to allow me to see the hierarchy, I am using the following
> code, modified from some found in "Inside SQL Server 7.0" by Kalen
> Delaney.
> -- SQL starts
> declare @.level int, @.current int
> create table #stack (depthlevel int, ptype int)
> create table #orgchart (seqno int identity, orglevel int not null, ptype i
nt not null)
> set rowcount 1
> select @.level=1, @.current=ptype from producttypes where ptype=parentcat
> set rowcount 0
> insert into #stack (depthlevel, ptype) values (@.level, @.current)
> while (@.level>0)
> begin
> if exists (select * from #stack where depthlevel=@.level)
> begin
> set rowcount 1
> select @.current=ptype from #stack where depthlevel=@.level
> set rowcount 0
> insert into #orgchart (orglevel, ptype) select @.level, @.current
> delete from #stack where depthlevel=@.level and ptype=@.current
> insert into #stack select @.level+1, ptype from producttypes where par
entcat=@.current and parentcat<>ptype
> if @.@.ROWCOUNT > 0 select @.level=@.level+1
> end
> else
> select @.level=@.level-1
> end
> select o.orglevel, e.ptype, e.parentcat, e.typename from #orgchart as o
> join producttypes as e on e.ptype=o.ptype order by o.seqno
> drop table #stack, #orgchart
> -- SQL ends
>
> This produces a set of results that gives me all the categories. I can
> use the orglevel field to tell what level I'm at, so if it changes, I
> can see if I've gone up or down the hierarchy.
> Now, the problem is that I can't work out how to set the order of
> categories. For example, if the above SQL produces...
> 1 16 16 Products
> 2 17 16 Outdoor Toys
> 3 1 17 Trampolines
> 3 2 17 Slides
> 3 3 17 Swings
> 3 4 17 Accessories
> 3 5 17 Climbing Frames
> 3 7 17 Bicycles
> you can see that the categories on level 3 are not in any obvious order.
> I would like to have them in alphabetical order.
> Any ideas how I would modify the above SQL to do this? TIA
> --
> Alan Silver
> (anything added below this line is nothing to do with me)
>|||>Try
>select o.orglevel, e.ptype, e.parentcat, e.typename from #orgchart as o
>join producttypes as e on e.ptype=o.ptype order by o.seqno, e.typename
>The results should be sorted first by the orglevel, and results within the
>same orglevel will be sorted alphabetically. The syntax reads like "order
>results first by o.seqno, then by e.typename"
Mark,
Thanks for the reply, but if you look carefully, it's not that simple.
Your suggestion will list all level 2 categories together, followed by
all level 3 and so on. This will not give the correct hierarchy as there
may be several level 2 categories each with subcategories (ie level 3).
If this isn't clear, look at the longer category listing shown later on.
This is a more complete list than the abbreviated one I showed before.
Note that the ordering is done on seqno, which is the order in which the
categories were put into the orgchart table. The ordering is not done on
the level at all.
I think I need to modify the way the categories are pulled out of the
producttypes table when they are inserted into the stack table. Trouble
is, I can't see how to control the ordering as they are being pulled one
at a time.
Thanks for the reply. Any further help would be appreciated.
Longer category listing follows...
level typename
1 Products
2 Outdoor Toys
3 Trampolines
3 Slides
3 Swings
3 Accessories
3 Climbing Frames
3 Bicycles
2 Indoor Toys
3 Snooker Tables
3 Boy's Toys
4 Hard Puzzles
3 Girl's Toys
4 Easy Puzzles
3 Board Games
3 Pets
4 Ferrets
4 Dogs
4 Cats
>"Alan Silver" wrote:
>
Alan Silver
(anything added below this line is nothing to do with me)sql

please help

Hi! I'm new at asp .net programming, and would appreciate a littlehelp with a problem I have. I am trying to create a social network, andthe aim of this specific VB page is to show all of the friends of theuser who is logged in. I would like to do this without using gridviews,so that I have more freedom in the way the results of the select areshown and formatted. I found some code which is perfect for anotherpage where I simply show all the users in the database. However, forthis page where I show the friends of the logged in user, I am havingdifficulties because I need to use a parameter @.Param1 which passes thevalue of the username of who is logged in. Previously I was doing thiswith gridviews, and the passing of the parameter was easy, since on thepagepreinit I could declare Session("username") = User.Identity.Nameand then simply use username inside the select command of thesqldatasource ( <asp:SessionParameter Name="Param1"SessionField="username" />)

However, now without the gridview I don't know how I can continue using this parameter. Any suggestions?
Thanks a lot!

Here is the VB code:

<%@. Page Language="VB" MasterPageFile="~/MasterPage.master" Title="Untitled Page" %
<%@. Import Namespace="System.Data" %>
<%@. Import Namespace="System.Data.SqlClient" %
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" Runat="Server"
<script language="VB" runat="server">
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)
Page.Theme = Profile.MyTheme
Session("username") = User.Identity.Name

End Sub
Sub Page_Load(Sender As Object, E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As New SqlDataAdapter


' MyCommand.SelectCommand.Parameters.AddWithValue("@.Param1", "")
' not sure about the above line, something is missing


MyConnection = New SqlConnection("DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;IntegratedSecurity=True;User Instance=True")
MyCommand = NewSqlDataAdapter("select c.UserName from aspnet_Users a inner joinaspnet_friendship b on (a.userId = b.userId or a.userId = b.buddyId)inner join aspnet_Users c on (b.userId = c.userId or b.buddyId =c.userId) where a.UserName = @.Param1 and c.UserName <>@.Param1", MyConnection)
DS = New DataSet()
MyCommand.Fill(DS, "aspnet_Users")

MyDataList.DataSource = DS.Tables("aspnet_Users").DefaultView
MyDataList.DataBind()
End Sub

</script
<body
<br />
<asp:TextBox ID="TextBox1" runat="server"></asp:TextBox
<ASP:DataList id="MyDataList" RepeatColumns="1" runat="server"
<ItemTemplate
<table cellpadding=10 style="font: 10pt verdana">
<tr>
<td width=1 bgcolor="BD8672"/
<td valign="top">

</td
<td valign="top"
<b>Name: </b><%#DataBinder.Eval(Container.DataItem, "UserName")%><br>
<b>Photo: </b><%#DataBinder.Eval(Container.DataItem, "UserName")%><br>
<p
<a href='<%# DataBinder.Eval(Container.DataItem, "UserName", "purchase.aspx?titleid={0}") %>' >
<img border="0" src="http://pics.10026.com/?src=/quickstart/aspplus/images/purchase_book.gif" >
</a
</td>
</tr>
</table
</ItemTemplate
</ASP:DataList

</body
</asp:Content>

This should do what you are looking for

Sub Page_Load(Sender As Object, E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter


MyConnection = New SqlConnection("DataSource=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;IntegratedSecurity=True;User Instance=True")
MyCommand = NewSqlDataAdapter("select c.UserName from aspnet_Users a inner joinaspnet_friendship b on (a.userId = b.userId or a.userId = b.buddyId)inner join aspnet_Users c on (b.userId = c.userId or b.buddyId =c.userId) where a.UserName = @.Param1 and c.UserName <>@.Param1", MyConnection)

MyCommand.SelectCommand.Parameters.AddWithValue("@.Param1", Session("username"))


DS = New DataSet()
MyCommand.Fill(DS, "aspnet_Users")

MyDataList.DataSource = DS.Tables("aspnet_Users").DefaultView
MyDataList.DataBind()
End Sub

|||

Thanks for the help. Now I get an error in the line:

MyCommand.Fill(DS, "aspnet_Users")

The error is: "The parameterized query '(@.Param1 nvarchar(4000))select c.UserName fromaspnet_Users a in' expects the parameter '@.Param1', which was notsupplied."

I am not sure what I should include inside the MyCommand.Fill in order to show the results that I want, considering what I posted before. I would like to show the friends of the logged in user.
I'm sorry I have to ask all this, but I am relatively new at this and would appreciate any help :)

Thanks.


|||

Hi!

I managed to solve the problem :)

The final code is:

<script language="VB" runat="server">
Protected Sub Page_PreInit(ByVal sender As Object, ByVal e As System.EventArgs)
Page.Theme = Profile.MyTheme
Session("username") = User.Identity.Name
End Sub
Sub Page_Load(ByVal Sender As Object, ByVal E As EventArgs)

Dim DS As DataSet
Dim MyConnection As SqlConnection
Dim MyCommand As SqlDataAdapter


MyConnection = New SqlConnection("Data Source=.\SQLEXPRESS;AttachDbFilename=|DataDirectory|\ASPNETDB.MDF;Integrated Security=True;User Instance=True")

MyCommand = New SqlDataAdapter("select c.UserName from aspnet_Users a inner join aspnet_friendship b on (a.userId = b.userId or a.userId = b.buddyId) inner join aspnet_Users c on (b.userId = c.userId or b.buddyId = c.userId) where a.UserName = @.Param1 and c.UserName <> @.Param1", MyConnection)

MyCommand.SelectCommand.Parameters.AddWithValue("@.Param1", Session("username"))

DS = New DataSet()
MyCommand.Fill(DS, "aspnet_friendship")

MyDataList.DataSource = DS.Tables("aspnet_friendship").DefaultView
MyDataList.DataBind()
End Sub
</script>

Thanks once again.

Friday, March 23, 2012

Please guide - especially about Time Dimension and approach in general

Hi,

I have a table which contains all the transaction details for which I am trying to create a CUBE... The explanation below in brackets is only for clarity about each field. Kindly note that I am using the following table as my fact table. Let's call it tblFact

This table contains fields like transaction date, Product (which is sold), Product Family (to which the Product Belongs), Brand (of the product), Qty sold, Unit Price (at which each unit was sold), and some other fields.

I have created a Product dimension based on tblFact. I don't know if this is a good idea or not :confused: Is it okay and am I on the right track or should I base my Product Dimension on some other table (say tblProducts and then in the Cube editor link tblProducts with tblFact based on the ProductID field? Please guide.

Now coming to my last question:
Currently I am also creating my Time Dimension based on tblFact. Is this also a wrong approach?
1. Should I instead create the Time Dimension based on a different table (say tblTime) and again link up tblTime and tblFact in the Cube editor?

2. if yes, then how do I create tblTime from tblFact in a manner that it only contains all the transaction dates.

3. Assuming that I should take the tblTime approach, then should this table (tblTime) also contain the ProductID - representing the Product which was sold for each date in tblTime?

I realize that this is a lenghty post but reply and more importantly guidance from the experienced users will be greatly appreciated becuase I have recently started learning/playing around on the OLAP side of things and I know that this is the time that I get my foundations correct otherwise I'll end up getting used to some bad practice and will find it difficult to change my approach to cube designing later down the road.

So many thanks in advance and I eagerly look forward to reply from someone.No worries mate,

This is what the forum is for...

Ok - Down to what you need to do

When doing the design for a cube I always do a bit of anyalsis first. Looks like you have crack this bit. You know what your dimensions are - Time , product , brand etc This is what you should group on to build your fact table.

Your facts are going to be Qty Sold , Price. This is what you will be suming on with the SQL to build your fact table.

You said "should I base my Product Dimension on some other table (say tblProducts and then in the Cube editor link tblProducts with tblFact based on the ProductID field? Please guide."

This is exactly what a good cube design is based on mate.

I presume the basis of your fact table is a transactions type table.
First thing you need to do is build all your dimension tables.

A table for product dimension table should look something like :

create table tblProduct
(prod_id tinyint ,
prod_txt varchar (255)
)

Don't forget to put in a id for unknown product - just in case you get these in your base transaction table

Build the rest of your dimension tables like this and assign a tinyint composite key to each dimension. What you what is your fact table to be as small as possible in terms of datatypes.

Now once you have this you want to build your fact table.

What you do is take your fact table and join to each of you dimension tables (should be a left outer join) and sum on the qty and unit price and group up accross all your dimensions.

This now should be you fact table that you can reference in Anyalsis Manager. You will have to define all this with in here as well.

Whoo, that was an effort.

Any problems , questions give me a shout

Cheers|||Hi aldo_2003,

Many thanks for the reply. It answers a good number of my questions. Can you kindly advise regarding the remaining question i.e. the quoted portions below:

Build the rest of your dimension tables like this and assign a tinyint composite key to each dimension. What you what is your fact table to be as small as possible in terms of datatypes.
Question: By composite key do you mean define a Primary key in each table? I will do so but was planning to define the data type for my ProductID field (for example) in my tblProducts as int. However I'll follow your advise and instead use the datatype tinyint. Thanks for the tip :)

And my last question hopefully:
Now coming to my last question:
Currently I am also creating my Time Dimension based on tblFact. Is this also a wrong approach?
1. Should I instead create the Time Dimension based on a different table (say tblTime) and again link up tblTime and tblFact in the Cube editor?

2. if yes, then how do I create tblTime from tblFact in a manner that it only contains all the transaction dates.

3. Assuming that I should take the tblTime approach, then should this table (tblTime) also contain the ProductID - representing the Product which was sold for each date in tblTime?

I think Part 2 (above) is easy and all I have to do is make a copy of tblFact but this copy (say tblTime) will only contain the transaction date column (from tblFact). Kindly confirm my understanding.

However it's the answer to part 1 (above) and especially the part 3 above that is requested.

Looking forward to your reply.|||Your welcome,

forgot about the time question

what you want to do is create a tblTime dimension table

should basically have the grandularity that you want to use

you can find scripts on the net that will help you create and manage a time dimension table.

table should look like

create table tblTime
(date_time smalldatetime,
quarter tinyint,
month tinyint,
week tinyint ,
day int
)

populate this table with all the dates in your date range i.e

Jan 1999 12:00am to Jan 2009 12:00am

This is now your time dimension table.
Using anyalsis manager join back on to the fact table.
Anyalsis manager should guide you through the process of creating a time dimension.

Hope this helps

p.s the only reason I used a tinyint is that I assumed you would have no more than 255 products, if you have more then up the datatype to what you need

Cheers|||Hi again,

Don't mean to "over-flatter" but your replies REALLY have been of great help... Here I was trying to build everything (the fact as well as the dimensions) using only a single table and now I am quite clear regarding what's the right approach :)

3 last questions please :rolleyes:

you can find scripts on the net that will help you create and manage a time dimension table.
table should look like

create table tblTime
(date_time smalldatetime,
quarter tinyint,
month tinyint,
week tinyint ,
day int
)

That's another new tip :) Can u kindly guide where I can get these scripts from? I am assuming that these scripts will not only create the table (in a similar structure as you have suggested above) but will also populate the table with the all the desired date ranges e.g. Jan 1999 12:00am to Jan 2009 12:00am.

2nd last question: So my approach which I was assuming for creating tblTime (for the Time dimension was incorrect) i.e. I thought that this will simply contain the ALL the transaction dates from the transaction table (as I described in my previous post). But from your reply my understanding is that this approach is wrong.

and the last question: So the tblTime does not have to store the ProductID?

Sorry for all the botheration.|||No worries buddy

Glad to be of help

The time dimension table is stand alone and does not have to contain any other info other than time info.

I'll see if my collegue know and get back to you

Cheers|||http://www.databasejournal.com/features/mssql/article.php/10894_1466091_6

http://www.winnetmag.com/Article/ArticleID/23142/Windows_23142.html|||Originally posted by aldo_2003
The time dimension table is stand alone and does not have to contain any other info other than time info.

I'll see if my collegue know and get back to you

Cheers

Thanks aldo : for the reply, the link to articles, and also for the clarification about the time dimension's underlying table containing only time related information.

Kindly do let me know if you get a script which not only creates the table for time but also populates it ...

Bless you!|||Check this link http://www.winnetmag.com/Articles/ArticleID/41531/pg/4/4.html for any help.|||Originally posted by Satya
Check this link http://www.winnetmag.com/Articles/ArticleID/41531/pg/4/4.html for any help.

Hi Satya,

Many sincere thanks for the article. I went through it...

However at this stage I am learning the basics (as evident from this post and my questions to aldo) therefore I found he article to be real "HEVY STUFF" and very difficult to digest at the moment. I talks about the MDX world and that's something that I have yet to explore... I know I will have to get into MDX soon but have enough of the basic to get right first :)

I however would like to request if you can help me with another post from me in this forum (Subject" Need help to create my Time Dimension")... it's somewhat related to portion of the discussion in this post but I did not want to unnecessarily prolong this particular thread/post...

Looking forward to your help in my other post.

Thanks again and regards.|||Joozh
Since this has been answered so well i just wanted to chime in and suggest some reading for you

The Data Warehouse Toolkit by Ralph Kimball (http://www.bestwebbuys.com/books/compare/isbn/0471200247/isrc/b-home-search)

this is the second edition of this book revised in 2002 and it is a must have for every OLAP develper.sql

Please create news group for Log Shipping

Please create news group for Log Shipping
That is probably not going to happen. Microsoft has a pretty clear purpose
for each newsgroup, yet the newsgroups are broad enough to make it easy to
find what one is looking for without having to search thousands of
newsgroups for information.
If you have a question regarding log shipping it would probably fit best
within .server (or possibly .setup). Then again, many knowledgeable people
hang out in all the sqlserver groups so you are probably going to get a hit
no matter where you post.
in the meantime, check out these links:
314515 INF: Frequently Asked Questions - SQL Server 2000 - Log Shipping
http://support.microsoft.com/?id=314515
323135 INF: Microsoft SQL Server 2000 - How to Set Up Log Shipping (White
Paper)
http://support.microsoft.com/?id=323135
325220 Support WebCast: Microsoft SQL Server 2000 Log Shipping
http://support.microsoft.com/?id=325220
821786 Support WebCast: Microsoft SQL Server 2000: Using Log Shipping
http://support.microsoft.com/?id=821786
321247 HOW TO: Configure Security for Log Shipping
http://support.microsoft.com/?id=321247
329133 INF: Troubleshooting SQL Server 2000 Log Shipping "Out of Sync"
Errors
http://support.microsoft.com/?id=329133
Keith
"Mayur Dhondekar" <dmny2k@.hotmail.com> wrote in message
news:2d08001c469c8$f0a55800$a501280a@.phx.gbl...
> Please create news group for Log Shipping
|||Hi
I already checked the documents on microsoft web sites. i
have opened a new message and looking for some kind of
workaround on that problem.
Thanks
Mayur

>--Original Message--
>That is probably not going to happen. Microsoft has a
pretty clear purpose
>for each newsgroup, yet the newsgroups are broad enough
to make it easy to
>find what one is looking for without having to search
thousands of
>newsgroups for information.
>If you have a question regarding log shipping it would
probably fit best
>within .server (or possibly .setup). Then again, many
knowledgeable people
>hang out in all the sqlserver groups so you are probably
going to get a hit
>no matter where you post.
>in the meantime, check out these links:
>314515 INF: Frequently Asked Questions - SQL Server 2000 -
Log Shipping
>http://support.microsoft.com/?id=314515
>323135 INF: Microsoft SQL Server 2000 - How to Set Up Log
Shipping (White
>Paper)
>http://support.microsoft.com/?id=323135
>325220 Support WebCast: Microsoft SQL Server 2000 Log
Shipping
>http://support.microsoft.com/?id=325220
>821786 Support WebCast: Microsoft SQL Server 2000: Using
Log Shipping
>http://support.microsoft.com/?id=821786
>321247 HOW TO: Configure Security for Log Shipping
>http://support.microsoft.com/?id=321247
>329133 INF: Troubleshooting SQL Server 2000 Log
Shipping "Out of Sync"
>Errors
>http://support.microsoft.com/?id=329133
>--
>Keith
>
>"Mayur Dhondekar" <dmny2k@.hotmail.com> wrote in message
>news:2d08001c469c8$f0a55800$a501280a@.phx.gbl...
>.
>

Please create news group for Log Shipping

Please create news group for Log ShippingThat is probably not going to happen. Microsoft has a pretty clear purpose
for each newsgroup, yet the newsgroups are broad enough to make it easy to
find what one is looking for without having to search thousands of
newsgroups for information.
If you have a question regarding log shipping it would probably fit best
within .server (or possibly .setup). Then again, many knowledgeable people
hang out in all the sqlserver groups so you are probably going to get a hit
no matter where you post.
in the meantime, check out these links:
314515 INF: Frequently Asked Questions - SQL Server 2000 - Log Shipping
http://support.microsoft.com/?id=314515
323135 INF: Microsoft SQL Server 2000 - How to Set Up Log Shipping (White
Paper)
http://support.microsoft.com/?id=323135
325220 Support WebCast: Microsoft SQL Server 2000 Log Shipping
http://support.microsoft.com/?id=325220
821786 Support WebCast: Microsoft SQL Server 2000: Using Log Shipping
http://support.microsoft.com/?id=821786
321247 HOW TO: Configure Security for Log Shipping
http://support.microsoft.com/?id=321247
329133 INF: Troubleshooting SQL Server 2000 Log Shipping "Out of Sync"
Errors
http://support.microsoft.com/?id=329133
Keith
"Mayur Dhondekar" <dmny2k@.hotmail.com> wrote in message
news:2d08001c469c8$f0a55800$a501280a@.phx
.gbl...
> Please create news group for Log Shipping|||Hi
I already checked the documents on microsoft web sites. i
have opened a new message and looking for some kind of
workaround on that problem.
Thanks
Mayur

>--Original Message--
>That is probably not going to happen. Microsoft has a
pretty clear purpose
>for each newsgroup, yet the newsgroups are broad enough
to make it easy to
>find what one is looking for without having to search
thousands of
>newsgroups for information.
>If you have a question regarding log shipping it would
probably fit best
>within .server (or possibly .setup). Then again, many
knowledgeable people
>hang out in all the sqlserver groups so you are probably
going to get a hit
>no matter where you post.
>in the meantime, check out these links:
>314515 INF: Frequently Asked Questions - SQL Server 2000 -
Log Shipping
>http://support.microsoft.com/?id=314515
>323135 INF: Microsoft SQL Server 2000 - How to Set Up Log
Shipping (White
>Paper)
>http://support.microsoft.com/?id=323135
>325220 Support WebCast: Microsoft SQL Server 2000 Log
Shipping
>http://support.microsoft.com/?id=325220
>821786 Support WebCast: Microsoft SQL Server 2000: Using
Log Shipping
>http://support.microsoft.com/?id=821786
>321247 HOW TO: Configure Security for Log Shipping
>http://support.microsoft.com/?id=321247
>329133 INF: Troubleshooting SQL Server 2000 Log
Shipping "Out of Sync"
>Errors
>http://support.microsoft.com/?id=329133
>--
>Keith
>
>"Mayur Dhondekar" <dmny2k@.hotmail.com> wrote in message
> news:2d08001c469c8$f0a55800$a501280a@.phx
.gbl...
>.
>

Please create news group for Log Shipping

Please create news group for Log ShippingThat is probably not going to happen. Microsoft has a pretty clear purpose
for each newsgroup, yet the newsgroups are broad enough to make it easy to
find what one is looking for without having to search thousands of
newsgroups for information.
If you have a question regarding log shipping it would probably fit best
within .server (or possibly .setup). Then again, many knowledgeable people
hang out in all the sqlserver groups so you are probably going to get a hit
no matter where you post.
in the meantime, check out these links:
314515 INF: Frequently Asked Questions - SQL Server 2000 - Log Shipping
http://support.microsoft.com/?id=314515
323135 INF: Microsoft SQL Server 2000 - How to Set Up Log Shipping (White
Paper)
http://support.microsoft.com/?id=323135
325220 Support WebCast: Microsoft SQL Server 2000 Log Shipping
http://support.microsoft.com/?id=325220
821786 Support WebCast: Microsoft SQL Server 2000: Using Log Shipping
http://support.microsoft.com/?id=821786
321247 HOW TO: Configure Security for Log Shipping
http://support.microsoft.com/?id=321247
329133 INF: Troubleshooting SQL Server 2000 Log Shipping "Out of Sync"
Errors
http://support.microsoft.com/?id=329133
--
Keith
"Mayur Dhondekar" <dmny2k@.hotmail.com> wrote in message
news:2d08001c469c8$f0a55800$a501280a@.phx.gbl...
> Please create news group for Log Shipping|||Hi
I already checked the documents on microsoft web sites. i
have opened a new message and looking for some kind of
workaround on that problem.
Thanks
Mayur
>--Original Message--
>That is probably not going to happen. Microsoft has a
pretty clear purpose
>for each newsgroup, yet the newsgroups are broad enough
to make it easy to
>find what one is looking for without having to search
thousands of
>newsgroups for information.
>If you have a question regarding log shipping it would
probably fit best
>within .server (or possibly .setup). Then again, many
knowledgeable people
>hang out in all the sqlserver groups so you are probably
going to get a hit
>no matter where you post.
>in the meantime, check out these links:
>314515 INF: Frequently Asked Questions - SQL Server 2000 -
Log Shipping
>http://support.microsoft.com/?id=314515
>323135 INF: Microsoft SQL Server 2000 - How to Set Up Log
Shipping (White
>Paper)
>http://support.microsoft.com/?id=323135
>325220 Support WebCast: Microsoft SQL Server 2000 Log
Shipping
>http://support.microsoft.com/?id=325220
>821786 Support WebCast: Microsoft SQL Server 2000: Using
Log Shipping
>http://support.microsoft.com/?id=821786
>321247 HOW TO: Configure Security for Log Shipping
>http://support.microsoft.com/?id=321247
>329133 INF: Troubleshooting SQL Server 2000 Log
Shipping "Out of Sync"
>Errors
>http://support.microsoft.com/?id=329133
>--
>Keith
>
>"Mayur Dhondekar" <dmny2k@.hotmail.com> wrote in message
>news:2d08001c469c8$f0a55800$a501280a@.phx.gbl...
>> Please create news group for Log Shipping
>.
>

please check this SP syntax - need more eyes!

when I try to create this SP I get: "incorrect syntax near @.MyResult"
I have tried INT and different variable names, but get same error.

CREATE PROCEDURE sp_IsValidLogon
@.UserName varchar(16),
@.Password varchar(16) ,
@.MyResult varchar(3) OUTPUT
As
if exists(Select * From User_Table
Where UserName = @.UserName
And
Password = @.Password)
begin
@.MyResult = 1
end
else
begin
INSERT INTO FailedLogons(UserName, Password)
values(@.UserName, @.Password)

declare @.totalFails int
Select @.totalFails = Count(*) From FailedLogons
Where UserName = @.UserName
And dtFailed > GetDate()-1

if (@.totalFails > 5)
UPDATE User_Table Set Active = 0
Where UserName = @.UserName

@.MyResult = 0
endThe answer is

SET @.MyResult = ...|||Thanks George,
That's sorted it.
I seem to have two threads in this forum now tho' :o sorry guys.|||No worries - I will remove the dupe :)

Wednesday, March 21, 2012

Please Assist... Report Templates to save time in designing

In RS 2000 I was able to create a template report and put it in the Project
Items directory, then when I would select New Report Item, I could choose my
template report instead of redesigning everything from scratch.
Where is this folder, or to better phrase this question:
Where do I put my template reports that I want to show up when I choose "Add
new report item" in the designer in SQL 2005 RS?
I have checked the folders - but obviously I am missing something.
Thanks in advance!
=-ChrisI had to search through my computer for *.rdl files. Finally I think I found
the templates at
C:\Program Files\Microsoft Visual Studio
8\Common7\IDE\PrivateAssemblies\ProjectItems\ReportProject
Kaisa M. Lindahl Lervik
"Chris Conner" <Chris.Conner@.NOSPAMPolarisLibrary.com> wrote in message
news:uOtrsue%23GHA.1220@.TK2MSFTNGP05.phx.gbl...
> In RS 2000 I was able to create a template report and put it in the
> Project
> Items directory, then when I would select New Report Item, I could choose
> my
> template report instead of redesigning everything from scratch.
> Where is this folder, or to better phrase this question:
> Where do I put my template reports that I want to show up when I choose
> "Add
> new report item" in the designer in SQL 2005 RS?
> I have checked the folders - but obviously I am missing something.
> Thanks in advance!
> =-Chris
>

please .....i need help

hi ...
how could i create report with vc++ using crystal report ?and how to use crystal report view class?? is there any tutorial or sample code avaliable somewhere .
thanks alot for interest in my query .See if you find tutorials here
support.businessobjects.com

Tuesday, March 20, 2012

placing system table filegroup and Log files on same drive

Is it better to create a seperate filegroup for all user tables ? And if so
should all the system tables that belong to the Primary filegroup reside on
the same drive with the log file . I am using SQL 2000. Which system tables
get hit the most daily for any inserts,updates and deletes that may be
occuring on the server
ThanksDepends on the disk configuration.
I believe it is generally recommended to separate the log file from any data
files, i.e., separate physical disks... however, if you have a multiple
channel controller, with high thoroughput on each channel, you may be able
to get by w/ having the log and the data on the same logical disk.
I believe that all system tables must reside in PRIMARY, I'd have to verify.
If that is true, it doesn't matter what system tables get inserts, updates,
deletes. However, you are taking away some fault tolerance if you put the
system tables and the log files on the same physical disk.
"Hassan" <fatima_ja@.hotmail.com> wrote in message
news:%23AKD5sEXDHA.1872@.TK2MSFTNGP12.phx.gbl...
> Is it better to create a seperate filegroup for all user tables ? And if
so
> should all the system tables that belong to the Primary filegroup reside
on
> the same drive with the log file . I am using SQL 2000. Which system
tables
> get hit the most daily for any inserts,updates and deletes that may be
> occuring on the server
> Thanks
>|||You also generally want log files on RAID 1 or 10 as they are continuously
sequentially writing.
Thanks,
Greg H
"Martin Schmid" <martinschmid@.sbcglobal.net.nospam> wrote in message
news:eoDKm2EXDHA.2212@.TK2MSFTNGP09.phx.gbl...
> Depends on the disk configuration.
> I believe it is generally recommended to separate the log file from any
data
> files, i.e., separate physical disks... however, if you have a multiple
> channel controller, with high thoroughput on each channel, you may be able
> to get by w/ having the log and the data on the same logical disk.
> I believe that all system tables must reside in PRIMARY, I'd have to
verify.
> If that is true, it doesn't matter what system tables get inserts,
updates,
> deletes. However, you are taking away some fault tolerance if you put the
> system tables and the log files on the same physical disk.
>
> "Hassan" <fatima_ja@.hotmail.com> wrote in message
> news:%23AKD5sEXDHA.1872@.TK2MSFTNGP12.phx.gbl...
> > Is it better to create a seperate filegroup for all user tables ? And if
> so
> > should all the system tables that belong to the Primary filegroup reside
> on
> > the same drive with the log file . I am using SQL 2000. Which system
> tables
> > get hit the most daily for any inserts,updates and deletes that may be
> > occuring on the server
> >
> > Thanks
> >
> >
>|||Hassan
If you are using SQL Server 7, it is a good idea to put
your system files in a seperate filegroup. If you get a
corrupted user table, if your system tables are in a
seperate filegroup you can still perform a transaction log
backup prior to invoking DR (If you have DR of course). If
they are in the same filegroup you may not be able to.
This is no longer an issue in 2000.
Hope this helps
John

Monday, March 12, 2012

Placement of database (newbie question)

I want to create a new database and place it in a drive
and directory other than C:\Program files\microsoft SQL
Server\MSSQL\Data. When I attempt this I get Error 5123:
CREATE FILE encountered operating system error5(Access
denied).....
Must I create the new database in the C: as above? If not
how do I get around the above. I can create files and
folders in that drive from any other program.
The reason for creating in a different drive is space
issues.
Anon,
What account rights is the SQL Server service running with? Are you running
as a local admin? Or a specific account?
What this is telling you is that that account does not have rights to your
destination. You should be able to grant rights to the directory to your
SQL Server account and all will be fine.
The following article on MSDN has a lot of server setup information:
Microsoft SQL Server 2000 Scalability Project-Server Consolidation
http://tinyurl.com/5asz7
Russell Fields
<anonymous@.discussions.microsoft.com> wrote in message
news:506001c4911c$c657a140$a501280a@.phx.gbl...
> I want to create a new database and place it in a drive
> and directory other than C:\Program files\microsoft SQL
> Server\MSSQL\Data. When I attempt this I get Error 5123:
> CREATE FILE encountered operating system error5(Access
> denied).....
> Must I create the new database in the C: as above? If not
> how do I get around the above. I can create files and
> folders in that drive from any other program.
> The reason for creating in a different drive is space
> issues.

Placement of database (newbie question)

I want to create a new database and place it in a drive
and directory other than C:\Program files\microsoft SQL
Server\MSSQL\Data. When I attempt this I get Error 5123:
CREATE FILE encountered operating system error5(Access
denied).....
Must I create the new database in the C: as above? If not
how do I get around the above. I can create files and
folders in that drive from any other program.
The reason for creating in a different drive is space
issues.Anon,
What account rights is the SQL Server service running with? Are you running
as a local admin? Or a specific account?
What this is telling you is that that account does not have rights to your
destination. You should be able to grant rights to the directory to your
SQL Server account and all will be fine.
The following article on MSDN has a lot of server setup information:
Microsoft SQL Server 2000 Scalability Project-Server Consolidation
http://tinyurl.com/5asz7
Russell Fields
<anonymous@.discussions.microsoft.com> wrote in message
news:506001c4911c$c657a140$a501280a@.phx.gbl...
> I want to create a new database and place it in a drive
> and directory other than C:\Program files\microsoft SQL
> Server\MSSQL\Data. When I attempt this I get Error 5123:
> CREATE FILE encountered operating system error5(Access
> denied).....
> Must I create the new database in the C: as above? If not
> how do I get around the above. I can create files and
> folders in that drive from any other program.
> The reason for creating in a different drive is space
> issues.

Placement of database (newbie question)

I want to create a new database and place it in a drive
and directory other than C:\Program files\microsoft SQL
Server\MSSQL\Data. When I attempt this I get Error 5123:
CREATE FILE encountered operating system error5(Access
denied).....
Must I create the new database in the C: as above? If not
how do I get around the above. I can create files and
folders in that drive from any other program.
The reason for creating in a different drive is space
issues.Anon,
What account rights is the SQL Server service running with? Are you running
as a local admin? Or a specific account?
What this is telling you is that that account does not have rights to your
destination. You should be able to grant rights to the directory to your
SQL Server account and all will be fine.
The following article on MSDN has a lot of server setup information:
Microsoft SQL Server 2000 Scalability Project-Server Consolidation
http://tinyurl.com/5asz7
Russell Fields
<anonymous@.discussions.microsoft.com> wrote in message
news:506001c4911c$c657a140$a501280a@.phx.gbl...
> I want to create a new database and place it in a drive
> and directory other than C:\Program files\microsoft SQL
> Server\MSSQL\Data. When I attempt this I get Error 5123:
> CREATE FILE encountered operating system error5(Access
> denied).....
> Must I create the new database in the C: as above? If not
> how do I get around the above. I can create files and
> folders in that drive from any other program.
> The reason for creating in a different drive is space
> issues.