Showing posts with label order. Show all posts
Showing posts with label order. Show all posts

Monday, March 26, 2012

ms sql server client

probably a very easy question to answer:
which client component do i have to use in order to send queries to a remote sql server and receive the resultset, how can i start this utility?
Hi,
See linked servers in books online. Using Linked servers you could connect
to the remote sql server standing from local sql server.
Only thing is you have to use four part names to refer the table.
Linkedserver.dbname.tableowner.table_name
In otherwise you just want to query a remote server then:-
1. Create a alias server using CLeint network utility
2. Mention TCP IP as protocol , Ip address and port number
3. Using this alis name you could connect to to remote server and query the
remote server using query analyzer or OSQL utility
Thanks
Hari
MCDBA
"cajota" <cajota@.discussions.microsoft.com> wrote in message
news:E9DF0A05-3225-4B3E-BEC3-E52AFD618FE5@.microsoft.com...
> probably a very easy question to answer:
> which client component do i have to use in order to send queries to a
remote sql server and receive the resultset, how can i start this utility?
|||If you are trying to connect to one SQL Server but request information from
a different SQL Server, then Hari's answer is what you should do..
If you are asking what software must be installed on any client to connect
to a server... then
For connection using YOUR software, the minimum in Using the SQL Server CD,
install the CLIENT CONNECTIVITY piece.
If , additionally you want tools like query analyzer on your desktop,
install the tools options as well... Most programmers also install Books On
Line as well.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"cajota" <cajota@.discussions.microsoft.com> wrote in message
news:E9DF0A05-3225-4B3E-BEC3-E52AFD618FE5@.microsoft.com...
> probably a very easy question to answer:
> which client component do i have to use in order to send queries to a
remote sql server and receive the resultset, how can i start this utility?

ms sql server client

probably a very easy question to answer:
which client component do i have to use in order to send queries to a remote sql server and receive the resultset, how can i start this utility?Hi,
See linked servers in books online. Using Linked servers you could connect
to the remote sql server standing from local sql server.
Only thing is you have to use four part names to refer the table.
Linkedserver.dbname.tableowner.table_name
In otherwise you just want to query a remote server then:-
1. Create a alias server using CLeint network utility
2. Mention TCP IP as protocol , Ip address and port number
3. Using this alis name you could connect to to remote server and query the
remote server using query analyzer or OSQL utility
Thanks
Hari
MCDBA
"cajota" <cajota@.discussions.microsoft.com> wrote in message
news:E9DF0A05-3225-4B3E-BEC3-E52AFD618FE5@.microsoft.com...
> probably a very easy question to answer:
> which client component do i have to use in order to send queries to a
remote sql server and receive the resultset, how can i start this utility?|||If you are trying to connect to one SQL Server but request information from
a different SQL Server, then Hari's answer is what you should do..
If you are asking what software must be installed on any client to connect
to a server... then
For connection using YOUR software, the minimum in Using the SQL Server CD,
install the CLIENT CONNECTIVITY piece.
If , additionally you want tools like query analyzer on your desktop,
install the tools options as well... Most programmers also install Books On
Line as well.
--
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"cajota" <cajota@.discussions.microsoft.com> wrote in message
news:E9DF0A05-3225-4B3E-BEC3-E52AFD618FE5@.microsoft.com...
> probably a very easy question to answer:
> which client component do i have to use in order to send queries to a
remote sql server and receive the resultset, how can i start this utility?

ms sql server client

probably a very easy question to answer:
which client component do i have to use in order to send queries to a remote
sql server and receive the resultset, how can i start this utility?Hi,
See linked servers in books online. Using Linked servers you could connect
to the remote sql server standing from local sql server.
Only thing is you have to use four part names to refer the table.
Linkedserver.dbname.tableowner.table_name
In otherwise you just want to query a remote server then:-
1. Create a alias server using CLeint network utility
2. Mention TCP IP as protocol , Ip address and port number
3. Using this alis name you could connect to to remote server and query the
remote server using query analyzer or OSQL utility
Thanks
Hari
MCDBA
"cajota" <cajota@.discussions.microsoft.com> wrote in message
news:E9DF0A05-3225-4B3E-BEC3-E52AFD618FE5@.microsoft.com...
> probably a very easy question to answer:
> which client component do i have to use in order to send queries to a
remote sql server and receive the resultset, how can i start this utility?|||If you are trying to connect to one SQL Server but request information from
a different SQL Server, then Hari's answer is what you should do..
If you are asking what software must be installed on any client to connect
to a server... then
For connection using YOUR software, the minimum in Using the SQL Server CD,
install the CLIENT CONNECTIVITY piece.
If , additionally you want tools like query analyzer on your desktop,
install the tools options as well... Most programmers also install Books On
Line as well.
Wayne Snyder, MCDBA, SQL Server MVP
Mariner, Charlotte, NC
www.mariner-usa.com
(Please respond only to the newsgroups.)
I support the Professional Association of SQL Server (PASS) and it's
community of SQL Server professionals.
www.sqlpass.org
"cajota" <cajota@.discussions.microsoft.com> wrote in message
news:E9DF0A05-3225-4B3E-BEC3-E52AFD618FE5@.microsoft.com...
> probably a very easy question to answer:
> which client component do i have to use in order to send queries to a
remote sql server and receive the resultset, how can i start this utility?

Monday, March 19, 2012

MS SQL query, whats the default order the rows returned are sorted by?

i have a table and a column called req_id, i have it set as the primary key.. so if i just do SELECT * FROM table, shouldnt the rows returned be sorted by the order that the rows were inserted?

this database was improted from an access database.. when i did that in access it would return the rows in sorted order by the order the row was inserted.. but now in MS SQL, its not sorted in that order.. i can't really tell what type of order it's inIf you want an order, specify the order with the ORDER BY clause. If you are willing to take whatever order the optimizer decides on, omit the ORDER BY clause.

-PatP|||hmm this is weird.. in the access database if i select it, they're returned in the order the rows were inserted.. but after importing that database into ms sql, and selecting that table, the order isn't the same row i got when i ran the query in the access db|||Jet, the default database engine used by MS-Access is rather "simple-minded" when it comes to query optimization. MS-SQL has a much more powerful optimizer, which is a two-edged sword... The MS-SQL optimizer is able to easily process queries that Jet would never complete, but it does that processing in a very different way. As an interesting side effect, it also means that unless you specify an order in your query, there is no guarantee that running the exact same query on the same box will ever return the rows in the same order, even though it often will return them in a consistant order.

-PatP|||Ahhh ok i see what you're saying.

In my query, i had a left join statement in there.. i took that out and used a subquery instead of the join and it returns the rows fine now in the order they were inserted. Looks like the join caused the problem.|||No, the JOIN did not cause the problem. The absence of an ORDER BY statement caused the problem.|||The problem is actually a lot simpler than "the join caused the problem". If you want an order, specify it with the ORDER BY clause. If you don't care about an order and are willing to accept the order determined by the optimizer at the moment, omit the ORDER BY clause.

-PatP

Saturday, February 25, 2012

MS SQL 2005 and PDC Confusion

hello everyone, I am kind of confused with MS SQL 2005. I have friends who have been developing with MS SQL. They told me that in order to have a MS SQL Server, one need to have a PDC.

This is really a problem since I am behind a Unix box acting as a firewall/gateway. AFAIK, to install a PDC means that DHCP comes with it and DNS. This is really a problem...

Is it possible to have a MS SQL server without having to create a PDC? If so, how do I connect to my database on an MS SQL server. I develop in VB. I would appreciate any help/tips... TIA :D

You don′t need a PDC, you will need a domain only if you want to do WIndows authentication along with more than one computer. Otherwise you can use SQL Server authentication.

HTH, Jens K. Suessmeyer.

http://www.sqlserver2005.de