Friday, March 30, 2012

New to SQL Server

I am new to sql server, mostly work with an other product build by a company
in california. We can call it "company O"
We had a application written for our company. The version of SQL Server is
2000. They created all the objects owned by dbo. When I asked why, I was
told this is what Microsoft recommends. My question is why should the
objects be owned by dbo and not use the a model like
schema/username.objectname
Can some one explain why use the dbo as the owner of the objects in a
database vrs have a schema and then grant permissions on the objects in the
schema?In SQL Server 2000, schemas don't work that way. Having everything owned by
dbo makes it much easier to manage. SQL Server 2005 properly implements
schemas such that what you're talking about does make sense.
Adam Machanic
Pro SQL Server 2005, available now
http://www.apress.com/book/bookDisplay.html?bID=457
--
"jbwest77" <jbwest77@.discussions.microsoft.com> wrote in message
news:1C71EE4D-A6F0-42BE-A48E-693830152596@.microsoft.com...
>I am new to sql server, mostly work with an other product build by a
>company
> in california. We can call it "company O"
> We had a application written for our company. The version of SQL Server
> is
> 2000. They created all the objects owned by dbo. When I asked why, I was
> told this is what Microsoft recommends. My question is why should the
> objects be owned by dbo and not use the a model like
> schema/username.objectname
> Can some one explain why use the dbo as the owner of the objects in a
> database vrs have a schema and then grant permissions on the objects in
> the
> schema?|||On Mon, 21 Nov 2005 15:48:01 -0800, "jbwest77"
<jbwest77@.discussions.microsoft.com> wrote:
>I am new to sql server, mostly work with an other product build by a company
>in california. We can call it "company O"
>We had a application written for our company. The version of SQL Server is
>2000. They created all the objects owned by dbo. When I asked why, I was
>told this is what Microsoft recommends. My question is why should the
>objects be owned by dbo and not use the a model like
>schema/username.objectname
>Can some one explain why use the dbo as the owner of the objects in a
>database vrs have a schema and then grant permissions on the objects in the
>schema?
It's just always been that way, and various tools and defaults are
very awkward if you try to use ownership other than dbo.
If things are finally better in Yukon, then we'll just have to break
old habits!
So, I'd say that at least on this issue, so far I wouldn't hold it
against your developers.
J.|||In SQL Server 2000 you can implement the schema/username.objectname that you
mentioned, more exactly the username. You can create a user, like finance,
and give ownership of the objects to that user. We have several applications
like that and we do not have any problem.
If you want to implement schemas Oracle-style then we have SQL Server 2005.
Ben Nevarez
"jbwest77" <jbwest77@.discussions.microsoft.com> wrote in message
news:1C71EE4D-A6F0-42BE-A48E-693830152596@.microsoft.com...
>I am new to sql server, mostly work with an other product build by a
>company
> in california. We can call it "company O"
> We had a application written for our company. The version of SQL Server
> is
> 2000. They created all the objects owned by dbo. When I asked why, I was
> told this is what Microsoft recommends. My question is why should the
> objects be owned by dbo and not use the a model like
> schema/username.objectname
> Can some one explain why use the dbo as the owner of the objects in a
> database vrs have a schema and then grant permissions on the objects in
> the
> schema?|||Thanks for the input.
"Ben Nevarez" wrote:
> In SQL Server 2000 you can implement the schema/username.objectname that you
> mentioned, more exactly the username. You can create a user, like finance,
> and give ownership of the objects to that user. We have several applications
> like that and we do not have any problem.
> If you want to implement schemas Oracle-style then we have SQL Server 2005.
> Ben Nevarez
>
> "jbwest77" <jbwest77@.discussions.microsoft.com> wrote in message
> news:1C71EE4D-A6F0-42BE-A48E-693830152596@.microsoft.com...
> >I am new to sql server, mostly work with an other product build by a
> >company
> > in california. We can call it "company O"
> >
> > We had a application written for our company. The version of SQL Server
> > is
> > 2000. They created all the objects owned by dbo. When I asked why, I was
> > told this is what Microsoft recommends. My question is why should the
> > objects be owned by dbo and not use the a model like
> > schema/username.objectname
> > Can some one explain why use the dbo as the owner of the objects in a
> > database vrs have a schema and then grant permissions on the objects in
> > the
> > schema?
>
>

New to SQL server

Hi I am new to SQL Server and have a few general
questions.
1. Can anyone suggest a good book to learn how ti use SQL
Server... I am proficient with relational databases and
SQL (Not transact)
2. I would like to create a database using SQL server as
the backend and Access as the front end. If I house all
of my Queries in the Access front end and simply join the
tables to my SQL Server tables will I still be able to
take adavantage of the improvements in processing speed
and size of the SQL Server database or will I need to
change all of my Access queries to SQL views to be able to
do this?
Thanks for your help,
ChadTo get a good understanding of all aspects of SQL Server, try "Teach
yourself Microsoft SQL Server 2000 in 21 days".
For a deeper understanding of SQL Server architecture, go for "Inside
Microsoft SQL Server 2000":
http://vyaskn.tripod.com/inside_microsoft_sql_server_2000.htm
Links to these books and others are available at:
http://vyaskn.tripod.com/sqlbooks.htm
Regarding your other question, if your data is stored in SQL Server, and
accessed via queries from Access, you should be able to take advantage of
SQL Servers speed and robustness.
--
HTH,
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
What hardware is your SQL Server running on?
http://vyaskn.tripod.com/poll.htm
"Chad" <ChadLucy@.msn.com> wrote in message
news:021501c38dca$91af4980$a401280a@.phx.gbl...
Hi I am new to SQL Server and have a few general
questions.
1. Can anyone suggest a good book to learn how ti use SQL
Server... I am proficient with relational databases and
SQL (Not transact)
2. I would like to create a database using SQL server as
the backend and Access as the front end. If I house all
of my Queries in the Access front end and simply join the
tables to my SQL Server tables will I still be able to
take adavantage of the improvements in processing speed
and size of the SQL Server database or will I need to
change all of my Access queries to SQL views to be able to
do this?
Thanks for your help,
Chad|||To get the best throughput from MSAccess you need to set up the MSAccess
project correctly as a SQL Server project. If you use the older project
style and "attached" tables, JET is used behind the scenes and performance
will be much worse. (I did MSAccess work a long time ago, and when they
introduced SQL projects it was a very new concept. Perhaps my advice today
is already common knowedge.) Anyway, the new style projects pass SQL
commands directly to SQL Server, and you can access database views as well
as base tables. I believe there is even a way to "wire up" the MSAccess
forms so that insert/update/delete commands can call stored procedures on
the server; a huge feature.
James|||Hello,
I have found two books to be extremely helpful -
particularly with Transact Sql:
-SQL Server 2k Stored Procedure Programming (Sunderic &
Woodhead)
-Adv T-SQL for SQL Server 2k (Ben-Gan and Moreau)
>--Original Message--
>Hi I am new to SQL Server and have a few general
>questions.
>1. Can anyone suggest a good book to learn how ti use
SQL
>Server... I am proficient with relational databases and
>SQL (Not transact)
>2. I would like to create a database using SQL server as
>the backend and Access as the front end. If I house all
>of my Queries in the Access front end and simply join the
>tables to my SQL Server tables will I still be able to
>take adavantage of the improvements in processing speed
>and size of the SQL Server database or will I need to
>change all of my Access queries to SQL views to be able
to
>do this?
>Thanks for your help,
>Chad
>.
>sql

new to sql please help

i use access 2000 as my front end. i had a form named main with a couple of unbound fields on it . i used to put in last name and first name and then in a query i would put "like [forms]![main]![text0] & "*"
and also "like [forms]![main]![text2] & "*"

the lookup patient button would open my patient form based on the query results of what i typed in on the main form . ex: i type in riley it would give me my patient form with all the riley's in it.

how do i get my access form to open from information i am looking for in a query now that my whole database is back on a sql server.

by the way i upsized to a adp file no longer using mdb. please if possible explain in detail how to do this as i am having trouble with the syntax of sql. i understand i cant use "*" as a wildcard now but % instead.

thanks in advance.Hoe are you connecting to SQL Sever?

You shouldn't have to change your code...did you create linked tables?|||im assuming they not linked tables since it is now a access project i dont see the little globe when i used to use link tables.

i think everything is useing passthorugh queries now all my tables are on the sql server. just the forms and macros are on the frontend now.

my code i had to change was something like

dim db as dao.database
dim rs as dao.recordset

i had to change that to
dim conn as adodb.connection
dim rs as new adodb.recordset

and quite a few other things

if i left them linked the queries should have stayed working but im trying to get away from passing things through the jet engine and using the full power of sql .|||this was my old code to make a chartnumber based on the first and last name fields. this is the one that didnt work .

Public Function chartlookup()
Dim db As DAO.Database <--believe to be the problem
Dim rs As DAO.Recordset <-- belive to be the problem
Dim SQL As String
Dim NewNum As Integer
Dim NeWChartNum As String

SQL = "Select max(Cint(Right([chartnumber],6))) As RecNum From tblpatientinfo WHERE UCase(Left([chartnumber],5)) = '" & UCase(Left([Forms]![fpatient]![lname], 3)) & UCase(Left([Forms]![fpatient]![fname], 2)) & "'"

Set db = CurrentDb() <-- -problem
Set rs = db.OpenRecordset(SQL) <--problem

If IsNull([Forms]![fpatient]![chartnumber]) = False Then GoTo 400

If rs.EOF = False Then
If IsNull(rs!RecNum) = False Then
NewNum = rs!RecNum + 1
Else
NewNum = 1
End If
End If
'If NewNum = 1 Then

[Forms]![fpatient]![chartnumber] = UCase(Left([Forms]![fpatient]![lname], 3)) & UCase(Left([Forms]![fpatient]![fname], 2)) & Format(NewNum, "000000")
'End If|||Well this is a TOTAL guess...

If you're doing passthrus, you'll need SQL Server syntax..

(Why not just call stored procedures if you're making such a radical change?)

anyway...

SQL = "SELECT (MAX(CONVERT(int,(RIGHT(chartnumber))))
FROM tblpatientinfo
WHERE UPPER(LEFT(chartnumber,5)) = " _
& "'" UCase(Left([Forms]![fpatient]![lname], 3)) & UCase(Left([Forms]![fpatient]![fname], 2)) & "'"

my front end skills have gotten rusty...

You might want to also look to post here:

http://www.sqlteam.com/forums/forum.asp?FORUM_ID=3|||i did get that code to work but my main real problem is how do i get user sitting at my main form where he has to enter a patients lst name and first then when he hits the lookup patient button it opens my patient record with only the patient he typed in from the previous form . this was easy on access just added the expression into the query . but sql doesnt seem to support forms based queries. so what i really need is what does sql use instead of forms based queries to prompt a user for what they want to fill a record with.

if i use select lname from tblpatientinfo where lname="riley"

my form will only give me patients with last name riley

but how do i get it to ask what name we are looking for i guess would be the real question here. do i make a stored procedure to prompt for the information and base the form on the stored procedure or does my from on open have to request what im looking for. i may not be useing the correct wording so please be patient but sql is a whole new world to me.
i tried useing a filter on my form but if i put the stored procedure in the filter it doesnt recognize the stored procedure name only access query names it seems.

New to SQL but want's to learn!

Hi,

I was wandering if anyone could please recommend a good book to learn the basics of SQL 2000? I have made connections etc to a sql db through Visual Studio but would really like to read up on the subject and get a complete grounding on the subject. And also prepare me for the exam 70-229.

Many thanks,
James

Hi

If you need to learn the exam for SQL, you are best buying the Microsoft suite of books for that exam but I can tell you this, it is not easy AT ALL.

To learn SQL, its best looked at examples, reading books again and trial and error.

C-sharp corner website is a good place, but also posting here is a good idea too and I am sure many people will help you out.

There is alot of ground to cover, so start with the basics and move on upwards.

New to SQL and Web development

I have been in systems for many years on the admin side, and have had experience working with developers, however I am attempting to start the learning process for creating a data store with a web based UI. I have an understanding of the theories of what
is possible, but I don't know where to start. I have experience with HTML coding and static pages, but nothing that interfaces with a back end.
What are your suggestions of where to start.
This is a great site with lots of good answers to many questions:
http://www.aspfaq.com/
You will find good examples and information out on =
http://www.asp101.com/
--=20
Keith
"Otts73" <sh_tmail@.charter.net> wrote in message =
news:EFF6B423-F1FA-41D1-9139-3929979CCB3F@.microsoft.com...
> I have been in systems for many years on the admin side, and have had =
experience working with developers, however I am attempting to start the =
learning process for creating a data store with a web based UI. I have =
an understanding of the theories of what is possible, but I don't know =
where to start. I have experience with HTML coding and static pages, =
but nothing that interfaces with a back end.
>=20
> What are your suggestions of where to start.
|||As well as Keith's references, you might like to look at
http://www.w3schools.com/ado/default.asp
Regards,
Paul Ibison

New to SQL and Web development

I have been in systems for many years on the admin side, and have had experi
ence working with developers, however I am attempting to start the learning
process for creating a data store with a web based UI. I have an understand
ing of the theories of what
is possible, but I don't know where to start. I have experience with HTML c
oding and static pages, but nothing that interfaces with a back end.
What are your suggestions of where to start.This is a great site with lots of good answers to many questions:
http://www.aspfaq.com/
You will find good examples and information out on =
http://www.asp101.com/
--=20
Keith
"Otts73" <sh_tmail@.charter.net> wrote in message =
news:EFF6B423-F1FA-41D1-9139-3929979CCB3F@.microsoft.com...
> I have been in systems for many years on the admin side, and have had =
experience working with developers, however I am attempting to start the =
learning process for creating a data store with a web based UI. I have =
an understanding of the theories of what is possible, but I don't know =
where to start. I have experience with HTML coding and static pages, =
but nothing that interfaces with a back end.
>=20
> What are your suggestions of where to start.|||As well as Keith's references, you might like to look at
http://www.w3schools.com/ado/default.asp
Regards,
Paul Ibison

New to SQL and Web development

I have been in systems for many years on the admin side, and have had experience working with developers, however I am attempting to start the learning process for creating a data store with a web based UI. I have an understanding of the theories of what is possible, but I don't know where to start. I have experience with HTML coding and static pages, but nothing that interfaces with a back end
What are your suggestions of where to start.This is a great site with lots of good answers to many questions:
http://www.aspfaq.com/
You will find good examples and information out on =http://www.asp101.com/
-- Keith
"Otts73" <sh_tmail@.charter.net> wrote in message =news:EFF6B423-F1FA-41D1-9139-3929979CCB3F@.microsoft.com...
> I have been in systems for many years on the admin side, and have had =experience working with developers, however I am attempting to start the =learning process for creating a data store with a web based UI. I have =an understanding of the theories of what is possible, but I don't know =where to start. I have experience with HTML coding and static pages, =but nothing that interfaces with a back end.
> > What are your suggestions of where to start.|||As well as Keith's references, you might like to look at
http://www.w3schools.com/ado/default.asp
Regards,
Paul Ibisonsql

new to sql and need some help. connectivity problems.

hi guy
i've installed sql on a dedicated box for the purpose of using it for mom and sms but the only problem is when i go to install sms or mom on the other boxes it doesnt see the sql server. however if i start the mom setup process on the sql box it sees the sql sever
i have installed the client tools on both the sms and mom boxes and configured them point to the sql server over tcp/ip and the named pipe but to no avail. i also added a data source to the odbc console thinking that may help but no it didnt
what i've done so fa
installed sql with integrated windows authenticatio
added it to a
got the Microsoft SQL Server 2000 Books Online from the ms sit
gone and purchased the ms sql server 2000 administration guid
started to read both books and am now scared of sql server 200
are there some connectivity tools that would help in troubleshooting this or am i barking up the wrong tree
i have used sms and mom extensively before but this is my first attempt at sql
cheer
dDid you install SQL Server or MSDE? Basically, on the client, you use SQL Server's "Client Network Utility"
and on the server, you use "Server Network Utility" to configure the connectivity. If you have MSDE, it
doesn't have network access turned on by default, and you won't have an icon for SNU, but it is there and the
name of the exe file is: svrnetcn.exe.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1AFB725A-1AF3-47BC-808B-198916327FCA@.microsoft.com...
> hi guys
> i've installed sql on a dedicated box for the purpose of using it for mom and sms but the only problem is
when i go to install sms or mom on the other boxes it doesnt see the sql server. however if i start the mom
setup process on the sql box it sees the sql sever.
> i have installed the client tools on both the sms and mom boxes and configured them point to the sql server
over tcp/ip and the named pipe but to no avail. i also added a data source to the odbc console thinking that
may help but no it didnt.
> what i've done so far
> installed sql with integrated windows authentication
> added it to ad
> got the Microsoft SQL Server 2000 Books Online from the ms site
> gone and purchased the ms sql server 2000 administration guide
> started to read both books and am now scared of sql server 2000
> are there some connectivity tools that would help in troubleshooting this or am i barking up the wrong tree?
> i have used sms and mom extensively before but this is my first attempt at sql.
> cheers
> d

new to sql and need some help. connectivity problems.

hi guys
i've installed sql on a dedicated box for the purpose of using it for mom and sms but the only problem is when i go to install sms or mom on the other boxes it doesnt see the sql server. however if i start the mom setup process on the sql box it sees the
sql sever.
i have installed the client tools on both the sms and mom boxes and configured them point to the sql server over tcp/ip and the named pipe but to no avail. i also added a data source to the odbc console thinking that may help but no it didnt.
what i've done so far
installed sql with integrated windows authentication
added it to ad
got the Microsoft SQL Server 2000 Books Online from the ms site
gone and purchased the ms sql server 2000 administration guide
started to read both books and am now scared of sql server 2000
are there some connectivity tools that would help in troubleshooting this or am i barking up the wrong tree?
i have used sms and mom extensively before but this is my first attempt at sql.
cheers
d
Did you install SQL Server or MSDE? Basically, on the client, you use SQL Server's "Client Network Utility"
and on the server, you use "Server Network Utility" to configure the connectivity. If you have MSDE, it
doesn't have network access turned on by default, and you won't have an icon for SNU, but it is there and the
name of the exe file is: svrnetcn.exe.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1AFB725A-1AF3-47BC-808B-198916327FCA@.microsoft.com...
> hi guys
> i've installed sql on a dedicated box for the purpose of using it for mom and sms but the only problem is
when i go to install sms or mom on the other boxes it doesnt see the sql server. however if i start the mom
setup process on the sql box it sees the sql sever.
> i have installed the client tools on both the sms and mom boxes and configured them point to the sql server
over tcp/ip and the named pipe but to no avail. i also added a data source to the odbc console thinking that
may help but no it didnt.
> what i've done so far
> installed sql with integrated windows authentication
> added it to ad
> got the Microsoft SQL Server 2000 Books Online from the ms site
> gone and purchased the ms sql server 2000 administration guide
> started to read both books and am now scared of sql server 2000
> are there some connectivity tools that would help in troubleshooting this or am i barking up the wrong tree?
> i have used sms and mom extensively before but this is my first attempt at sql.
> cheers
> d

new to sql and need some help. connectivity problems.

hi guys
i've installed sql on a dedicated box for the purpose of using it for mom an
d sms but the only problem is when i go to install sms or mom on the other b
oxes it doesnt see the sql server. however if i start the mom setup process
on the sql box it sees the
sql sever.
i have installed the client tools on both the sms and mom boxes and configur
ed them point to the sql server over tcp/ip and the named pipe but to no ava
il. i also added a data source to the odbc console thinking that may help bu
t no it didnt.
what i've done so far
installed sql with integrated windows authentication
added it to ad
got the Microsoft SQL Server 2000 Books Online from the ms site
gone and purchased the ms sql server 2000 administration guide
started to read both books and am now scared of sql server 2000
are there some connectivity tools that would help in troubleshooting this or
am i barking up the wrong tree?
i have used sms and mom extensively before but this is my first attempt at s
ql.
cheers
dDid you install SQL Server or MSDE? Basically, on the client, you use SQL Se
rver's "Client Network Utility"
and on the server, you use "Server Network Utility" to configure the connect
ivity. If you have MSDE, it
doesn't have network access turned on by default, and you won't have an icon
for SNU, but it is there and the
name of the exe file is: svrnetcn.exe.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://www.solidqualitylearning.com/
"dave" <anonymous@.discussions.microsoft.com> wrote in message
news:1AFB725A-1AF3-47BC-808B-198916327FCA@.microsoft.com...
> hi guys
> i've installed sql on a dedicated box for the purpose of using it for mom and sms
but the only problem is
when i go to install sms or mom on the other boxes it doesnt see the sql ser
ver. however if i start the mom
setup process on the sql box it sees the sql sever.
> i have installed the client tools on both the sms and mom boxes and configured the
m point to the sql server
over tcp/ip and the named pipe but to no avail. i also added a data source t
o the odbc console thinking that
may help but no it didnt.
> what i've done so far
> installed sql with integrated windows authentication
> added it to ad
> got the Microsoft SQL Server 2000 Books Online from the ms site
> gone and purchased the ms sql server 2000 administration guide
> started to read both books and am now scared of sql server 2000
> are there some connectivity tools that would help in troubleshooting this
or am i barking up the wrong tree?
> i have used sms and mom extensively before but this is my first attempt at
sql.
> cheers
> d

New to SQL and need help

I am running a program that was created in VB that takes data from a
scanned file and inserts it into our database. We have the column
student id as the primary key and it is decremented every time it goes
through the program so they are each unique and never overlap. The
program has been working fine but recently when I run it I get a
primary key violation. I thought that the identity might have gotten
out of sync and tried CheckIdent but still no luck. I came to find
out that the primary key does not have an identity and so I am not
sure why it will not let me insert the data.It is just that the value you are trying to insert already exists.

--
Posted via http://dbforums.com|||I've looked at the table that I am trying to insert into and did a query
for numbers that overlapped and it returned nothing.

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Hightower130 (bowens@.webebi.com) writes:
> I am running a program that was created in VB that takes data from a
> scanned file and inserts it into our database. We have the column
> student id as the primary key and it is decremented every time it goes
> through the program so they are each unique and never overlap. The
> program has been working fine but recently when I run it I get a
> primary key violation. I thought that the identity might have gotten
> out of sync and tried CheckIdent but still no luck. I came to find
> out that the primary key does not have an identity and so I am not
> sure why it will not let me insert the data.

And since I don't see your database, your input file, your VB code etc,
neither can I tell what went wrong.

It is possible that if you posted some code that it would help, but
since you have the existing data, and the problem appears to be
reproducible - how about debugging it?

--
Erland Sommarskog, SQL Server MVP, sommar@.algonet.se

Books Online for SQL Server SP3 at
http://www.microsoft.com/sql/techin.../2000/books.asp

New to SQL 2005, need a little help

I come from a Sys Admin background so excuse my questions if their
simple in nature.
Anyways we purchase an e-mail system at our company that uses SQL
server as it's database. In the documentation, it states I need to
create a SQL account and give it a specific username and password. I
can create the account, but it doesn't ask for a password. Do SQL
account's usually have passwords, or could they be referring to the SA
password I used when installing SQL? Also, when creating a SQL account,
it asks for a user name and login name. I can specify the user name,
but I can only select from a small list login name's to use. If someone
can clarify what the login name is exactly I'd appreciate it (i believe
it's the windows security account which sql uses to gain access to the
server but i dont know).
Thanksbdhenderson@.gmail.com wrote:
> I come from a Sys Admin background so excuse my questions if their
> simple in nature.
> Anyways we purchase an e-mail system at our company that uses SQL
> server as it's database. In the documentation, it states I need to
> create a SQL account and give it a specific username and password. I
> can create the account, but it doesn't ask for a password. Do SQL
> account's usually have passwords, or could they be referring to the SA
> password I used when installing SQL? Also, when creating a SQL account,
> it asks for a user name and login name. I can specify the user name,
> but I can only select from a small list login name's to use. If someone
> can clarify what the login name is exactly I'd appreciate it (i believe
> it's the windows security account which sql uses to gain access to the
> server but i dont know).
> Thanks
>
You are creating Windows Authentication logins, not SQL logins. SQL
Server supports both.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||It might be useful for you to know more about SQL Server Security.
From SQL Server Management Studio, click on [Help], then [Contents], then
[SQL Server Books on Line], and find the topic [Security Considerations for
SQL Server]
--
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
<bdhenderson@.gmail.com> wrote in message
news:1152796948.762797.20070@.h48g2000cwc.googlegroups.com...
>I come from a Sys Admin background so excuse my questions if their
> simple in nature.
> Anyways we purchase an e-mail system at our company that uses SQL
> server as it's database. In the documentation, it states I need to
> create a SQL account and give it a specific username and password. I
> can create the account, but it doesn't ask for a password. Do SQL
> account's usually have passwords, or could they be referring to the SA
> password I used when installing SQL? Also, when creating a SQL account,
> it asks for a user name and login name. I can specify the user name,
> but I can only select from a small list login name's to use. If someone
> can clarify what the login name is exactly I'd appreciate it (i believe
> it's the windows security account which sql uses to gain access to the
> server but i dont know).
> Thanks
>|||I think you are in the wrong section of the GUI. From what you
described in the GUI you connected to a server, and opened databases,
then opened a database, then opened security. You then right clicked
and selected new user.
What you actually need to do it after connecting to the server, leave
the databases folder closed. You should see a security folder. Open
that up, this will allow you to create a login and assign it a
password.
SQL Server has logins and users. Logins have passwords and allow you
to log into the database. Users are mapped to a login and give you the
right to see inside a single database on the server.
Denny
bdhenderson@.gmail.com wrote:
> I come from a Sys Admin background so excuse my questions if their
> simple in nature.
> Anyways we purchase an e-mail system at our company that uses SQL
> server as it's database. In the documentation, it states I need to
> create a SQL account and give it a specific username and password. I
> can create the account, but it doesn't ask for a password. Do SQL
> account's usually have passwords, or could they be referring to the SA
> password I used when installing SQL? Also, when creating a SQL account,
> it asks for a user name and login name. I can specify the user name,
> but I can only select from a small list login name's to use. If someone
> can clarify what the login name is exactly I'd appreciate it (i believe
> it's the windows security account which sql uses to gain access to the
> server but i dont know).
> Thankssql

New to SQL 2005, need a little help

I come from a Sys Admin background so excuse my questions if their
simple in nature.
Anyways we purchase an e-mail system at our company that uses SQL
server as it's database. In the documentation, it states I need to
create a SQL account and give it a specific username and password. I
can create the account, but it doesn't ask for a password. Do SQL
account's usually have passwords, or could they be referring to the SA
password I used when installing SQL? Also, when creating a SQL account,
it asks for a user name and login name. I can specify the user name,
but I can only select from a small list login name's to use. If someone
can clarify what the login name is exactly I'd appreciate it (i believe
it's the windows security account which sql uses to gain access to the
server but i dont know).
Thanksbdhenderson@.gmail.com wrote:
> I come from a Sys Admin background so excuse my questions if their
> simple in nature.
> Anyways we purchase an e-mail system at our company that uses SQL
> server as it's database. In the documentation, it states I need to
> create a SQL account and give it a specific username and password. I
> can create the account, but it doesn't ask for a password. Do SQL
> account's usually have passwords, or could they be referring to the SA
> password I used when installing SQL? Also, when creating a SQL account,
> it asks for a user name and login name. I can specify the user name,
> but I can only select from a small list login name's to use. If someone
> can clarify what the login name is exactly I'd appreciate it (i believe
> it's the windows security account which sql uses to gain access to the
> server but i dont know).
> Thanks
>
You are creating Windows Authentication logins, not SQL logins. SQL
Server supports both.
Tracy McKibben
MCDBA
http://www.realsqlguy.com|||It might be useful for you to know more about SQL Server Security.
From SQL Server Management Studio, click on [Help], then [Contents],
then
[SQL Server Books on Line], and find the topic [Security Considerati
ons for
SQL Server]
Arnie Rowland*
"To be successful, your heart must accompany your knowledge."
<bdhenderson@.gmail.com> wrote in message
news:1152796948.762797.20070@.h48g2000cwc.googlegroups.com...
>I come from a Sys Admin background so excuse my questions if their
> simple in nature.
> Anyways we purchase an e-mail system at our company that uses SQL
> server as it's database. In the documentation, it states I need to
> create a SQL account and give it a specific username and password. I
> can create the account, but it doesn't ask for a password. Do SQL
> account's usually have passwords, or could they be referring to the SA
> password I used when installing SQL? Also, when creating a SQL account,
> it asks for a user name and login name. I can specify the user name,
> but I can only select from a small list login name's to use. If someone
> can clarify what the login name is exactly I'd appreciate it (i believe
> it's the windows security account which sql uses to gain access to the
> server but i dont know).
> Thanks
>|||I think you are in the wrong section of the GUI. From what you
described in the GUI you connected to a server, and opened databases,
then opened a database, then opened security. You then right clicked
and selected new user.
What you actually need to do it after connecting to the server, leave
the databases folder closed. You should see a security folder. Open
that up, this will allow you to create a login and assign it a
password.
SQL Server has logins and users. Logins have passwords and allow you
to log into the database. Users are mapped to a login and give you the
right to see inside a single database on the server.
Denny
bdhenderson@.gmail.com wrote:
> I come from a Sys Admin background so excuse my questions if their
> simple in nature.
> Anyways we purchase an e-mail system at our company that uses SQL
> server as it's database. In the documentation, it states I need to
> create a SQL account and give it a specific username and password. I
> can create the account, but it doesn't ask for a password. Do SQL
> account's usually have passwords, or could they be referring to the SA
> password I used when installing SQL? Also, when creating a SQL account,
> it asks for a user name and login name. I can specify the user name,
> but I can only select from a small list login name's to use. If someone
> can clarify what the login name is exactly I'd appreciate it (i believe
> it's the windows security account which sql uses to gain access to the
> server but i dont know).
> Thanks

New to SQL 2005 Express

I haven't used this software except locally on my laptop. If you have built a databased web app using this, how do you deploy the db? Does it have to be installed and/or supported on your webhosting service? If so, it seems to be of limited use, if not, very helpful.

Thanks for the help

To deploy the application, the destination will need to have SQL Server Express installed as well. You can read a detailed article about that here:

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

Buck Woody

|||

That's what I was afraid of....doesn't look as this will be the answer. Back to mysql or MS SQl 2000.

Thanks for the reply!!

TLCoop

|||No problem - but MySQL or MS SQL 2000 will have the same issue, won't it?|||

There might be some confusion here. SQL Express is SQL Server 2005. Your hoster will need to support SQL Server 2005, but they don't have to have SQL Express installed. It's the exact same database file because they are the exact same products, just with different feature sets.

If you're hosting company requires that you upload your database using scripts, we are working on a tool to help do that. You can find a CTP of the tool on CodePlex.

Mike

|||

Thanks Mike,

My host doesn't offer mssql 2005 yet. They do have mssql 2000, and maybe(hopefully)some of sqlexpress2005 is backwards compatible. I can always generate scripts and run a query for db population on mssql 2000. I'll take a look at CodePlex.

I appreciate the help!

Terry

|||

Thanks Buck for the reply. My Host doesn't offer MSSQL 2005 nor SQLExpress 2005 support yet. They offer both MySQl and MS SQL 2000 right now, so I'll try and 'script' a db from express 2005. I appreciate the help.

Terry

new to SQL 2005

Hello,

I just installed SQL 2005 on my laptop,,,, I know this is not an email question but maybe you can guide me to where i can find the answers.....

I want to test it out and configure it with cognos and informatica.....

Is it possible for me to create sample servers and configure it for a test

I did instal web Server (Abyss), not sure if this helps......

How do i set up a test server on my computer

And is all possible to do it on one computer?

thank-you in advance

Is this what you're looking for?

https://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en

Best regards

- Jens

|||

Thank-you! but i already installed them,

Im looking for is how to configure it so it will work with them?

thank-you !

|||

Hi,

How can i create a server on my windows xp computer so i can connect to it from SQL 2005?

thank-you

|||

Have a look at this url:

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

Best regards

- Jens

new to SQL 2005

Hello,

I just installed SQL 2005 on my laptop,,,, I know this is not an email question but maybe you can guide me to where i can find the answers.....

I want to test it out and configure it with cognos and informatica.....

Is it possible for me to create sample servers and configure it for a test

I did instal web Server (Abyss), not sure if this helps......

How do i set up a test server on my computer

And is all possible to do it on one computer?

thank-you in advance

Is this what you're looking for?

https://www.microsoft.com/downloads/details.aspx?familyid=e719ecf7-9f46-4312-af89-6ad8702e4e6e&displaylang=en

Best regards

- Jens

|||

Thank-you! but i already installed them,

Im looking for is how to configure it so it will work with them?

thank-you !

|||

Hi,

How can i create a server on my windows xp computer so i can connect to it from SQL 2005?

thank-you

|||

Have a look at this url:

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

Best regards

- Jens

New to SQL 2000 Reporting Services - Need Some Help

I am trying to get SQL 2000 reporting services up and running, and am trying to get a condensed explanation of what I need to do, and any other software I may need to purchase.

I have already installed the Reporting Services, and after reading the help, it seems that I have to install MS Visual Studio 2003 in order to design the reports. Is this true.

Anyone that can give me some help in getting this up and running - I would be grateful.

Thanks so much - Joe

This is correct, to design reports there is an extension project system that is available for VS 2003, you must install VS and then re-run Reporting Services Setup so it can install the client bits.

SQL Server 2005 does not require you to buy a copy of VS as it includes a cut down copy. To design reports for SQL 2005 you need VS 2005, the versions don't cross over.

sql

new to sql - trying to convert vb function to udf

Hi

I'm an Access/VB coder by experience and trying to move apps to SQL Server 2000.
I have got to grips with the basics of DTS and tables and views and Stored Procedures (to an extent) but now need to upgrade an app that uses a vb function to produce a phased value for a set of budgets.

The VB function looks like this...

----------
Function calcPercentOfBudget(datFromDate As Date, datToDate As Date, iMonth As Integer, cBudget As Currency) As Currency

Dim iDuration As Integer
iDuration = DateDiff("d", datFromDate, datToDate) + 1

' if either date not in current year then 0 (both dates should be in same year)
If Year(datFromDate) <> Year(Now) Or Year(datToDate) <> Year(Now) Then
calcPercentOfBudget = 0
End If

Dim sRatio As Single, idaysInMonth As Integer, idaysInYear As Integer

' if passed month outside of period then 0
If Not (iMonth >= Month(datFromDate) And iMonth <= Month(datToDate)) Then
calcPercentOfBudget = 0
Exit Function
End If

idaysInMonth = daysInMonth(iMonth, Year(Now))


'if from date and to date in same month then 100% of budget
If Month(datFromDate) = Month(datToDate) Then
calcPercentOfBudget = cBudget
Exit Function
End If

' if passed month in From month then ratio of passed month (caters for 1st day of month - 100%)
If Month(datFromDate) = iMonth Then
'calcPercentOfBudget = (idaysInMonth + 1 - Day(datFromDate)) / idaysInYear * cBudget
calcPercentOfBudget = (idaysInMonth + 1 - Day(datFromDate)) / iDuration * cBudget
Exit Function
End If

'if passed month in To month then ratio of passed month (caters for last day of month - 100%)
If Month(datToDate) = iMonth Then
'calcPercentOfBudget = Day(datToDate) / idaysInYear * cBudget
calcPercentOfBudget = Day(datToDate) / iDuration * cBudget
Exit Function
End If

' if passed month within period then 100%
If iMonth > Month(datFromDate) And iMonth < Month(datToDate) Then
'calcPercentOfBudget = idaysInMonth / idaysInYear * cBudget
calcPercentOfBudget = idaysInMonth / iDuration * cBudget
Exit Function
End If

End Function
----------
Function daysInMonth(iMonth As Integer, iYear As Integer) As Integer

Dim datTemp As Date

datTemp = CDate("1/" & CStr(iMonth) & "/" & CStr(iYear))
datTemp = DateAdd("m", 1, datTemp)
datTemp = DateAdd("d", -1, datTemp)

daysInMonth = Day(datTemp)

End Function
----------

I have a UDF function LastDayInMonth to replace the daysInMonth vb function, and that works fine.

However I'm starting to get frustrated in trying to convert the main VB funciton to a UDF function. This is what I have got to, and as you'll see its totally wrong!...

CREATE FUNCTION [dbo].[calcPercentOfBudget] (@.datFrom as datetime, @.datTo as datetime , @.iMonth as int, @.cBudget as money, @.GetDate as datetime)
RETURNS money AS
BEGIN
declare @.iDuration int
declare @.returnvalue money
declare @.sRatio decimal
declare @.iDaysInMonth int

set @.iDuration = datediff(d, @.datFrom, @.datTo)
set @.iDaysinMonth = dbo.LastDayInMonth('1/' + cast(@.iMonth as varchar) + '/' + cast(year(@.getdate) as varchar))

case
when year(@.datFrom) <> year(@.getdate) or year(@.datTo) <> year(@.getdate)
set @.returnvalue = 0
when not(@.iMonth >= Month(@.datFrom) and @.iMonth <= month(@.datTo)
set @.returnvalue 0
when month(@.datFrom) = month(@.datTo)
@.set @.returnvalue = @.cBudget
when month(@.datFrom) = @.iMonth
set @.returnvalue = (@.iDaysInMonth + 1 - day(@.datFrom)) / @.iDuration * @.cBudget
when month(@.datTo) = @.iMonth
set @.returnvalue = Day(datToDate) / iDuration * cBudget
when @.iMonth > month(@.datFrom) and @.iMonth < month(@.datTo)
set @.returnvalue = @.iDaysInMonth / @.iDuration * @.cBudget
end

return @.returnvalue
END

This is my first post to this forum - so any constructive criticism will be welcomed.

Basically, where am I going wrong? - have I got the wrong end of the stick? Have I got the wrong stick? Have I got a stick of dynamite?!

All help greatfully received,
Paul:eek:Case statements work a little differently in T-SQL. Try this:

CREATE FUNCTION [dbo].[calcPercentOfBudget] (@.datFrom as datetime, @.datTo as datetime , @.iMonth as int, @.cBudget as money, @.GetDate as datetime)
RETURNS money AS
BEGIN
declare @.iDuration int
declare @.returnvalue money
declare @.sRatio decimal
declare @.iDaysInMonth int

set @.iDuration = datediff(d, @.datFrom, @.datTo)
set @.iDaysinMonth = dbo.LastDayInMonth('1/' + cast(@.iMonth as varchar) + '/' + cast(year(@.getdate) as varchar))

select @.returnvalue =
case when year(@.datFrom) <> year(@.getdate) or year(@.datTo) <> year(@.getdate) then 0
when not(@.iMonth >= Month(@.datFrom) and @.iMonth <= month(@.datTo) then 0
when month(@.datFrom) = month(@.datTo) then @.cBudget
when month(@.datFrom) = @.iMonth then (@.iDaysInMonth + 1 - day(@.datFrom)) / @.iDuration * @.cBudget
when month(@.datTo) = @.iMonth then Day(datToDate) / iDuration * cBudget
when @.iMonth > month(@.datFrom) and @.iMonth < month(@.datTo) then @.iDaysInMonth / @.iDuration * @.cBudget
end

return @.returnvalue
END

Case in T-SQL returns a value, rather than executes a block of code.|||fantastic, after a couple of other debugs from translation I have a result that works!

Many thanks :)

New to SQL - Please help

Please excues my ignorance, but I am in no way a SQL guy; so here goes:
I have an accounting package that uses SQL 2000. SQL is creating a backup
file that is getting HUGE (about 2 GB)
The actual data is around a few hundred MB.
Is there a way to reduce the size of the backup file by:
Compacting?
Performaing a backup (that SQL knows about)?
Is there a way to move that file?
Can any of this be done on-line?
Thanks for any help.
Regards;
PBWelcome to SQL
Try doing the following at a time when the database has
few or no users.
Right Click on the Database and select Properties
Select Options Tab
Under Recovery - Model if its not set to simple change it
to simple.
Press OK
Right Click the database and select All Tasks -> Shrink
Database
Select the check box 'Move Pages to beginning...'
Press ok
Go make yourself a drink whilst your waiting ;)
And after if finishes change your 'Recovery - Model' back
to what it was prior to your change.
Peter
>--Original Message--
>Please excues my ignorance, but I am in no way a SQL guy;
so here goes:
>I have an accounting package that uses SQL 2000. SQL is
creating a backup
>file that is getting HUGE (about 2 GB)
>The actual data is around a few hundred MB.
>Is there a way to reduce the size of the backup file by:
>Compacting?
>Performaing a backup (that SQL knows about)?
>Is there a way to move that file?
>Can any of this be done on-line?
>Thanks for any help.
>Regards;
>PB
>
>.
>|||Please forgive my ignorance, but:
Where is the database? It appears that the app that uses SQL is pointing to
a file share on another server. The backup file (BAK) is local, and it is
killing me. As I said, it is 2 GB and growing.
If it is the BAK file that is huge; will that fix my problem? The database
itself is only 132 MB.
TIA;
PB
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:44e901c47fb8$3fa1b9d0$a401280a@.phx.gbl...
> Welcome to SQL
> Try doing the following at a time when the database has
> few or no users.
> Right Click on the Database and select Properties
> Select Options Tab
> Under Recovery - Model if its not set to simple change it
> to simple.
> Press OK
> Right Click the database and select All Tasks -> Shrink
> Database
> Select the check box 'Move Pages to beginning...'
> Press ok
> Go make yourself a drink whilst your waiting ;)
> And after if finishes change your 'Recovery - Model' back
> to what it was prior to your change.
> Peter
>
>
> >--Original Message--
> >Please excues my ignorance, but I am in no way a SQL guy;
> so here goes:
> >
> >I have an accounting package that uses SQL 2000. SQL is
> creating a backup
> >file that is getting HUGE (about 2 GB)
> >
> >The actual data is around a few hundred MB.
> >
> >Is there a way to reduce the size of the backup file by:
> >
> >Compacting?
> >Performaing a backup (that SQL knows about)?
> >
> >Is there a way to move that file?
> >
> >Can any of this be done on-line?
> >
> >Thanks for any help.
> >
> >Regards;
> >
> >PB
> >
> >
> >
> >.
> >|||When releasing space SQL Server doesn't actually free
disk space, its thinking is if its needed it before, it
needs it now, so if you say delete half your database you
will see the same disk space.
The problem though is probably to do with your log file
that will grows a heck of a lot.
To work out where your files are click onto your database
then at the top menu selecy view 'Something (I'm away
from SQL) pad'
It will give you the location and size of your data files
and log files.
These files can be anywhere on your Network.
As for your backup files (.BAK) its considered good
practice to store them on a different server than the one
that SQL is on.
And yes, performing the steps will solve the problem as
the steps will release the unused disk space and so the
backups will not be fooled into thinking there is more to
the files than there actually is.
Anyway its 22:15 here and I am off to do something else.
Good luck
Peter
Peter
>--Original Message--
>Please forgive my ignorance, but:
>Where is the database? It appears that the app that uses
SQL is pointing to
>a file share on another server. The backup file (BAK) is
local, and it is
>killing me. As I said, it is 2 GB and growing.
>If it is the BAK file that is huge; will that fix my
problem? The database
>itself is only 132 MB.
>TIA;
>PB
>
>"Peter The Spate" <anonymous@.discussions.microsoft.com>
wrote in message
>news:44e901c47fb8$3fa1b9d0$a401280a@.phx.gbl...
>> Welcome to SQL
>> Try doing the following at a time when the database has
>> few or no users.
>> Right Click on the Database and select Properties
>> Select Options Tab
>> Under Recovery - Model if its not set to simple change
it
>> to simple.
>> Press OK
>> Right Click the database and select All Tasks -> Shrink
>> Database
>> Select the check box 'Move Pages to beginning...'
>> Press ok
>> Go make yourself a drink whilst your waiting ;)
>> And after if finishes change your 'Recovery - Model'
back
>> to what it was prior to your change.
>> Peter
>>
>>
>> >--Original Message--
>> >Please excues my ignorance, but I am in no way a SQL
guy;
>> so here goes:
>> >
>> >I have an accounting package that uses SQL 2000. SQL
is
>> creating a backup
>> >file that is getting HUGE (about 2 GB)
>> >
>> >The actual data is around a few hundred MB.
>> >
>> >Is there a way to reduce the size of the backup file
by:
>> >
>> >Compacting?
>> >Performaing a backup (that SQL knows about)?
>> >
>> >Is there a way to move that file?
>> >
>> >Can any of this be done on-line?
>> >
>> >Thanks for any help.
>> >
>> >Regards;
>> >
>> >PB
>> >
>> >
>> >
>> >.
>> >
>
>.
>|||Are you appending each backup to your existing backup set?
If so then your backup file will continue to grow.
If you are using Enterprise Manager to do the backup,
check this:
R-click the database you want to back up.
Select 'All Tasks-->Backup Database' and in the 'General'
tab have a look at the 'Append to media' option - if this
is set then change it to check the 'Overwrite Existing
media' option instead.
Doing this will leave you with only the current backup so
you might want to set up a database maintenance plan
instead to handle your backups.
HTH
John
>--Original Message--
>Please excues my ignorance, but I am in no way a SQL guy;
so here goes:
>I have an accounting package that uses SQL 2000. SQL is
creating a backup
>file that is getting HUGE (about 2 GB)
>The actual data is around a few hundred MB.
>Is there a way to reduce the size of the backup file by:
>Compacting?
>Performaing a backup (that SQL knows about)?
>Is there a way to move that file?
>Can any of this be done on-line?
>Thanks for any help.
>Regards;
>PB
>
>.
>

New to SQL - Please help

Welcome to SQL
Try doing the following at a time when the database has
few or no users.
Right Click on the Database and select Properties
Select Options Tab
Under Recovery - Model if its not set to simple change it
to simple.
Press OK
Right Click the database and select All Tasks -> Shrink
Database
Select the check box 'Move Pages to beginning...'
Press ok
Go make yourself a drink whilst your waiting ;)
And after if finishes change your 'Recovery - Model' back
to what it was prior to your change.
Peter

>--Original Message--
>Please excues my ignorance, but I am in no way a SQL guy;
so here goes:
>I have an accounting package that uses SQL 2000. SQL is
creating a backup
>file that is getting HUGE (about 2 GB)
>The actual data is around a few hundred MB.
>Is there a way to reduce the size of the backup file by:
>Compacting?
>Performaing a backup (that SQL knows about)?
>Is there a way to move that file?
>Can any of this be done on-line?
>Thanks for any help.
>Regards;
>PB
>
>.
>
Please forgive my ignorance, but:
Where is the database? It appears that the app that uses SQL is pointing to
a file share on another server. The backup file (BAK) is local, and it is
killing me. As I said, it is 2 GB and growing.
If it is the BAK file that is huge; will that fix my problem? The database
itself is only 132 MB.
TIA;
PB
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:44e901c47fb8$3fa1b9d0$a401280a@.phx.gbl...[vbcol=seagreen]
> Welcome to SQL
> Try doing the following at a time when the database has
> few or no users.
> Right Click on the Database and select Properties
> Select Options Tab
> Under Recovery - Model if its not set to simple change it
> to simple.
> Press OK
> Right Click the database and select All Tasks -> Shrink
> Database
> Select the check box 'Move Pages to beginning...'
> Press ok
> Go make yourself a drink whilst your waiting ;)
> And after if finishes change your 'Recovery - Model' back
> to what it was prior to your change.
> Peter
>
>
> so here goes:
> creating a backup
|||When releasing space SQL Server doesn't actually free
disk space, its thinking is if its needed it before, it
needs it now, so if you say delete half your database you
will see the same disk space.
The problem though is probably to do with your log file
that will grows a heck of a lot.
To work out where your files are click onto your database
then at the top menu selecy view 'Something (I'm away
from SQL) pad'
It will give you the location and size of your data files
and log files.
These files can be anywhere on your Network.
As for your backup files (.BAK) its considered good
practice to store them on a different server than the one
that SQL is on.
And yes, performing the steps will solve the problem as
the steps will release the unused disk space and so the
backups will not be fooled into thinking there is more to
the files than there actually is.
Anyway its 22:15 here and I am off to do something else.
Good luck
Peter
Peter

>--Original Message--
>Please forgive my ignorance, but:
>Where is the database? It appears that the app that uses
SQL is pointing to
>a file share on another server. The backup file (BAK) is
local, and it is
>killing me. As I said, it is 2 GB and growing.
>If it is the BAK file that is huge; will that fix my
problem? The database
>itself is only 132 MB.
>TIA;
>PB
>
>"Peter The Spate" <anonymous@.discussions.microsoft.com>
wrote in message[vbcol=seagreen]
>news:44e901c47fb8$3fa1b9d0$a401280a@.phx.gbl...
it[vbcol=seagreen]
back[vbcol=seagreen]
guy;[vbcol=seagreen]
is[vbcol=seagreen]
by:
>
>.
>

New to SQL - Please help

Please excues my ignorance, but I am in no way a SQL guy; so here goes:
I have an accounting package that uses SQL 2000. SQL is creating a backup
file that is getting HUGE (about 2 GB)
The actual data is around a few hundred MB.
Is there a way to reduce the size of the backup file by:
Compacting?
Performaing a backup (that SQL knows about)?
Is there a way to move that file?
Can any of this be done on-line?
Thanks for any help.
Regards;
PBPlease forgive my ignorance, but:
Where is the database? It appears that the app that uses SQL is pointing to
a file share on another server. The backup file (BAK) is local, and it is
killing me. As I said, it is 2 GB and growing.
If it is the BAK file that is huge; will that fix my problem? The database
itself is only 132 MB.
TIA;
PB
"Peter The Spate" <anonymous@.discussions.microsoft.com> wrote in message
news:44e901c47fb8$3fa1b9d0$a401280a@.phx.gbl...[vbcol=seagreen]
> Welcome to SQL
> Try doing the following at a time when the database has
> few or no users.
> Right Click on the Database and select Properties
> Select Options Tab
> Under Recovery - Model if its not set to simple change it
> to simple.
> Press OK
> Right Click the database and select All Tasks -> Shrink
> Database
> Select the check box 'Move Pages to beginning...'
> Press ok
> Go make yourself a drink whilst your waiting ;)
> And after if finishes change your 'Recovery - Model' back
> to what it was prior to your change.
> Peter
>
>
> so here goes:
> creating a backup|||When releasing space SQL Server doesn't actually free
disk space, its thinking is if its needed it before, it
needs it now, so if you say delete half your database you
will see the same disk space.
The problem though is probably to do with your log file
that will grows a heck of a lot.
To work out where your files are click onto your database
then at the top menu selecy view 'Something (I'm away
from SQL) pad'
It will give you the location and size of your data files
and log files.
These files can be anywhere on your Network.
As for your backup files (.BAK) its considered good
practice to store them on a different server than the one
that SQL is on.
And yes, performing the steps will solve the problem as
the steps will release the unused disk space and so the
backups will not be fooled into thinking there is more to
the files than there actually is.
Anyway its 22:15 here and I am off to do something else.
Good luck
Peter
Peter

>--Original Message--
>Please forgive my ignorance, but:
>Where is the database? It appears that the app that uses
SQL is pointing to
>a file share on another server. The backup file (BAK) is
local, and it is
>killing me. As I said, it is 2 GB and growing.
>If it is the BAK file that is huge; will that fix my
problem? The database
>itself is only 132 MB.
>TIA;
>PB
>
>"Peter The Spate" <anonymous@.discussions.microsoft.com>
wrote in message
>news:44e901c47fb8$3fa1b9d0$a401280a@.phx.gbl...
it[vbcol=seagreen]
back[vbcol=seagreen]
guy;[vbcol=seagreen]
is[vbcol=seagreen]
by:[vbcol=seagreen]
>
>.
>

New to SQL - Old SAS School

I'm trying to understand Datawarehousing in the MS SQL World.
I'm a SAS Developer and have read reams of information on MSDN about Microso
fts Approach and DTS. But if I want to run a completely automated system in
Batch, is DTS still the approach.
Can anyone suggest a really good course in the UK or Book that might help?
I can see that SQL is a great tool as I've been getting used to it by contro
lling it from SAS - now I just want to go that little bit further.
Do I need to develop my own environment in VB.NET ?
Please help I'm getting overloaded with MS's TLAs and now need someone to te
ll me exactly what is neededHey, have u looked at www.swldts.com
--
SQL Server MVP - Colombia
"Jason Duncan-King" wrote:

> I'm trying to understand Datawarehousing in the MS SQL World.
> I'm a SAS Developer and have read reams of information on MSDN about Micro
softs Approach and DTS. But if I want to run a completely automated system
in Batch, is DTS still the approach.
> Can anyone suggest a really good course in the UK or Book that might help?
> I can see that SQL is a great tool as I've been getting used to it by cont
rolling it from SAS - now I just want to go that little bit further.
> Do I need to develop my own environment in VB.NET ?
> Please help I'm getting overloaded with MS's TLAs and now need someone to tell me
exactly what is needed|||In article <679321A7-CC23-43C8-A6A0-3CC74A543653@.microsoft.com>,
Alejandro Leguizamo (MVP) wrote:
> Hey, have u looked at www.swldts.com
>
www.sqldts.com right?
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needssql

New to SQL - Old SAS School

I'm trying to understand Datawarehousing in the MS SQL World.
I'm a SAS Developer and have read reams of information on MSDN about Microsofts Approach and DTS. But if I want to run a completely automated system in Batch, is DTS still the approach.
Can anyone suggest a really good course in the UK or Book that might help?
I can see that SQL is a great tool as I've been getting used to it by controlling it from SAS - now I just want to go that little bit further.
Do I need to develop my own environment in VB.NET ?
Please help I'm getting overloaded with MS's TLAs and now need someone to tell me exactly what is needed
Hey, have u looked at www.swldts.com
SQL Server MVP - Colombia
"Jason Duncan-King" wrote:

> I'm trying to understand Datawarehousing in the MS SQL World.
> I'm a SAS Developer and have read reams of information on MSDN about Microsofts Approach and DTS. But if I want to run a completely automated system in Batch, is DTS still the approach.
> Can anyone suggest a really good course in the UK or Book that might help?
> I can see that SQL is a great tool as I've been getting used to it by controlling it from SAS - now I just want to go that little bit further.
> Do I need to develop my own environment in VB.NET ?
> Please help I'm getting overloaded with MS's TLAs and now need someone to tell me exactly what is needed
|||In article <679321A7-CC23-43C8-A6A0-3CC74A543653@.microsoft.com>,
Alejandro Leguizamo (MVP) wrote:
> Hey, have u looked at www.swldts.com
>
www.sqldts.com right?
Allan Mitchell (Microsoft SQL Server MVP)
MCSE,MCDBA
www.SQLDTS.com
www.konesans.com - for all your consultancy needs

new to SQL - create table command question

hi

can someone please explain the following please

why does this fail with specified owner testdb does not exist or you do not have permissions

create testdb.testtable (

testval int

)

yet if i create testdb and then run the following against this new db

create testtable (

testval int

)

command command completes successfully......what am i not understanding or doing wrong?

thank you

oooops....sorry

im so new i cant even type the command correctly

this command fails....

create table testdb.testtable (

testval int

)

this command works....

create table testtable (

testval int

)

|||Depending on the version of SQL Server you are using, the prefix testdb indicates either the owner of the table or the schema name that the object / table will be stored in. it does not identify the database where the object has to be created in. For the database identifier you will have to you the three partname which would be (assuming that you want to store the object in the users default schema (for SQL 2k5) or within his owner "schema":

CREATE TABLE testdb..SomeTable
(SomeColumn int)

Jens K. Suessmeyer.

http://www.sqlserver2005.de

New to SQL - Backup Fails

Bear with me, as I am new to SQL and have quite simply been thrown into this situation.

I have set up a simple backup to DVD that fails. The log file is attached. I'm sure that there's an obvious answer here, but I don't know what to look for. Until we find a new database guy, I'm it.

Thansk so much in advance for any insight you can provide!

TomWhy to a DVD(?) Why not to disk? It's faster...

And if you're it (Like in tag?) then why not use the maintenance wizard?|||well, your errors relate to what you're asking in the first command, - set db to single user mode. if there is at least one more connection (which can be even yours0 the command will fail. you can write a simple script that would create a script that kills all connections to that database. fire that script before running sqlmaint and set a job step dependency "on success" with sqlmaint step.|||Just to be clear: ms_sql_dba is right; your job is failing because your database is not in single user mode. SQL backups can run with multiple users logged in, but in your case, the first task in your job is to "repair" the database.

I'm guessing that you are using the maintenance wizard; if so, skip the Integrity page on the maintenance wizard (make sure nothing is checked).

After doing that, your job should run okay.

Regards,

hmscott|||Thanks to all or you for your help.

Skipping the integrity page in the maintenance wizard cleared it up!

Hopefully I won't have to do this very long!

Regards,

Tom

New to SQL -- Any good reads?

With my recent employment at my internship, I've been given the task to start
learning as much about SQL servers and querying(sp?) as possible.
I was wondering if there is anybody out there knows of some good
articles/books that would send me on my way?
I'm not looking for "super" basic stuff but as I've been exposed to
databases in the past but would like to get into more deeper topics. I guess
something along the lines of not a novice but no where near being able to
administer a DB myself.
Thanks,
BenSome good ones.
Microsoft SQL Server Books
http://vyaskn.tripod.com/sqlbooks.htm
AMB
"Ben" wrote:
> With my recent employment at my internship, I've been given the task to start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben|||Kalen Delaney's Inside SQL Server is my desktop bible, offers enough info on
almost all facets in depth enough to make it invaluable.
"Ben" wrote:
> With my recent employment at my internship, I've been given the task to start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben|||Hi,
SQL Server Books online will be a very good option.
Thanks
Hari
SQL Server MVP
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:BEA56BB4-BE39-4C1B-89EB-24B2AEE2BC81@.microsoft.com...
> With my recent employment at my internship, I've been given the task to
> start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I
> guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben

New to SQL -- Any good reads?

With my recent employment at my internship, I've been given the task to start
learning as much about SQL servers and querying(sp?) as possible.
I was wondering if there is anybody out there knows of some good
articles/books that would send me on my way?
I'm not looking for "super" basic stuff but as I've been exposed to
databases in the past but would like to get into more deeper topics. I guess
something along the lines of not a novice but no where near being able to
administer a DB myself.
Thanks,
Ben
Some good ones.
Microsoft SQL Server Books
http://vyaskn.tripod.com/sqlbooks.htm
AMB
"Ben" wrote:

> With my recent employment at my internship, I've been given the task to start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben
|||Kalen Delaney's Inside SQL Server is my desktop bible, offers enough info on
almost all facets in depth enough to make it invaluable.
"Ben" wrote:

> With my recent employment at my internship, I've been given the task to start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben
|||Hi,
SQL Server Books online will be a very good option.
Thanks
Hari
SQL Server MVP
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:BEA56BB4-BE39-4C1B-89EB-24B2AEE2BC81@.microsoft.com...
> With my recent employment at my internship, I've been given the task to
> start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I
> guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben
sql

New to SQL -- Any good reads?

With my recent employment at my internship, I've been given the task to star
t
learning as much about SQL servers and querying(sp?) as possible.
I was wondering if there is anybody out there knows of some good
articles/books that would send me on my way?
I'm not looking for "super" basic stuff but as I've been exposed to
databases in the past but would like to get into more deeper topics. I gues
s
something along the lines of not a novice but no where near being able to
administer a DB myself.
Thanks,
BenSome good ones.
Microsoft SQL Server Books
http://vyaskn.tripod.com/sqlbooks.htm
AMB
"Ben" wrote:

> With my recent employment at my internship, I've been given the task to st
art
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I gu
ess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben|||Kalen Delaney's Inside SQL Server is my desktop bible, offers enough info on
almost all facets in depth enough to make it invaluable.
"Ben" wrote:

> With my recent employment at my internship, I've been given the task to st
art
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I gu
ess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben|||Hi,
SQL Server Books online will be a very good option.
Thanks
Hari
SQL Server MVP
"Ben" <Ben@.discussions.microsoft.com> wrote in message
news:BEA56BB4-BE39-4C1B-89EB-24B2AEE2BC81@.microsoft.com...
> With my recent employment at my internship, I've been given the task to
> start
> learning as much about SQL servers and querying(sp?) as possible.
> I was wondering if there is anybody out there knows of some good
> articles/books that would send me on my way?
> I'm not looking for "super" basic stuff but as I've been exposed to
> databases in the past but would like to get into more deeper topics. I
> guess
> something along the lines of not a novice but no where near being able to
> administer a DB myself.
> Thanks,
> Ben

New to SQL

I have a table with a field that is 14 characters long. I have created two more columns with in the same table. I wish to parse each record taking the 14 character field and storing the first 10 characters in one of the newly created fields and take the next 4 characters and store them in the other newly created fields.

Can someone tell me how to do that?Look in BOL (Books Online) at the Left and Right functions.|||I can do the left and right functions. I just don't understand the looping through the records and updating the other fields.|||Run an update query:

UPDATE TableName
SET SecondField = Left(FirstField,10),
ThirdField = Right(FirstField,4)|||Thanks. I was thinking this was going to be more complicated.|||Of course the real question is should you have the other fields in the table, since their values can always be calculated from the first. Generally speaking the answer would be no.

New to SQL

Hello,

I just installed SQL 2005 on my laptop,,,, I know this is not an email question but maybe you can guide me to where i can find the answers.....

I want to test it out and configure it with cognos and informatica.....

Is it possible for me to create sample servers and configure it for a test

I did instal web Server (Abyss), not sure if this helps......

How do i set up a test server on my computer

And is all possible to do it on one computer?

thank-you in advance

You already have a default instance ( 1 server) installed on your computer. If you want to have more use Microsoft Virtual PC to install another instance as you have another pc. Or install a second instance , a named instance that mean you have another server on your laptop.

Sure for working with Virtual PC or install another instance you have to have disk size, RAM (for a Virtual PC application with SS2k5 you have to have 512 MB Ram )

So, 512 RAM for SQL on the laptop with 512 Mb RAM for SQL on Virtual PC you have to have minimum 1 GB RAM.

As a web server you can use IIS (Internet Information Services) on Microsoft host

|||

Thank-you!

How can i create a server on my windows xp computer so i can connect to it from SQL 2005?

thank-you

|||In windows XP you can install only SQL express edition or SQL Server 2005 trail version (180 days valid).

Download SQL express
|||

Vidhya Sagar wrote:

In windows XP you can install only SQL express edition or SQL Server 2005 trail version (180 days valid).

No, it is not correct

I have Windows XP Professional and the command select @.@.version has output:

-

Microsoft SQL Server 2005 - 9.00.3027.00 (Intel X86)

Oct 27 2006 15:59:00

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

(1 row(s) affected)

|||

russski wrote:

How can i create a server on my windows xp computer so i can connect to it from SQL 2005?

If ou install a SQL server on a machine you install both client and server ; in some time ou have the option to install only client tools. So , if you have a SQL on the host and a virtual PC machine running on that machine with SQL installed you can experiment connecting one to another.|||Hi,

Thx for the information. As you said all editions of SQL2k5 can be installed on XP Professional edition expect Enterprise edition.
In XP Home edition you can go only for express or developer or trial edition.

New to SQL

Hello,

I just installed SQL 2005 on my laptop,,,, I know this is not an email question but maybe you can guide me to where i can find the answers.....

I want to test it out and configure it with cognos and informatica.....

Is it possible for me to create sample servers and configure it for a test

I did instal web Server (Abyss), not sure if this helps......

How do i set up a test server on my computer

And is all possible to do it on one computer?

thank-you in advance

You already have a default instance ( 1 server) installed on your computer. If you want to have more use Microsoft Virtual PC to install another instance as you have another pc. Or install a second instance , a named instance that mean you have another server on your laptop.

Sure for working with Virtual PC or install another instance you have to have disk size, RAM (for a Virtual PC application with SS2k5 you have to have 512 MB Ram )

So, 512 RAM for SQL on the laptop with 512 Mb RAM for SQL on Virtual PC you have to have minimum 1 GB RAM.

As a web server you can use IIS (Internet Information Services) on Microsoft host

|||

Thank-you!

How can i create a server on my windows xp computer so i can connect to it from SQL 2005?

thank-you

|||In windows XP you can install only SQL express edition or SQL Server 2005 trail version (180 days valid).

Download SQL express
|||

Vidhya Sagar wrote:

In windows XP you can install only SQL express edition or SQL Server 2005 trail version (180 days valid).

No, it is not correct

I have Windows XP Professional and the command select @.@.version has output:

-

Microsoft SQL Server 2005 - 9.00.3027.00 (Intel X86)

Oct 27 2006 15:59:00

Copyright (c) 1988-2005 Microsoft Corporation

Standard Edition on Windows NT 5.1 (Build 2600: Service Pack 2)

(1 row(s) affected)

|||

russski wrote:

How can i create a server on my windows xp computer so i can connect to it from SQL 2005?

If ou install a SQL server on a machine you install both client and server ; in some time ou have the option to install only client tools. So , if you have a SQL on the host and a virtual PC machine running on that machine with SQL installed you can experiment connecting one to another.|||Hi,

Thx for the information. As you said all editions of SQL2k5 can be installed on XP Professional edition expect Enterprise edition.
In XP Home edition you can go only for express or developer or trial edition.

New to SQL

Hi
I am setting for the first time SQL to access a database. I can get the
Enterprise Manager and the Network Utility to see the databases (on 2
computers) but when I go to the program to access the databases, I get a
Connection error.
Strangely, I set up the exact replica on the server and it can only see
itself and not the other computer.
I have scanned newsgroups etc but cannot locate the problem.
Thanks
cds
Could you please post the exact error message? There are various types of
connectivity issues, and we need to see the error message, to be able to
understand what's happening.
Vyas, MVP (SQL Server)
http://vyaskn.tripod.com/
"cds" <cdsaus2001@.yahoo.com.au> wrote in message
news:4140ccde$0$3711$afc38c87@.news.optusnet.com.au ...
> Hi
> I am setting for the first time SQL to access a database. I can get the
> Enterprise Manager and the Network Utility to see the databases (on 2
> computers) but when I go to the program to access the databases, I get a
> Connection error.
> Strangely, I set up the exact replica on the server and it can only see
> itself and not the other computer.
> I have scanned newsgroups etc but cannot locate the problem.
> Thanks
> cds
>
sql

New to SQL

New to SQLWelcome.
Keith
"Default User" <anonymous@.discussions.microsoft.com> wrote in message
news:1B93A9B4-52E7-46F2-B337-2BE454AF8A7D@.microsoft.com...
>

NEW to SQL

hi everyone

right now im searching SQL. iwant to study about it. but IM a PLC programmer i dont have background in Database can you help me.
i have a question.

Where can i gprogram SQL what are the software?
Creating database in Access is SQL?

Quote:

Originally Posted by OldSchool

hi everyone

right now im searching SQL. iwant to study about it. but IM a PLC programmer i dont have background in Database can you help me.
i have a question.

Where can i gprogram SQL what are the software?
Creating database in Access is SQL?


Hi. A couple of things.
SQL is a high level database programming language. It will work with several relational database management systems (RDBMS) such as Microsoft SQL Server, Oracle and Access.|||

Quote:

Originally Posted by willakawill

Hi. A couple of things.
SQL is a high level database programming language. It will work with several relational database management systems (RDBMS) such as Microsoft SQL Server, Oracle and Access.


Thanks!

it is just a support not a real stand Alone Program?|||

Quote:

Originally Posted by OldSchool

Thanks!

it is just a support not a real stand Alone Program?


Correct. Access is a stand alone programme. SQL is a language that can be used to define and manipulate data in Access.|||

Quote:

Originally Posted by willakawill

Correct. Access is a stand alone programme. SQL is a language that can be used to define and manipulate data in Access.


thanks!
for example;
i have a table created in MS ACCESS;

Can you site a sample code using ACCESS and SQL?

thanks

New to SQL

I'm learning SQL and am trying to solve this problem. I have a table of Teams with a TeamID and another table of people with a TeamID col. I am trying to count the number of people on a team and display the team with the most people.

I have used this to choose the number of people on the teams:

SELECT tname, COUNT(tid)
FROM teams t, people p
WHERE t.tid=p.tid
GROUP BY tname;

this displays the team name and the # of members

How can I choose the team with the most members?

Could I do something such as (the syntax may not be correct, but is the overall idea?):

SELECT tname, count(*)
FROM tname
GROUP BY tname
HAVING count(*) >= all
(SELECT tname, COUNT(tid)
FROM teams t, people p
WHERE t.tid=p.tid)Try:
SELECT t.tname, count(*)
FROM teams t, people p
GROUP BY t.tname
HAVING count(*) >= ALL
( SELECT COUNT(*)
FROM people p
GROUP BY p.tid
)|||no that printed out the team names and 23 for each team. 23 is the number of rows in people|||That's because I forgot the join:

SELECT t.tname, count(*)
FROM teams t, people p
WHERE p.tid = t.tid
GROUP BY t.tname
HAVING count(*) >= ALL
( SELECT COUNT(*)
FROM people p
GROUP BY p.tid
)|||thanks that worked... Maybe someone could explain how to think through a query in order to solve it...I have programmed C++ which is a procedural, and SQL is not. I'm having trouble relating a question given in english to how it should be written in SQL|||Yes, it does require a different frame of mind. I'll try to explain how I got to it...

The requirement is "display the team with the most people". To find out the number of people in each team we need to look at the people table:

SELECT p.tid, count(*)
FROM people p
GROUP BY p.tid;

But from those results we only want that group having (hint) the highest count:

SELECT p.tid, count(*)
FROM people p
GROUP BY p.tid
HAVING count(*) >= ALL (<counts by p.tid>;

Now this query serves for <counts by p.tid>:

SELECT COUNT(*)
FROM people p
GROUP BY p.tid;

It will return a list of counts like:
11
7
13
2

So we now have:

SELECT p.tid, count(*)
FROM people p
GROUP BY p.tid
HAVING count(*) >= ALL
( SELECT COUNT(*)
FROM people p
GROUP BY p.tid
);

The final part is more or less cosmetic: show the team name instead of the tid. We do that by joining to the team table in the main query, and then grouping by the team name instead of the tid (since, I assumed, both are unique within the teams table). That gives us the final query:
SELECT t.tname, count(*)
FROM teams t, people p
WHERE p.tid = t.tid
GROUP BY t.tname
HAVING count(*) >= ALL
( SELECT COUNT(*)
FROM people p
GROUP BY p.tid
);

There is more than one way to do it, and it is really a matter of experience and practice to become proficient at solving such problems.|||Thank you. That was explained well.|||Suppose I wanted to see which teams had 4 or more. I tried to change all to 4, which worked, but when I tried to output the names of people, nothing was displayed. I assume it because this column is removed some where in the having clause, but how do I retain that information...once again, thanks for taking the time to write the last reply!|||Hello,

Well you should have had :

SELECT t.tname, count(*)
FROM teams t, people p
WHERE p.tid = t.tid
GROUP BY t.tname
HAVING count(*) >=4;

So you display team names and their number of players for teams having at least 4 players.

Now, I don't understand why you speak of people name. You won't have them with this query.

What do you exactly want ?

Regards,

RBARAER|||Following on from RBARAER's query, you can get all the people's names like this:

SELECT t.tname, p.pname
FROM teams t, people p
WHERE p.tid = t.tid
AND p.tid IN
( SELECT p.tid, count(*)
FROM people p
GROUP BY p.tid
HAVING count(*) >=4
)
ORDER BY t.tname, p.pname;|||I'm sorry, when I said people name, it is actually fname and lname. when i tried the code it gave me an error

Only one expression can be specified in the select list when the subquery is not introduced with EXISTS.

why does it not let me enter p.lname and p.fname in the outer select?|||NO WAIT...it wasnt the outer select, it was the inner...it does not allow p.tid in the inner select statement. I removed it and it did not produce the correct answer. It returned a group name with 4 members and a gname with 1 member|||Then:
SELECT t.tname, p.fname, p.lname
FROM teams t, people p
WHERE p.tid = t.tid
AND p.tid IN
( SELECT p.tid
FROM people p
GROUP BY p.tid
HAVING count(*) >=4
)
ORDER BY t.tname, p.pname;
If that doesn't work, please post the exact SQL and error code/message.

(I have removed the COUNT(*) that I accidently left in before.)|||perfect!! How does it count the number of members without actually using count?|||oops...sorry, didnt notice it in the having

New to Reporting Services

I am used to using Crystal Reports, but now with having Visual Studio 2005 and SQL Server 2005, I am trying to get along and use Reporting Services.

I need to understand or have somebody point me to a website or good book that I can use to learn about Report Server and the reports.

Here is the actual problem that I am having: I have built a report into the company intranet. This report works if I run it locally, however the print button does not show up understandably. Somebody mentioned making it a server-side report. So I imported the report into the Report Server of the SQL Server. At first I was getting an error message "The path of the item "\Reports\report.rdlc" is not valid. The path must be less than 260 characters long and restrictions apply. (rsInvalidItemPath)"

I believe I solved that error, but now when the page displays I do not get an error message, but I also do not have a report. The reportViewer is empty.

I then noticed that maybe I had to copy the report to IIS (I am using IIS 5.1). So I used the copy tool to copy the report to the directory for the report server in IIS (reportserver$sql). I have the property for the Server URL set to this directory and I have the report path set to \Reports\report.rdlc. Now I am getting an error message about "the item cannot be found."

Thanks for any information and help.

In SSRS all reports are actually stored inside of the Reporting Services database. As far I know, copying a file to the reporting server will not do anything for you. You need to 'Deploy' the report to the reporting services server from inside the report designer or BIDS (Business Intelligence Design Studio or something like that). However, you could also deploy the report from inside of reporting services web interface. I would also recommend the apress book on reporting services 2005. I bought the book because it was the first rs2005 book out of the gate. But it is actually really good. I started out with no knowledge of SSRS2005 and very limited knowledge of reporting technologies in general. This book made reporting services easy to learn.

Pro SQL Server 2005 Reporting Services

http://www.amazon.com/gp/product/1590594983/sr=1-4/qid=1138689829/ref=pd_bbs_4/002-0186147-5716036?%5Fencoding=UTF8