Showing posts with label learning. Show all posts
Showing posts with label learning. Show all posts

Monday, February 13, 2012

Beginners

I have just started learning SQL server. Where from I start. I have downloaded SQL Management Studio & SQL Express Edition.

Now What should I do now ?

hi,

hard to say...

at http://www.microsoft.com/downloads/details.aspx?FamilyID=be6a2c5d-00df-4220-b133-29c1e0b6585f&DisplayLang=en you can find the downloadable version of Books OnLine, the on line help for SQL Server... it both contains "insides" about the engine and architecture, as SQL dialect tutorials as well.. it really is a valuable (the best) source of information about SQL Server..

but perhaps the understanding of what a DBMS is, is not included as these are "pre-requisites" to all the fun..

so here all depends on your actual skill and knowledge.. perhaps you need a beginners book about database, perhaps you require something more, like a real inside about what DBMS are and what are they fore, as long as the whole theory above them, or perhaps you just need to understand the differences about, say, Oracle and SQL Server as you already are familiar with the big picture..

regards

|||

HI,

Well, I have downloaded the book now. I have some knowledge about databases. as I used to work with MS Access already

Thanks & regards

Beginner question on Altering constraints in Tables..

Hello all,

Just started learning SQL recently.

But one thing i'm still not clear on is alter tables relationships after they've been created.

Instead of creating a foreign key when the table is first created - i create the table and then run a query to set the foreign key and relationship (one-to-one, one-to-many etc)

Anyways, long story short is i want to create a one-to-one relationship with a table but am having problems with adding more than one constraint at a time when altering a table.

Understand yet? Easiest thing to do is show you:

I have 2 tables: Branch_Table and Employee_Table

I want to create a one-to-one relationship between emp_id on the Branch_Table and manager_id on the Employee_Table.

The SQL i've written which doesn't seem to work is:

ALTER TABLE Branch_Table
Add Constraint Branch_Table_FK1 FOREIGN KEY (manager_id)
Add Constraint Branch_Table_UQ1 Unique (manager_id)
References Employee_Table (emp_id));

Am having trouble with that second Add constraint (UQ1 unique). I know it's something to do with the Add syntax above.

So basically, my question is can i create a one-to-one relationship with just the one SQL Query? And how would i do it?

Many thanks in advance.This syntax may vary between DBMSs, but this works in Oracle:

ALTER TABLE Branch_Table
Add (Constraint Branch_Table_UQ1 Unique (manager_id),
Constraint Branch_Table_FK1 FOREIGN KEY (manager_id)
References Employee_Table (emp_id));
(You had the REFERENCES clause on the wrong constraint, by the way).

Beginner Question - SQL Server

Hi, I am currently learning ASP.net 1.1 using the apress Beginning
ASP.NET 1.1 E-Commerce book.
I am working my way through but have hit a problem on chapter 3.
When I try to start the application i get the following error:
Server Error in '/JokePoint' Application.
Login failed for user 'IND055000013\ASPNET'
In the book it says that this is down to SQL Server Security and that I
need to enabled mixed mode authentication. I did this by editting the
regedit, however, the error still persists.
Any help would be much appreciated.
Thanks
Did you restarted the service ?
HTH, jens Suessmeyer.
|||yes, the error message in full is
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'IND055000013\ASPNET'.
Source Error:
Line 9: command.CommandType = CommandType.StoredProcedure
Line 10: ' Open the connection
Line 11: connection.Open()
Line 12: 'Return a SqlDataReader to the calling function
Line 13: Return
command.ExecuteReader(CommandBehavior.CloseConnect ion)
Source File: F:\MyCommerceSite\JokePoint\BusinessObjects\Catalo g.vb
Line: 11
Stack Trace:
[SqlException: Login failed for user 'IND055000013\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection (Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.Get PooledConnection(SqlConnectionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
JokePoint.Catalog.GetDepartments() in
F:\MyCommerceSite\JokePoint\BusinessObjects\Catalo g.vb:11
JokePoint.DepartmentsList.Page_Load(Object sender, EventArgs e) in
F:\MyCommerceSite\JokePoint\UserControls\Departmen tsList.ascx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +750
Again any help would be very appreciated
|||Look in the BOl for more information:
"Allows a Microsoft=AE Windows NT=AE user or group account to connect to
Microsoft SQL Server=99 using Windows Authentication.
Syntax
sp_grantlogin [@.loginame =3D] 'login'"
--to give him permissions to access the server
"sp_grantdbaccess
Adds a security account in the current database for a Microsoft=AE SQL
Server=99 login or Microsoft Windows NT=AE user or group, and enables it
to be granted permissions to perform activities in the database.
Syntax
sp_grantdbaccess [@.loginame =3D] 'login'
[,[@.name_in_db =3D] 'name_in_db' [OUTPUT]]"
--to grant access in the database
"GRANT
Creates an entry in the security system that allows a user in the
current database to work with data in the current database or execute
specific Transact-SQL statements."
--to grant him specific privilegs e.g. Select on a table.
"sp_addrolemember
Adds a security account as a member of an existing Microsoft=AE SQL
Server=99 database role in the current database."
--to add him to a predefined role with specific permissions, e.g.
dbowner
sp_addrolemember 'db_owner','Domain\User'
Based ont he assumption that you have SQL Server MSDE or Express
installed, otherwise you could use a graphical interface for
configuring this.
HTH, jens Suessmeyer.

Beginner Question - SQL Server

Hi, I am currently learning ASP.net 1.1 using the apress Beginning
ASP.NET 1.1 E-Commerce book.
I am working my way through but have hit a problem on chapter 3.
When I try to start the application i get the following error:
Server Error in '/JokePoint' Application.
----
--
Login failed for user 'IND055000013\ASPNET'
In the book it says that this is down to SQL Server Security and that I
need to enabled mixed mode authentication. I did this by editting the
regedit, however, the error still persists.
Any help would be much appreciated.
ThanksDid you restarted the service ?
HTH, jens Suessmeyer.|||yes, the error message in full is
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'IND055000013\ASPNET'.
Source Error:
Line 9: command.CommandType = CommandType.StoredProcedure
Line 10: ' Open the connection
Line 11: connection.Open()
Line 12: 'Return a SqlDataReader to the calling function
Line 13: Return
command.ExecuteReader(CommandBehavior.CloseConnection)
Source File: F:\MyCommerceSite\JokePoint\BusinessObje
cts\Catalog.vb
Line: 11
Stack Trace:
[SqlException: Login failed for user 'IND055000013\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnec
tionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
JokePoint.Catalog.GetDepartments() in
F:\MyCommerceSite\JokePoint\BusinessObje
cts\Catalog.vb:11
JokePoint.DepartmentsList.Page_Load(Object sender, EventArgs e) in
F:\MyCommerceSite\JokePoint\UserControls
\DepartmentsList.ascx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +750
Again any help would be very appreciated|||Look in the BOl for more information:
"Allows a Microsoft=AE Windows NT=AE user or group account to connect to
Microsoft SQL Server=99 using Windows Authentication.
Syntax
sp_grantlogin [@.loginame =3D] 'login'"
--to give him permissions to access the server
"sp_grantdbaccess
Adds a security account in the current database for a Microsoft=AE SQL
Server=99 login or Microsoft Windows NT=AE user or group, and enables it
to be granted permissions to perform activities in the database.
Syntax
sp_grantdbaccess [@.loginame =3D] 'login'
[,[@.name_in_db =3D] 'name_in_db' [OUTPUT]]"
--to grant access in the database
"GRANT
Creates an entry in the security system that allows a user in the
current database to work with data in the current database or execute
specific Transact-SQL statements."
--to grant him specific privilegs e.g. Select on a table.
"sp_addrolemember
Adds a security account as a member of an existing Microsoft=AE SQL
Server=99 database role in the current database."
--to add him to a predefined role with specific permissions, e.g.
dbowner
sp_addrolemember 'db_owner','Domain\User'
Based ont he assumption that you have SQL Server MSDE or Express
installed, otherwise you could use a graphical interface for
configuring this.
HTH, jens Suessmeyer.

Beginner Question - SQL Server

Hi, I am currently learning ASP.net 1.1 using the apress Beginning
ASP.NET 1.1 E-Commerce book.
I am working my way through but have hit a problem on chapter 3.
When I try to start the application i get the following error:
Server Error in '/JokePoint' Application.
----
Login failed for user 'IND055000013\ASPNET'
In the book it says that this is down to SQL Server Security and that I
need to enabled mixed mode authentication. I did this by editting the
regedit, however, the error still persists.
Any help would be much appreciated.
ThanksDid you restarted the service ?
HTH, jens Suessmeyer.|||yes, the error message in full is
Description: An unhandled exception occurred during the execution of
the current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.Data.SqlClient.SqlException: Login failed for
user 'IND055000013\ASPNET'.
Source Error:
Line 9: command.CommandType = CommandType.StoredProcedure
Line 10: ' Open the connection
Line 11: connection.Open()
Line 12: 'Return a SqlDataReader to the calling function
Line 13: Return
command.ExecuteReader(CommandBehavior.CloseConnection)
Source File: F:\MyCommerceSite\JokePoint\BusinessObjects\Catalog.vb
Line: 11
Stack Trace:
[SqlException: Login failed for user 'IND055000013\ASPNET'.]
System.Data.SqlClient.ConnectionPool.GetConnection(Boolean&
isInTransaction) +474
System.Data.SqlClient.SqlConnectionPoolManager.GetPooledConnection(SqlConnectionString
options, Boolean& isInTransaction) +372
System.Data.SqlClient.SqlConnection.Open() +384
JokePoint.Catalog.GetDepartments() in
F:\MyCommerceSite\JokePoint\BusinessObjects\Catalog.vb:11
JokePoint.DepartmentsList.Page_Load(Object sender, EventArgs e) in
F:\MyCommerceSite\JokePoint\UserControls\DepartmentsList.ascx.vb:33
System.Web.UI.Control.OnLoad(EventArgs e) +67
System.Web.UI.Control.LoadRecursive() +35
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Control.LoadRecursive() +98
System.Web.UI.Page.ProcessRequestMain() +750
Again any help would be very appreciated|||Look in the BOl for more information:
"Allows a Microsoft=AE Windows NT=AE user or group account to connect to
Microsoft SQL Server=99 using Windows Authentication.
Syntax
sp_grantlogin [@.loginame =3D] 'login'"
--to give him permissions to access the server
"sp_grantdbaccess
Adds a security account in the current database for a Microsoft=AE SQL
Server=99 login or Microsoft Windows NT=AE user or group, and enables it
to be granted permissions to perform activities in the database.
Syntax
sp_grantdbaccess [@.loginame =3D] 'login'
[,[@.name_in_db =3D] 'name_in_db' [OUTPUT]]"
--to grant access in the database
"GRANT
Creates an entry in the security system that allows a user in the
current database to work with data in the current database or execute
specific Transact-SQL statements."
--to grant him specific privilegs e.g. Select on a table.
"sp_addrolemember
Adds a security account as a member of an existing Microsoft=AE SQL
Server=99 database role in the current database."
--to add him to a predefined role with specific permissions, e.g.
dbowner
sp_addrolemember 'db_owner','Domain\User'
Based ont he assumption that you have SQL Server MSDE or Express
installed, otherwise you could use a graphical interface for
configuring this.
HTH, jens Suessmeyer.

Sunday, February 12, 2012

beginner Analysis Services question

I'm looking into learning how to use Analysis Services- the problem , (for
learning purposes) I have set up is 1,000,000 rercords , which are made up
of opinions about various topics . It is one column , with up to 1000
length.
Does Analysis Services posess algorithms that will estimate , for example
Male or Female? Or does a developer have to build in the rules ?
--
Jack Vamvasyour table contains only 1 column which is a 1000 characters length?
When you say "estimate male or female" what do you mean by estimate? do you
talk about datamining?
"what is the probability of having male for a set of cases?"
"Jack Vamvas" <delete_this_bit_jack@.ciquery.com_delete> wrote in message
news:bOednQHceO9eqs_ZRVnyjg@.bt.com...
> I'm looking into learning how to use Analysis Services- the problem , (for
> learning purposes) I have set up is 1,000,000 rercords , which are made
> up
> of opinions about various topics . It is one column , with up to 1000
> length.
> Does Analysis Services posess algorithms that will estimate , for example
> Male or Female? Or does a developer have to build in the rules ?
>
> --
> --
> Jack Vamvas
>|||Correct, it's just a recordset of opinions on a certain topic.
By estimate, I mean "would the comment most likely be made by a female or
male?"
--
Jack Vamvas
"Jeje" <willgart@.hotmail.com> wrote in message
news:#dJt7v5aGHA.4060@.TK2MSFTNGP02.phx.gbl...
> your table contains only 1 column which is a 1000 characters length?
> When you say "estimate male or female" what do you mean by estimate? do
you
> talk about datamining?
> "what is the probability of having male for a set of cases?"
> "Jack Vamvas" <delete_this_bit_jack@.ciquery.com_delete> wrote in message
> news:bOednQHceO9eqs_ZRVnyjg@.bt.com...
(for[vbcol=seagreen]
example[vbcol=seagreen]
>|||a recordset of opinion... but is it 1 column only? how do you identify male
/ female on it?
By the way, you looking for a text mining tool, not an OLAP tool.
SSIS could extract terms from your sentence and generates a table of terms.
Or a recommand to use a survey tool.
these tools can do a lot of things and statistics with a minimum work.
"Jack Vamvas" <delete_this_bit_jack@.ciquery.com_delete> wrote in message
news:BoidnT7nxe1uC8nZnZ2dnUVZ8s6dnZ2d@.bt
.com...
> Correct, it's just a recordset of opinions on a certain topic.
> By estimate, I mean "would the comment most likely be made by a female or
> male?"
> --
> --
> Jack Vamvas
> "Jeje" <willgart@.hotmail.com> wrote in message
> news:#dJt7v5aGHA.4060@.TK2MSFTNGP02.phx.gbl...
> you
> (for
> example
>