Showing posts with label windows. Show all posts
Showing posts with label windows. Show all posts

Wednesday, March 28, 2012

Need help - SQL Express 2005 (Beta 2) - where to start ?

Hi,
I downloaded and installed SQL Express 2005 (Beta 2). I want to create
tables and see whether I can get the data from the trivial windows based
application or web application I will be building in C# using Visual Studio
2003.
Question :
Where can I get the details regarding how to create tables in SQL 2005 and
how to get it connected with my application? Any suggestions regarding any
websites or good books that I can use to learn as well as use it as
reference in future.
Thank you for your time and willingness to help.
Best Regards,
Likhith
Download the Books Online for SQL Express 2005 and then just select Help on
the menu. If you want to get a lot deeper, there's already a really good
book out on SQL 2005. "A First Look At SQL Server 2005 For Developers" is
available from MS Press. I have it and would highly recommend it to anyone.
"Likhith Areekkal" <li_areekkal@.sympatico.ca> wrote in message
news:L4ucd.24$JG5.21616@.news20.bellglobal.com...
> Hi,
> I downloaded and installed SQL Express 2005 (Beta 2). I want to create
> tables and see whether I can get the data from the trivial windows based
> application or web application I will be building in C# using Visual
Studio
> 2003.
> Question :
> Where can I get the details regarding how to create tables in SQL 2005 and
> how to get it connected with my application? Any suggestions regarding any
> websites or good books that I can use to learn as well as use it as
> reference in future.
> Thank you for your time and willingness to help.
> Best Regards,
> Likhith
>
>
sql

Need help - SQL Express 2005 (Beta 2) - where to start ?

Hi,
I downloaded and installed SQL Express 2005 (Beta 2). I want to create
tables and see whether I can get the data from the trivial windows based
application or web application I will be building in C# using Visual Studio
2003.
Question :
Where can I get the details regarding how to create tables in SQL 2005 and
how to get it connected with my application? Any suggestions regarding any
websites or good books that I can use to learn as well as use it as
reference in future.
Thank you for your time and willingness to help.
Best Regards,
LikhithDownload the Books Online for SQL Express 2005 and then just select Help on
the menu. If you want to get a lot deeper, there's already a really good
book out on SQL 2005. "A First Look At SQL Server 2005 For Developers" is
available from MS Press. I have it and would highly recommend it to anyone.
"Likhith Areekkal" <li_areekkal@.sympatico.ca> wrote in message
news:L4ucd.24$JG5.21616@.news20.bellglobal.com...
> Hi,
> I downloaded and installed SQL Express 2005 (Beta 2). I want to create
> tables and see whether I can get the data from the trivial windows based
> application or web application I will be building in C# using Visual
Studio
> 2003.
> Question :
> Where can I get the details regarding how to create tables in SQL 2005 and
> how to get it connected with my application? Any suggestions regarding any
> websites or good books that I can use to learn as well as use it as
> reference in future.
> Thank you for your time and willingness to help.
> Best Regards,
> Likhith
>
>

Need Help - Local Synchronization Between SQL Mobile and Local SQL Database

Hi Everyone

I am at the stage of architecting my solution

My goal is to develop the system on a windows application and pda

There is a central server which will create a publication called inventory

The laptops which host the windows application will be subscribers to the central server using merge replication

The client now wants the PDA using SQL Mobile to synchronize with the local subscirber database on the laptop using active sync. They dont want to do it via WIFI to the IIS Server at the central server

I have been reading for days and I am still unsure whether this is possible to do.

I know Appforge provide a conduit for palm to access synchronization but not local sql databases

I would appreciate your help immensley

Can anyone please help me

|||

If you build your mobile application using VS2005 and SQL Mobile, you can use merge replication between your server-side publication and SQL Mobile. The SQL Mobile Books OnLine are the first place to start - read the section on merge replication.

-Darren Shaffer

|||

Hi Darren

Yes I got my sql mobile to synchronize successfully with the local desktop sql database called "Inventory"

However I have a new problem

I would like to have the desktop replicating with the server for database "Inventory"

I also got this to work seperately

I would now want the SQL mobile database to replicate with the local desktop database "Inventory" which inturn will replicate with the server copy called "Inventory"

I would like to have both replication scenarios joined together. I know that most people will say get the SQL mobile to talk directly to the server but this is the most expensive scenario I believe

Is this possible?

Thankyou for your earlier post

Touraj

|||

Touraj,

Sorry for not reading your post more closely - I see what you are trying to do now. You want to have a 3 tier merge replication going on. Yes, this is possible, but the database on the laptop is going to have to be SQL Server 2005, not SQL Express. The way it would have to work is this:

The laptop would have to have IIS installed and the SQL Mobile server tools. As far as the mobile app is concerned, the laptop is the publisher. On the laptop, you have a subscription to the central server in a replication relationship. You would turn around and create a publication on the laptop with the same articles that are in the subscription to the central server. You would need to be extremely careful with uniqueness in this situation - I would avoid identity columns and use GUIDs for everything in this app domain.

Is there any chance that both the laptops and the PDAs can be subscribers to the central server? That would be a much easier implementation, but it is possible to do what you suggested with the extra tier.

-Darren

|||

Hi Darren

Thankyou again for your kind assistance

Yes you are right. It would be easier and 'cheaper' to get the PDA to synch with the central server via the servers IIS process

I am tossing up between a i-Mate and iPaq 4700. I would be interested to know if you have a preference over the two

Thanks from sunny Australia.

Touraj

|||

I think both i-Mate and HP make great devices - I have not had any trouble with SQL Mobile on my JasJar or on a variety of iPaqs. My WM5 JasJar seems a little sluggish overall compared to a Dell Axim X50v (WM5), which others have noted as well. Not slow, just not instant to respond to input. I have not had specific experience with the 4700. There are some public newsgroups (microsoft.public.pocketpc.developer) where people tend to talk more about specific devices and you could use Google Advanced Groups search to get previous opinions on the 4700.

-Darren

Monday, March 19, 2012

Need an Expert Advice

I am using VS 2003 and trying to add a web reference reportservices2005.asmx on windows 2003 server.

I am able to do the same thing in win XP machines and works perfectly fine. now facing the problem with windows 2003 server.

i need to run or render the reports(RS2005 version) from VS 2003.

Pleeeeeease help.

Not sure why you're encountering this problem on W2K3. You can create your solution on the XP machine and then just copy it over to the 2K3 box.

Hope that helps,

-Lukasz

|||

Thks Lukasz.

I found some info on that, on windows 2003 server it uses IIS6.0, iis 6.0 has it own processing mode it does not use aspnet_wp.exe process when you run or render a report.

it ggives an error saying you cannot run two versions in one single process mode.

for it we need to change the process mode to run www using iis 5.0 isolation mode. that way we can run multiple versions of .net in one process mode. thats what happens on xp based machines.

|||

Oh, that's an entirely different problem. You cannot run two version of .Net Framework in the same process space. In W2K3, you can create a new application pool for the report server service and then assign it to the report server virtual directory. You can do this in the Reporting Services configuration tool. When you use this tool, the application pool will be setup they way you need it for RS.

Let me know if that doesn't solve the problem.

-Lukasz

|||

Lukasz, i noticed a problem with that, it is not even allowing me to add a webreference from my VS 2003 project to add a reportingservice2005.asmx

this problem is only happening on windows 2003 server and it gives me the above message and logs an error under events (application log)

if i am creating or trying to add a webreference on a win xp machine, it does'nt create that problem for me.

only on w2003 server this is happening. what options do i have fro vs 2003 calling a webservice render method reportexecution2005.asmx or reportingservice2005.asmx

Thanks Lukasz.

Need an Expert Advice

I am using VS 2003 and trying to add a web reference reportservices2005.asmx on windows 2003 server.

I am able to do the same thing in win XP machines and works perfectly fine. now facing the problem with windows 2003 server.

i need to run or render the reports(RS2005 version) from VS 2003.

Pleeeeeease help.

Not sure why you're encountering this problem on W2K3. You can create your solution on the XP machine and then just copy it over to the 2K3 box.

Hope that helps,

-Lukasz

|||

Thks Lukasz.

I found some info on that, on windows 2003 server it uses IIS6.0, iis 6.0 has it own processing mode it does not use aspnet_wp.exe process when you run or render a report.

it ggives an error saying you cannot run two versions in one single process mode.

for it we need to change the process mode to run www using iis 5.0 isolation mode. that way we can run multiple versions of .net in one process mode. thats what happens on xp based machines.

|||

Oh, that's an entirely different problem. You cannot run two version of .Net Framework in the same process space. In W2K3, you can create a new application pool for the report server service and then assign it to the report server virtual directory. You can do this in the Reporting Services configuration tool. When you use this tool, the application pool will be setup they way you need it for RS.

Let me know if that doesn't solve the problem.

-Lukasz

|||

Lukasz, i noticed a problem with that, it is not even allowing me to add a webreference from my VS 2003 project to add a reportingservice2005.asmx

this problem is only happening on windows 2003 server and it gives me the above message and logs an error under events (application log)

if i am creating or trying to add a webreference on a win xp machine, it does'nt create that problem for me.

only on w2003 server this is happening. what options do i have fro vs 2003 calling a webservice render method reportexecution2005.asmx or reportingservice2005.asmx

Thanks Lukasz.

need an DB2 ODBC

I have been searching all over and I cannot find or locate a DB2 odbc. We
setup SQL 2000 on a windows 2003 server that needs to pull data from an
iSeries AS400 using DB2. WE CANNOT LOCATE THE ODBC! Please, ANYONE who
can give us directon on where to get the driver, would be appreciated. We'v
e
located so many pages, but none have the actual download.
Can anyone help? All I need is that ODBC connection.
Thankshttp://www.microsoft.com/downloads/...&DisplayLang=en
"sunburst01" <sunburst01@.discussions.microsoft.com> a crit dans le message
de news: 320BD888-2643-42D0-9BAC-89D6BA47056C@.microsoft.com...
>I have been searching all over and I cannot find or locate a DB2 odbc. We
> setup SQL 2000 on a windows 2003 server that needs to pull data from an
> iSeries AS400 using DB2. WE CANNOT LOCATE THE ODBC! Please, ANYONE who
> can give us directon on where to get the driver, would be appreciated.
> We've
> located so many pages, but none have the actual download.
> Can anyone help? All I need is that ODBC connection.
> Thanks|||Thanks Christian, but I tried that one, its for SQL 2005...we're running SQ
L
2000. It wouldn't install on 2k...
There has to be one out there, I've search IBM site, (no luck, I can't find
ANY downloads there), and I've tried MS site as well.
But thank you anyway
"Christian Hamel" wrote:

> http://www.microsoft.com/downloads/...&DisplayLang=en
>
> "sunburst01" <sunburst01@.discussions.microsoft.com> a écrit dans le messa
ge
> de news: 320BD888-2643-42D0-9BAC-89D6BA47056C@.microsoft.com...
>
>|||[url]http://www-306.ibm.com/software/data/db2/udb/support/downloadv8_windows32bit.html[
/url]
This page has the links to the DB2 client and the new fixpack 12 that
came out yesterday. It's not much fun configuring it, but neither is
DB2.|||Oops, sorry, I read too fast..
I use to extract a bunch of information from our AS/400 (DB2) on our SQL
Server 2000 Enterprise edition using DTS. To do so, I've installed Client
Access Express on my server and defined an ODBC to my AS/400. It works very
well. Are you using Client Access in your company?
I remember @. that time, I've tried many things and nothing worked except
Client Access
"sunburst01" <sunburst01@.discussions.microsoft.com> a crit dans le message
de news: 82192B6C-DE2E-4347-8EC8-9DA2306D502D@.microsoft.com...[vbcol=seagreen]
> Thanks Christian, but I tried that one, its for SQL 2005...we're running
> SQL
> 2000. It wouldn't install on 2k...
> There has to be one out there, I've search IBM site, (no luck, I can't
> find
> ANY downloads there), and I've tried MS site as well.
> But thank you anyway
>
> "Christian Hamel" wrote:
>

need an DB2 ODBC

I have been searching all over and I cannot find or locate a DB2 odbc. We
setup SQL 2000 on a windows 2003 server that needs to pull data from an
iSeries AS400 using DB2. WE CANNOT LOCATE THE ODBC! Please, ANYONE who
can give us directon on where to get the driver, would be appreciated. We've
located so many pages, but none have the actual download.
Can anyone help? All I need is that ODBC connection.
Thankshttp://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en
"sunburst01" <sunburst01@.discussions.microsoft.com> a écrit dans le message
de news: 320BD888-2643-42D0-9BAC-89D6BA47056C@.microsoft.com...
>I have been searching all over and I cannot find or locate a DB2 odbc. We
> setup SQL 2000 on a windows 2003 server that needs to pull data from an
> iSeries AS400 using DB2. WE CANNOT LOCATE THE ODBC! Please, ANYONE who
> can give us directon on where to get the driver, would be appreciated.
> We've
> located so many pages, but none have the actual download.
> Can anyone help? All I need is that ODBC connection.
> Thanks|||Thanks Christian, but I tried that one, its for SQL 2005...we're running SQL
2000. It wouldn't install on 2k...
There has to be one out there, I've search IBM site, (no luck, I can't find
ANY downloads there), and I've tried MS site as well.
But thank you anyway :)
"Christian Hamel" wrote:
> http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en
>
> "sunburst01" <sunburst01@.discussions.microsoft.com> a écrit dans le message
> de news: 320BD888-2643-42D0-9BAC-89D6BA47056C@.microsoft.com...
> >I have been searching all over and I cannot find or locate a DB2 odbc. We
> > setup SQL 2000 on a windows 2003 server that needs to pull data from an
> > iSeries AS400 using DB2. WE CANNOT LOCATE THE ODBC! Please, ANYONE who
> > can give us directon on where to get the driver, would be appreciated.
> > We've
> > located so many pages, but none have the actual download.
> >
> > Can anyone help? All I need is that ODBC connection.
> >
> > Thanks
>
>|||http://www-306.ibm.com/software/data/db2/udb/support/downloadv8_windows32bit.html
This page has the links to the DB2 client and the new fixpack 12 that
came out yesterday. It's not much fun configuring it, but neither is
DB2.|||Oops, sorry, I read too fast..
I use to extract a bunch of information from our AS/400 (DB2) on our SQL
Server 2000 Enterprise edition using DTS. To do so, I've installed Client
Access Express on my server and defined an ODBC to my AS/400. It works very
well. Are you using Client Access in your company?
I remember @. that time, I've tried many things and nothing worked except
Client Access :(
"sunburst01" <sunburst01@.discussions.microsoft.com> a écrit dans le message
de news: 82192B6C-DE2E-4347-8EC8-9DA2306D502D@.microsoft.com...
> Thanks Christian, but I tried that one, its for SQL 2005...we're running
> SQL
> 2000. It wouldn't install on 2k...
> There has to be one out there, I've search IBM site, (no luck, I can't
> find
> ANY downloads there), and I've tried MS site as well.
> But thank you anyway :)
>
> "Christian Hamel" wrote:
>> http://www.microsoft.com/downloads/details.aspx?FamilyID=df0ba5aa-b4bd-4705-aa0a-b477ba72a9cb&DisplayLang=en
>>
>> "sunburst01" <sunburst01@.discussions.microsoft.com> a écrit dans le
>> message
>> de news: 320BD888-2643-42D0-9BAC-89D6BA47056C@.microsoft.com...
>> >I have been searching all over and I cannot find or locate a DB2 odbc.
>> >We
>> > setup SQL 2000 on a windows 2003 server that needs to pull data from an
>> > iSeries AS400 using DB2. WE CANNOT LOCATE THE ODBC! Please, ANYONE
>> > who
>> > can give us directon on where to get the driver, would be appreciated.
>> > We've
>> > located so many pages, but none have the actual download.
>> >
>> > Can anyone help? All I need is that ODBC connection.
>> >
>> > Thanks
>>

Friday, March 9, 2012

Need advice on buiding a dynamic TSQL command to run against all DB's

Hi All,

I am putting together a series of TSQL statements to be used as part of a DB maintenance plan on SQL server 2005 on Windows Server 2003. I know that the statement itself works against a single database. The intention is to write one routine that will execute on all non-system DB's. Here are the system specs:

__

Microsoft SQL Server Management Studio 9.00.2047.00

Microsoft Analysis Services Client Tools 2005.090.2047.00

Microsoft Data Access Components (MDAC) 2000.086.1830.00 (srv03_sp1_rtm.050324

1447)

Microsoft MSXML 2.6 3.0 6.0

Microsoft Internet Explorer 7.0.5730.11

Microsoft .NET Framework 2.0.50727.42

Operating System 5.2.3790

__

So I've actually tried two methods. The first is without using sp_MSforeachdb

__


-- Declare variables

Declare @.dbname sysname,

@.cmd varchar(4096)

-- Select DB Names

Select @.dbname = min(name) from master.dbo.sysdatabases

-- Loop through each database.

WHILE @.dbname is not null -- <-- (NEED TO NOT INCLUDE SYSTEM DB'S HERE)

Begin

Select @.cmd = 'use ' + @.dbname +

'
-- Delete data from table1 and related tables older than 2 Months

DELETE from table1 WHERE DATEDIFF(month, datecreated , GETDATE()) > 2

DELETE from table1a WHERE messageid NOT IN (SELECT messageid from table1)

DELETE from table1b WHERE messageid NOT IN (SELECT messageid from table1)

DELETE from table1c WHERE messageid NOT IN (SELECT messageid from table1)


-- Delete Selective Data from table2 older than 6 Months

DELETE from table2 WHERE DATEDIFF(month, AuditDate, GETDATE()) > 6 and tablename in

('TableX','TableY','TableZ')
DELETE from table2a WHERE auditid NOT IN (SELECT auditid from table2)

--

-- Delete Data From table3 older than 2 Years

DELETE from table3 WHERE DATEDIFF(Year, ReferralDate, GETDATE()) > 2

-- Shrink all Non System DB's

DBCC SHRINKDATABASE(' + @.dbname + ', 10, TRUNCATEONLY)

'

End -- (NOT SURE IF THIS IS IN THE RIGHT PLACE)

-- Execute the command

Exec (@.cmd)

__

The second attempted method was trying to use sp_MSforeachdb. I modified the following to successfully loop a simple print command to ensure that the looping occurs:

__

declare @.cmd1 varchar(4096)

set @.cmd1 =
'if ''?'' <> ''tempdb'' print ''*** Processing DB ? ***'''

exec sp_MSforeachdb @.command1=@.cmd1

-- THIS WORKS

__

However after many attempts, I haven't been able to get the syntax right to run my

statements abonve using this method. Seems very unforgiving with spaces and apostrophes.

Any advice is much appreciated. Thank you in advance.

Rick B

Hi Rick,

Try something like this:

--THIS CREATES ONE TEMP TABLE WITH ALL NON SYSTEM DATABASES

SELECT IDENTITY(INT, 1,1) AS ID, DBNAME

INTO TEMP_CURSOR

FROM from master.dbo.sysdatabases

where SID<>0x01;

DECLARE @.ID INT, @.DBNAME VARCHAR(250)

SELECT @.ID = MIN(ID)

FROM TEMP_CURSOR

WHERE ID > 0;

WHILE @.ID IS NOT NULL

BEGIN

SELECT @.DBNAME=DBNAME

FROM TEMP_CURSOR

WHERE ID = @.ID;

EXEC(' USE ' + @.DBNAME + '

-- Delete data from table1 and related tables older than 2 Months

DELETE from table1 WHERE DATEDIFF(month, datecreated , GETDATE()) > 2;

DELETE from table1a WHERE messageid NOT IN (SELECT messageid from table1);

DELETE from table1b WHERE messageid NOT IN (SELECT messageid from table1);

DELETE from table1c WHERE messageid NOT IN (SELECT messageid from table1);


-- Delete Selective Data from table2 older than 6 Months

DELETE from table2 WHERE DATEDIFF(month, AuditDate, GETDATE()) > 6 and tablename in ('TableX','TableY','TableZ')
DELETE from table2a WHERE auditid NOT IN (SELECT auditid from table2)

--

-- Delete Data From table3 older than 2 Years

DELETE from table3 WHERE DATEDIFF(Year, ReferralDate, GETDATE()) > 2

-- Shrink all Non System DB's

DBCC SHRINKDATABASE(' + @.dbname + ', 10, TRUNCATEONLY)

')

SELECT @.ID = MIN(ID)

FROM TEMP_CURSOR

WHERE ID > @.ID;

END

DROP TABLE TEMP_CURSOR;

I thinks this can do your trick Smile

Regards,

|||

One of the ways I use to test the syntax of dynamic sql is to print the SQL rather than run it. Then you can see the outputted SQL and see if its correct and if not, where you have gone wrong

hope this helps

|||

Hey Luis

Upon execution against Master, I'm receiving the following error:

Msg 207, Level 16, State 1, Line 1

Invalid column name 'DBNAME'.

After a few tweaks, the following is the current syntax that I am using based off of Luis's feedback. Can anyone ID additional syntax errors? Thanks in advance. Rick B.

__

SELECT IDENTITY(INT, 1,1) AS ID, DBNAME

INTO TEMP_CURSOR

FROM master.dbo.sysdatabases

where SID<>0x01;

DECLARE @.ID INT, @.DBNAME VARCHAR(250)

SELECT @.ID = MIN(ID)

FROM TEMP_CURSOR

WHERE ID > 0;

WHILE @.ID IS NOT NULL

BEGIN

SELECT @.DBNAME=DBNAME

FROM TEMP_CURSOR

WHERE ID = @.ID;

EXEC(' USE ' + @.DBNAME + '

-- Delete data from table1 and related tables older than 2 Months

DELETE from table1 WHERE DATEDIFF(month, datecreated , GETDATE()) > 2;

DELETE from table1a WHERE messageid NOT IN (SELECT messageid from table1);

DELETE from table1b WHERE messageid NOT IN (SELECT messageid from table1);

DELETE from table1c WHERE messageid NOT IN (SELECT messageid from table1);

-- Delete Selective Data from table2 older than 6 Months

DELETE from table2 WHERE DATEDIFF(month, AuditDate, GETDATE()) > 6 and tablename in (TableX,TableY,TableZ)
DELETE from table2a WHERE auditid NOT IN (SELECT auditid from table2)

--

-- Delete Data From table3 older than 2 Years

DELETE from table3 WHERE DATEDIFF(Year, ReferralDate, GETDATE()) > 2

-- Shrink all Non System DBs

DBCC SHRINKDATABASE(' + @.dbname + ', 10, TRUNCATEONLY)

')

SELECT @.ID = MIN(ID)

FROM TEMP_CURSOR

WHERE ID > @.ID;

END

DROP TABLE TEMP_CURSOR;

__

|||

Replace this statement:

SELECT IDENTITY(INT, 1,1) AS ID, DBNAME

INTO TEMP_CURSOR

FROM master.dbo.sysdatabases

where SID<>0x01;

with this one

SELECT IDENTITY(INT, 1,1) AS ID, NAME AS DBNAME

INTO TEMP_CURSOR

FROM master.dbo.sysdatabases

where SID<>0x01;

Hope it works Smile

Need a way to use Windows NT intgrated security between two servers

Reporting Services is on its own Win2k3 server , running a report that
does a query against our Production database using Windows NT
Integrated Security.
The query never returns any data, yet when I run the query in Query
Analyzer it works fine...I have another report that uses "Credentials
stored securely in the report server" and that Query woks fine in RS
and in Query Analyzer...Has anybody found a way to use Windows NT
intgrated security between two servers accessed by IIS.RS is on one
server and the database is another..I don't have a direct answer for you but I have a suggestion. I think that
using the credentials of the calling user to hit the database is a bad idea.
The reason is that you will lose all the benefits of connection pooling. I
suggest having a readonly account that is used for the credentials of the
report. Then you use the role based security (with integrated security) to
only allow access to the reports the user should have. If you have sensitive
data that the user should only be able to see certain data then use the
global variable user!userid either as a query parameter or as a filter
parameter. The end result will be the same but your performance under load
will be much much better.
Bruce L-C
"Tom" <tom_barnard@.aotx.uscourts.gov> wrote in message
news:1096405401.694519.113440@.k17g2000odb.googlegroups.com...
> Reporting Services is on its own Win2k3 server , running a report that
> does a query against our Production database using Windows NT
> Integrated Security.
> The query never returns any data, yet when I run the query in Query
> Analyzer it works fine...I have another report that uses "Credentials
> stored securely in the report server" and that Query woks fine in RS
> and in Query Analyzer...Has anybody found a way to use Windows NT
> intgrated security between two servers accessed by IIS.RS is on one
> server and the database is another..
>

Saturday, February 25, 2012

Necessary Help-->Database Mirroring

Hi Everyone,
I want to start database mirroring in SQL server 2005 -Microsoft SQL
server management studio Express-,I use windows XP P2.
I try to use database mirroring but it doesn't work.What should I
do?Which Operating System, and SQL server should I use?
Thanks,
Nassa
data base mirroring is not supported on SQL Server Express.
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Nassa" <nassim.czdashti@.gmail.com> wrote in message
news:1169268992.469697.24710@.s34g2000cwa.googlegro ups.com...
> Hi Everyone,
> I want to start database mirroring in SQL server 2005 -Microsoft SQL
> server management studio Express-,I use windows XP P2.
> I try to use database mirroring but it doesn't work.What should I
> do?Which Operating System, and SQL server should I use?
> Thanks,
> Nassa
>
|||Hilary Cotter
thanks,
I use SQL server 2005-Standard.
Nassa
Hilary Cotter wrote:[vbcol=seagreen]
> data base mirroring is not supported on SQL Server Express.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Nassa" <nassim.czdashti@.gmail.com> wrote in message
> news:1169268992.469697.24710@.s34g2000cwa.googlegro ups.com...
|||Hilary Cotter
thanks,
I use SQL server 2005-Standard.
Nassa
Hilary Cotter wrote:[vbcol=seagreen]
> data base mirroring is not supported on SQL Server Express.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Nassa" <nassim.czdashti@.gmail.com> wrote in message
> news:1169268992.469697.24710@.s34g2000cwa.googlegro ups.com...
|||Hilary Cotter
thanks,
I use SQL server 2005-Standard.
Nassa
Hilary Cotter wrote:[vbcol=seagreen]
> data base mirroring is not supported on SQL Server Express.
> --
> Hilary Cotter
> Looking for a SQL Server replication book?
> http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTS
> http://www.indexserverfaq.com
>
> "Nassa" <nassim.czdashti@.gmail.com> wrote in message
> news:1169268992.469697.24710@.s34g2000cwa.googlegro ups.com...
|||Ok can you try this then:
--On your principal
CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5022)
FOR DATABASE_MIRRORING (ROLE = PARTNER);
--on your mirror
CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5022)
FOR DATABASE_MIRRORING (ROLE = PARTNER, ENCRYPTION);
--on your witness
CREATE ENDPOINT [Mirroring]
AS TCP (LISTENER_PORT = 5022)
FOR DATABASE_MIRRORING (ROLE = WITNESS);
--Start endpoints
ALTER ENDPOINT [Mirroring] STATE = STARTED;
--now backup your database on the principal copy it to your mirror and
restore it there with norecovery
--Connect to your mirror
-- Specify the partner from the mirror server - note this can be an ip
address rather than the fqdn
ALTER DATABASE [AdventureWorks] SET PARTNER
='TCP://Mirror.corp.mycompany.com:5022';
--Connect to your principle
-- Specify the witness from the principal server
ALTER DATABASE [AdventureWorks] SET WITNESS =
'TCP://Wittness.corp.mycompany.com:5022';
That's it
Hilary Cotter
Looking for a SQL Server replication book?
http://www.nwsu.com/0974973602.html
Looking for a FAQ on Indexing Services/SQL FTS
http://www.indexserverfaq.com
"Nassa" <nassim.czdashti@.gmail.com> wrote in message
news:1169355344.015758.44280@.m58g2000cwm.googlegro ups.com...
> Hilary Cotter
> thanks,
> I use SQL server 2005-Standard.
> Nassa
> Hilary Cotter wrote:
>
|||Thanks Hilary Cotter,
if I dont have witness how I should specify the principle?
Thanks,
Nassa
On Jan 23, 4:23 pm, "Hilary Cotter" <hilary.cot...@.gmail.com> wrote:
> Ok can you try this then:
> --On your principal
> CREATE ENDPOINT [Mirroring]
> AS TCP (LISTENER_PORT = 5022)
> FOR DATABASE_MIRRORING (ROLE = PARTNER);
> --on your mirror
> CREATE ENDPOINT [Mirroring]
> AS TCP (LISTENER_PORT = 5022)
> FOR DATABASE_MIRRORING (ROLE = PARTNER, ENCRYPTION);
> --on your witness
> CREATE ENDPOINT [Mirroring]
> AS TCP (LISTENER_PORT = 5022)
> FOR DATABASE_MIRRORING (ROLE = WITNESS);
> --Start endpoints
> ALTER ENDPOINT [Mirroring] STATE = STARTED;
> --now backup your database on the principal copy it to your mirror and
> restore it there with norecovery
> --Connect to your mirror
> -- Specify the partner from the mirror server - note this can be an ip
> address rather than the fqdn
> ALTER DATABASE [AdventureWorks] SET PARTNER
> ='TCP://Mirror.corp.mycompany.com:5022';
> --Connect to your principle
> -- Specify the witness from the principal server
> ALTER DATABASE [AdventureWorks] SET WITNESS =
> 'TCP://Wittness.corp.mycompany.com:5022';
> That's it
> --
> Hilary Cotter
> Looking for a SQL Server replication book?http://www.nwsu.com/0974973602.html
> Looking for a FAQ on Indexing Services/SQL FTShttp://www.indexserverfaq.com
> "Nassa" <nassim.czdas...@.gmail.com> wrote in message
> news:1169355344.015758.44280@.m58g2000cwm.googlegro ups.com...
>
>
>
>
>
Thanks Hilary

>
> - Show quoted text -
|||Hi Hilary Cotter,
It gives me some error messages.
1- after I backup the database in the primary server,then I copy it to
the mirror server and when I try to restore it in the mirror server,it
gives me an error.
2-after I write the code
ALTER DATABASE [AdventureWorks] SET PARTNER
='TCP://Mirror.corp.mycompany.com:5022';
again gives me an error which said : database mirroring transport is
disable in the endpoint configuration.
please inform me as soon as possible.
Thanks,
Nassa
On Feb 14, 9:05 am, "Nassa" <nassim.czdas...@.gmail.com> wrote:[vbcol=seagreen]
> Thanks Hilary Cotter,
> if I dont have witness how I should specify the principle?
> Thanks,
> Nassa
> On Jan 23, 4:23 pm, "Hilary Cotter" <hilary.cot...@.gmail.com> wrote:
>
>
|> > ALTER DATABASE [AdventureWorks] SET PARTNER
>
>
>
>
>
>
>
> Thanks Hilary
>
>
>
> - Show quoted text -- Hide quoted text -
> - Show quoted text -