Showing posts with label sqlserver. Show all posts
Showing posts with label sqlserver. Show all posts

Wednesday, March 28, 2012

how to enumerate all table in db??

how to enumerate all table with a column name in sqlserver db?This returns all objects with a given column name:

--------------
declare @.SearchColumn varchar(50)
set @.SearchColumn = 'Database_ID'

select sysobjects.name as ObjectName,
sysobjects.xtype as ObjectType
from sysobjects
inner join syscolumns on sysobjects.id = syscolumns.id
where syscolumns.name = @.SearchColumn
--------------

If you want just tables, filter for sysobjects.xtype = 'U'

Friday, March 23, 2012

How to enable TCP/IP connectons to SqlServer

How to enable remote connections on TCP/IP?

I have just installed for first time SqlServer 2000,
and cannot connect from other host via ODBC.
I give hostname or address but it does not connect.
I checked on my firewall that there is no listenning socket
on port 1433 nor 1440 on sqlserver host.

I can only connect using "(local)" server in ODBC on sqlserver host.

Regards,
Mark"netx" <user72wytnij@.go2.pl> wrote in message
news:42302557$0$3224$f69f905@.mamut2.aster.pl...
> How to enable remote connections on TCP/IP?
> I have just installed for first time SqlServer 2000,
> and cannot connect from other host via ODBC.
> I give hostname or address but it does not connect.
> I checked on my firewall that there is no listenning socket
> on port 1433 nor 1440 on sqlserver host.
> I can only connect using "(local)" server in ODBC on sqlserver host.

start->programs->Microsoft SQL Server->Client Network Utility

then click on TCP/IP in right panel and press 'enable'button', click on
'applay', 'ok' then restart SQL server

Regards,
Fibre Optic|||Fibre Optic (fibre_optic@.go2.pl) writes:
> "netx" <user72wytnij@.go2.pl> wrote in message
> news:42302557$0$3224$f69f905@.mamut2.aster.pl...
>> How to enable remote connections on TCP/IP?
>>
>> I have just installed for first time SqlServer 2000,
>> and cannot connect from other host via ODBC.
>> I give hostname or address but it does not connect.
>> I checked on my firewall that there is no listenning socket
>> on port 1433 nor 1440 on sqlserver host.
>>
>> I can only connect using "(local)" server in ODBC on sqlserver host.
>
> start->programs->Microsoft SQL Server->Client Network Utility
> then click on TCP/IP in right panel and press 'enable'button', click on
> 'applay', 'ok' then restart SQL server

You probably mean the Server Network Utility.

--
Erland Sommarskog, SQL Server MVP, esquel@.sommarskog.se

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

How to enable SMO and SQL-DMO

When I installed SqlServer 2005 SP1, a warning message stated that I need to
install Hotfix 2047 or higher. I searched MSDN website and found Cumulative
hotfix package (buld 2153) for SQL Server 2005.
If I understand correctly there are 6 different hotfixes that must be
applied in a particular sequence and I must enable something called Server
Management Object (SMO), and SQL Server Distributed Management Object
(SQL-DMO) before installing the hotfix package.
"You must enable the SQL Server Management Object (SMO) and SQL Server
Distributed Management Object (SQL-DMO) extended stored procedures before
you install the hotfix package. For more information about the SMO/DMO XPs
option, see SQL Server 2005 Books Online."
I have searched Books Online extensively and found nothing specific about
enablling SMO and SQL-DMO. Can someone please give me the short version of
how to do this?
Thanks,
KeithThey are both enabled by default. If you want to verify, use sp_configure.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"keith" <kbrickey@.dslextreme.com> wrote in message news:OPxx0cUTHHA.480@.TK2MSFTNGP02.phx.gbl
..
> When I installed SqlServer 2005 SP1, a warning message stated that I need
to
> install Hotfix 2047 or higher. I searched MSDN website and found Cumulativ
e
> hotfix package (buld 2153) for SQL Server 2005.
> If I understand correctly there are 6 different hotfixes that must be
> applied in a particular sequence and I must enable something called Server
> Management Object (SMO), and SQL Server Distributed Management Object
> (SQL-DMO) before installing the hotfix package.
> "You must enable the SQL Server Management Object (SMO) and SQL Server
> Distributed Management Object (SQL-DMO) extended stored procedures before
> you install the hotfix package. For more information about the SMO/DMO XPs
> option, see SQL Server 2005 Books Online."
> I have searched Books Online extensively and found nothing specific about
> enablling SMO and SQL-DMO. Can someone please give me the short version of
> how to do this?
> Thanks,
> Keith
>sql

How to enable SMO and SQL-DMO

When I installed SqlServer 2005 SP1, a warning message stated that I need to
install Hotfix 2047 or higher. I searched MSDN website and found Cumulative
hotfix package (buld 2153) for SQL Server 2005.
If I understand correctly there are 6 different hotfixes that must be
applied in a particular sequence and I must enable something called Server
Management Object (SMO), and SQL Server Distributed Management Object
(SQL-DMO) before installing the hotfix package.
"You must enable the SQL Server Management Object (SMO) and SQL Server
Distributed Management Object (SQL-DMO) extended stored procedures before
you install the hotfix package. For more information about the SMO/DMO XPs
option, see SQL Server 2005 Books Online."
I have searched Books Online extensively and found nothing specific about
enablling SMO and SQL-DMO. Can someone please give me the short version of
how to do this?
Thanks,
KeithThey are both enabled by default. If you want to verify, use sp_configure.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
http://sqlblog.com/blogs/tibor_karaszi
"keith" <kbrickey@.dslextreme.com> wrote in message news:OPxx0cUTHHA.480@.TK2MSFTNGP02.phx.gbl...
> When I installed SqlServer 2005 SP1, a warning message stated that I need to
> install Hotfix 2047 or higher. I searched MSDN website and found Cumulative
> hotfix package (buld 2153) for SQL Server 2005.
> If I understand correctly there are 6 different hotfixes that must be
> applied in a particular sequence and I must enable something called Server
> Management Object (SMO), and SQL Server Distributed Management Object
> (SQL-DMO) before installing the hotfix package.
> "You must enable the SQL Server Management Object (SMO) and SQL Server
> Distributed Management Object (SQL-DMO) extended stored procedures before
> you install the hotfix package. For more information about the SMO/DMO XPs
> option, see SQL Server 2005 Books Online."
> I have searched Books Online extensively and found nothing specific about
> enablling SMO and SQL-DMO. Can someone please give me the short version of
> how to do this?
> Thanks,
> Keith
>

how to enable replication from 2000 to 2005

Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:423927
I have never done replication before, so treat me like a novice, even though
I'm otherwise familiar with SQL Server.
I have a database on a SQL 2000 machine. Soon, I want to port the database
to SQL 2005, but in the meantime, I want to do some testing against our new
2005 box. I thought I should enable replication from the 2000 box to the
2005 box. This will allow us to do queries on each, test the data and
security settings are the same, and then *instantly* transfer the
application to pull from the 2005 box when testing is complete.
1) If the 2005's database starts as blank, will it copy over all existing
data, or just the data for new inserts/updates/deletes?
2) How do I enable replication, and of what type, on each box? I have a
book on the 2005 beta, which helps a little bit, but I'm still pretty lost
on what to set up on both boxes.
3) Will I have to reboot the 2000 box anytime in this process? I can't do
that. It's live 24/7.
4) What happens if the receiving box, the 2005 one, is rebooted? Will it
catch up with that couple minutes of lost data when it is back online?
1. The replication engine will generate a snapshot of the 2000 machine, data
and structure, and apply it to the 2005 machine. Changes will then be sent
from publisher to subscriber. You may need to manually transfer other
objects such as procedures, views, triggers, etc. You will have to transfer
logins and users yourself.
2. There is a replication wizard which can take you through the process.
You should be able to use transactional replication. You'll want to
configure the distributor on the 2005 machine.
3. No, it does not require a reboot.
4. If either the publisher or subscriber goes down, replication will pick up
where it left off. The amount of time to catch up is dependent upon the
volume of data needing to be sent and the bandwidth available to send it.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"HK" <replywithingroup@.notreal.com> wrote in message
news:vMOIf.8366$Jg.7375@.tornado.socal.rr.com...
>I have never done replication before, so treat me like a novice, even
>though
> I'm otherwise familiar with SQL Server.
> I have a database on a SQL 2000 machine. Soon, I want to port the
> database
> to SQL 2005, but in the meantime, I want to do some testing against our
> new
> 2005 box. I thought I should enable replication from the 2000 box to the
> 2005 box. This will allow us to do queries on each, test the data and
> security settings are the same, and then *instantly* transfer the
> application to pull from the 2005 box when testing is complete.
> 1) If the 2005's database starts as blank, will it copy over all existing
> data, or just the data for new inserts/updates/deletes?
> 2) How do I enable replication, and of what type, on each box? I have a
> book on the 2005 beta, which helps a little bit, but I'm still pretty lost
> on what to set up on both boxes.
> 3) Will I have to reboot the 2000 box anytime in this process? I can't
> do
> that. It's live 24/7.
> 4) What happens if the receiving box, the 2005 one, is rebooted? Will it
> catch up with that couple minutes of lost data when it is back online?
>

how to enable replication from 2000 to 2005

Xref: TK2MSFTNGP08.phx.gbl microsoft.public.sqlserver.server:423927
I have never done replication before, so treat me like a novice, even though
I'm otherwise familiar with SQL Server.
I have a database on a SQL 2000 machine. Soon, I want to port the database
to SQL 2005, but in the meantime, I want to do some testing against our new
2005 box. I thought I should enable replication from the 2000 box to the
2005 box. This will allow us to do queries on each, test the data and
security settings are the same, and then *instantly* transfer the
application to pull from the 2005 box when testing is complete.
1) If the 2005's database starts as blank, will it copy over all existing
data, or just the data for new inserts/updates/deletes?
2) How do I enable replication, and of what type, on each box? I have a
book on the 2005 beta, which helps a little bit, but I'm still pretty lost
on what to set up on both boxes.
3) Will I have to reboot the 2000 box anytime in this process? I can't do
that. It's live 24/7.
4) What happens if the receiving box, the 2005 one, is rebooted? Will it
catch up with that couple minutes of lost data when it is back online?1. The replication engine will generate a snapshot of the 2000 machine, data
and structure, and apply it to the 2005 machine. Changes will then be sent
from publisher to subscriber. You may need to manually transfer other
objects such as procedures, views, triggers, etc. You will have to transfer
logins and users yourself.
2. There is a replication wizard which can take you through the process.
You should be able to use transactional replication. You'll want to
configure the distributor on the 2005 machine.
3. No, it does not require a reboot.
4. If either the publisher or subscriber goes down, replication will pick up
where it left off. The amount of time to catch up is dependent upon the
volume of data needing to be sent and the bandwidth available to send it.
Mike
http://www.solidqualitylearning.com
Disclaimer: This communication is an original work and represents my sole
views on the subject. It does not represent the views of any other person
or entity either by inference or direct reference.
"HK" <replywithingroup@.notreal.com> wrote in message
news:vMOIf.8366$Jg.7375@.tornado.socal.rr.com...
>I have never done replication before, so treat me like a novice, even
>though
> I'm otherwise familiar with SQL Server.
> I have a database on a SQL 2000 machine. Soon, I want to port the
> database
> to SQL 2005, but in the meantime, I want to do some testing against our
> new
> 2005 box. I thought I should enable replication from the 2000 box to the
> 2005 box. This will allow us to do queries on each, test the data and
> security settings are the same, and then *instantly* transfer the
> application to pull from the 2005 box when testing is complete.
> 1) If the 2005's database starts as blank, will it copy over all existing
> data, or just the data for new inserts/updates/deletes?
> 2) How do I enable replication, and of what type, on each box? I have a
> book on the 2005 beta, which helps a little bit, but I'm still pretty lost
> on what to set up on both boxes.
> 3) Will I have to reboot the 2000 box anytime in this process? I can't
> do
> that. It's live 24/7.
> 4) What happens if the receiving box, the 2005 one, is rebooted? Will it
> catch up with that couple minutes of lost data when it is back online?
>

Friday, March 9, 2012

How to Download trial version

Hi Everybody,

Anybody know is there any place to download trial version of the Microsoft SQL

server 2000 Report service ?

Because i have already installed the sql server 2000 but in that CD i could find out

the Report service ! so how do i install the Report Service ?

do i have to buy the SQL Server report service 2000 separately ?

any idea ? its realy help me if i can download the trial software for practice my own

withing a small period !

regards

sujithf

Did you mean the 2005 version, if so, it comes with SQL Server 2005 and all you need to do is go to Control Panel, add/remove programs and select Add components from the setup wizard. Don't remember how it worked with 2000, but it may have been a separate download.

BTW, you want to get 2005, it has lots of improvements.

Sunday, February 19, 2012

how to do a wild card search with sqlserver

Is there syntax that lets you look for all names that include ell in them? That is, in Oracle it would be:

select id from customers where firstname like(%ell%)

Or, is there regular expression support in the select's where clause?

thanksTry:

select id from customers where firstname like '%ell%'