Showing posts with label procedures. Show all posts
Showing posts with label procedures. Show all posts

Wednesday, March 28, 2012

Mirror Status

Are there Stored Procedures or tables that will tell me which of the mirrore
d
servers is active ?Is this a database mirroring question? Mirroring is at the database level.
Try
select * from sys.database_mirroring
and look for mirroring_role and mirroring_role_desc. They should say
PRINCIPAL or MIRROR.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"PJU" wrote:

> Are there Stored Procedures or tables that will tell me which of the mirro
red
> servers is active ?
>

Mirror Status

Are there Stored Procedures or tables that will tell me which of the mirrored
servers is active ?Is this a database mirroring question? Mirroring is at the database level.
Try
select * from sys.database_mirroring
and look for mirroring_role and mirroring_role_desc. They should say
PRINCIPAL or MIRROR.
Hope this helps,
Ben Nevarez, MCDBA, OCP
Database Administrator
"PJU" wrote:
> Are there Stored Procedures or tables that will tell me which of the mirrored
> servers is active ?
>

Monday, March 12, 2012

milliseconds in query analyzer

I'm attempting to optomize my stored procedures by attempting different join
orders and indexes. I'd like to know if there is a way to see milliseconds i
n
the query analyezr? (or elsewhere)
thanks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kesTry using the profiler to run a trace, and it will give you milleseconds.
Archer
"WebBuilder451" wrote:

> I'm attempting to optomize my stored procedures by attempting different jo
in
> orders and indexes. I'd like to know if there is a way to see milliseconds
in
> the query analyezr? (or elsewhere)
> thanks
> kes
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes|||I see milliseconds just fine:
SELECT GETDATE()
-- code here
WAITFOR DELAY '00:00:01.6'
SELECT GETDATE()
Maybe you could be more specific?
"WebBuilder451" <WebBuilder451@.discussions.microsoft.com> wrote in message
news:C062B7BA-C54E-480C-9B2B-C2FA80F4CBD0@.microsoft.com...
> I'm attempting to optomize my stored procedures by attempting different
> join
> orders and indexes. I'd like to know if there is a way to see milliseconds
> in
> the query analyezr? (or elsewhere)
> thanks
> kes
> --
> thanks (as always)
> some day i''m gona pay this forum back for all the help i''m getting
> kes|||where are you seeing the miliseconds? I see only seconds at the bottom. I'll
try to be more specific. Using the tool that ships with mssqlserver called
"SQL Query Analyzer" I create a query and run it. This produces out put and
this process takes a messureable amount of time. This time currently only
displays in seconds. I would like to know if it's possible to see this
displayed in milliseconds? I can create an artifical timer that will produce
a time difference, however, i would perfer not to introduce unnecessary
elements in queries to be analyized.
thnaks
kes
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Aaron Bertrand [SQL Server MVP]" wrote:

> I see milliseconds just fine:
> SELECT GETDATE()
> -- code here
> WAITFOR DELAY '00:00:01.6'
> SELECT GETDATE()
> Maybe you could be more specific?
>
> "WebBuilder451" <WebBuilder451@.discussions.microsoft.com> wrote in message
> news:C062B7BA-C54E-480C-9B2B-C2FA80F4CBD0@.microsoft.com...
>
>|||> where are you seeing the miliseconds? I see only seconds at the bottom.
> I'll
> try to be more specific. Using the tool that ships with mssqlserver called
> "SQL Query Analyzer" I create a query and run it. This produces out put
> and
> this process takes a messureable amount of time. This time currently only
> displays in seconds.
Yes, I know what Query Analyzer is. Is there a way you can take a screen
shot, post it somewhere, and send the URL?|||On Mon, 12 Sep 2005 10:40:05 -0700, "WebBuilder451"
<WebBuilder451@.discussions.microsoft.com> wrote:
>I'm attempting to optomize my stored procedures by attempting different joi
n
>orders and indexes. I'd like to know if there is a way to see milliseconds
in
>the query analyezr? (or elsewhere)
Run it ten times?
J.|||thanks,
that's an answer.
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"bagman3rd" wrote:
> Try using the profiler to run a trace, and it will give you milleseconds.
> Archer
> "WebBuilder451" wrote:
>|||I guess then the answer is "No there is no setting in the program that
changes the display"
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"jxstern" wrote:

> On Mon, 12 Sep 2005 10:40:05 -0700, "WebBuilder451"
> <WebBuilder451@.discussions.microsoft.com> wrote:
> Run it ten times?
> J.
>|||I guess then the answer is "No there is no setting in the program that
changes the display"
--
thanks (as always)
some day i''m gona pay this forum back for all the help i''m getting
kes
"Aaron Bertrand [SQL Server MVP]" wrote:

> Yes, I know what Query Analyzer is. Is there a way you can take a screen
> shot, post it somewhere, and send the URL?
>
>|||>I guess then the answer is "No there is no setting in the program that
> changes the display"
No, but if I can understand how exactly you're USING Query Analyzer in such
a way that SELECT GETDATE() does not yield milliseconds, I might be able to
answer more constructively.

Friday, March 9, 2012

Migration to ms-sql

Hi,
Does any one aware of any tool for sybase to ms-sql migration, which will migrate store procedures/triggers from sybase to ms-sql server 2000.
Thanks
Vaishalinever done it, some googling came out with many results
sqlporter (http://www.realsoftstudio.com/overview.php) sounds impressive though. :cool:|||Hi Vaishali,

I came across the Migration tool that which doing fine in database migration. Which u needs fulfill the requirement. Yes. Plz. visit the www.swissql.com.

Regards
Saravanan.R|||Thanks Saravanan & Harshal!
Saravanan,
Does it migrate all the objects without any problem. I have visited this site. Is there a trial version available for this. I could not get any.

Migration of SQL Server 2000 db to Oracle 9i

Hi,
Can anyone let me know of a tool which shall migrate the entire SQL Server
2000 database to Oracle 9i along with all the stored procedures . Someone in
the net has posted that a tool comes with the Oracle 9i software .
Any help would be appreciated .
Thanks ,
Sujay
Sujay Ghosh
Bangalore, INDIA
Email : sujayg_mfc@.yahoo.com
Mobile : 9845467789
Such migrations are difficult, since the two systems don't port well to
each. Why are you migrating to Oracle? SQL Server performs just as well,
is easier to use and costs less.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
"Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
news:8FBE768D-AE03-429A-98F0-951A28614C3E@.microsoft.com...
Hi,
Can anyone let me know of a tool which shall migrate the entire SQL Server
2000 database to Oracle 9i along with all the stored procedures . Someone
in
the net has posted that a tool comes with the Oracle 9i software .
Any help would be appreciated .
Thanks ,
Sujay
Sujay Ghosh
Bangalore, INDIA
Email : sujayg_mfc@.yahoo.com
Mobile : 9845467789
|||Hi Tom ,
I am working on a product which shall support both SQL Server 2000 and
Oracle 9i. Now the product is working fine with SQL Server 2000 , but when I
am working on the same product with the back end as Oracle 9i to test the
app, I need to do the migration , because there are some changes in Oracle
stored procedures which are not similar to that of SQL Server 2000 .
Please let me know how can it be solved .
Thanks ,
Sujay
"Tom Moreau" wrote:

> Such migrations are difficult, since the two systems don't port well to
> each. Why are you migrating to Oracle? SQL Server performs just as well,
> is easier to use and costs less.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> ..
> "Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
> news:8FBE768D-AE03-429A-98F0-951A28614C3E@.microsoft.com...
> Hi,
> Can anyone let me know of a tool which shall migrate the entire SQL Server
> 2000 database to Oracle 9i along with all the stored procedures . Someone
> in
> the net has posted that a tool comes with the Oracle 9i software .
> Any help would be appreciated .
> Thanks ,
> Sujay
> --
> Sujay Ghosh
> Bangalore, INDIA
> Email : sujayg_mfc@.yahoo.com
> Mobile : 9845467789
>
|||Well, it won't be easy. Oracle's dialect of SQL is not the same as SQL
Server's. For example, where you would use DECODE in Oracle, you'd use CASE
in SQL Server. FWIW, MS is coming out with a migration tool to go from
Oracle to SQL Server but not the other way.
Good luck.
Tom
Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
SQL Server MVP
Columnist, SQL Server Professional
Toronto, ON Canada
www.pinnaclepublishing.com
..
"Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
news:87EED46A-8510-4F71-A7C9-8107B7390532@.microsoft.com...
Hi Tom ,
I am working on a product which shall support both SQL Server 2000 and
Oracle 9i. Now the product is working fine with SQL Server 2000 , but when I
am working on the same product with the back end as Oracle 9i to test the
app, I need to do the migration , because there are some changes in Oracle
stored procedures which are not similar to that of SQL Server 2000 .
Please let me know how can it be solved .
Thanks ,
Sujay
"Tom Moreau" wrote:

> Such migrations are difficult, since the two systems don't port well to
> each. Why are you migrating to Oracle? SQL Server performs just as well,
> is easier to use and costs less.
> --
> Tom
> ----
> Thomas A. Moreau, BSc, PhD, MCSE, MCDBA
> SQL Server MVP
> Columnist, SQL Server Professional
> Toronto, ON Canada
> www.pinnaclepublishing.com
> ..
> "Sujay Ghosh" <sujayg_mfc@.yahoo.com> wrote in message
> news:8FBE768D-AE03-429A-98F0-951A28614C3E@.microsoft.com...
> Hi,
> Can anyone let me know of a tool which shall migrate the entire SQL
> Server
> 2000 database to Oracle 9i along with all the stored procedures . Someone
> in
> the net has posted that a tool comes with the Oracle 9i software .
> Any help would be appreciated .
> Thanks ,
> Sujay
> --
> Sujay Ghosh
> Bangalore, INDIA
> Email : sujayg_mfc@.yahoo.com
> Mobile : 9845467789
>
|||The tool that was mentioned could have been Oracle Migration
Workbench. It doesn't always work too well and the code that
is generated is a bit of a mess.
But you can find info and a download link at:
http://www.oracle.com/technology/tec...nch/index.html
-Sue
On Sun, 13 Mar 2005 01:35:03 -0800, "Sujay Ghosh"
<sujayg_mfc@.yahoo.com> wrote:
[vbcol=seagreen]
>Hi Tom ,
> I am working on a product which shall support both SQL Server 2000 and
>Oracle 9i. Now the product is working fine with SQL Server 2000 , but when I
>am working on the same product with the back end as Oracle 9i to test the
>app, I need to do the migration , because there are some changes in Oracle
>stored procedures which are not similar to that of SQL Server 2000 .
> Please let me know how can it be solved .
> Thanks ,
>Sujay
>
>"Tom Moreau" wrote:

Wednesday, March 7, 2012

Migration from SQL 2003 to 2005

I have an SQL database that uses standard tables and stored procedures
- no triggers and functions. I have a Microsoft Excel based front-end
which uses ADO to access the DB to (1) run stored procedures (some SPs
return recordsets and some do not), (2) insert data into tables (3)
edit table data using simple linked grid based forms.
This DB was initially created in SQL 2000 and then installed on a SQL
2003 server - absolutely no issues. Now, I have to upgrade to SQL
2005. I am not concerned about DB Admin issues but only my procedures
should not stop working or ADO calls not working (note that I am NOT
using the .NET platform).
It is probably difficult to give any sure answer with this limited
information but I am mainly looking for standard issues that most SQL
2003 databases will face on upgrading to 2005.
Thanks,
Jay
P.S. I am concerned about things like...SQL 2005 has changed the
syntax for cursors; it does not support regular ADO and you must use
ADO.NET; data type Decimal is not available any more and you must use
Numeric; Basically, things like these that will require me to change
my table structures or procedures.Jay
Download Upgrade Advisor tool from MS site and run it against SS2000
database, see report file.
"Jay" <jay6447@.hotmail.com> wrote in message
news:35224406-0ab6-45a3-a92f-410aed08a23f@.s13g2000prd.googlegroups.com...
> I have an SQL database that uses standard tables and stored procedures
> - no triggers and functions. I have a Microsoft Excel based front-end
> which uses ADO to access the DB to (1) run stored procedures (some SPs
> return recordsets and some do not), (2) insert data into tables (3)
> edit table data using simple linked grid based forms.
> This DB was initially created in SQL 2000 and then installed on a SQL
> 2003 server - absolutely no issues. Now, I have to upgrade to SQL
> 2005. I am not concerned about DB Admin issues but only my procedures
> should not stop working or ADO calls not working (note that I am NOT
> using the .NET platform).
> It is probably difficult to give any sure answer with this limited
> information but I am mainly looking for standard issues that most SQL
> 2003 databases will face on upgrading to 2005.
> Thanks,
> Jay
>
> P.S. I am concerned about things like...SQL 2005 has changed the
> syntax for cursors; it does not support regular ADO and you must use
> ADO.NET; data type Decimal is not available any more and you must use
> Numeric; Basically, things like these that will require me to change
> my table structures or procedures.
>
>|||"Jay" <jay6447@.hotmail.com> wrote in message
news:35224406-0ab6-45a3-a92f-410aed08a23f@.s13g2000prd.googlegroups.com...
> I have an SQL database that uses standard tables and stored procedures
> - no triggers and functions. I have a Microsoft Excel based front-end
> which uses ADO to access the DB to (1) run stored procedures (some SPs
> return recordsets and some do not), (2) insert data into tables (3)
> edit table data using simple linked grid based forms.
> This DB was initially created in SQL 2000 and then installed on a SQL
> 2003 server - absolutely no issues. Now, I have to upgrade to SQL
> 2005. I am not concerned about DB Admin issues but only my procedures
> should not stop working or ADO calls not working (note that I am NOT
> using the .NET platform).
> It is probably difficult to give any sure answer with this limited
> information but I am mainly looking for standard issues that most SQL
> 2003 databases will face on upgrading to 2005.
> Thanks,
> Jay
>
> P.S. I am concerned about things like...SQL 2005 has changed the
> syntax for cursors; it does not support regular ADO and you must use
> ADO.NET; data type Decimal is not available any more and you must use
> Numeric; Basically, things like these that will require me to change
> my table structures or procedures.
>
Hi Jay
There was not a version SQL 2003, so I assume this is Windows 2003 and the
SQL Server did not change?
To help you prepare the upgrade to SQL 2005 look at the upgrade advisor to
see what you may need to change when upgrading the database
http://www.microsoft.com/downloads/details.aspx?FamilyID=1470e86b-7e0...
and the upgrade handbook is worth checking out for the additional steps you
will need to do such as rebuilding indexes, statistics and updating usage
http://www.microsoft.com/technet/prodtechnol/sql/2005/sqlupgrd.mspx.
John

Saturday, February 25, 2012

Migration from 7 to 2000

Hello,
How compatible is database Backup from MSSQL 7 to 2000?
Database has a lot of Procedures. Can there be syntax Problems?
Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)
Regards,
Arto
Arto Ylikotila arto.ylikotila@.santamargarita.fiThere is always a possibility, but it is unlikely that you need to do any si
gnificant code changes, if at all.
One thing is datatype comparisons in WHERE clause, where SQL Server converte
d the constant side to the column
side. Today, SQL Server does the conversions according to the documented "da
tatype precedence" in Books
Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Arto Ylikotila" <arto.ylikotila@.santamargarita.fi> wrote in message
news:%23GX1XB0NEHA.3380@.TK2MSFTNGP11.phx.gbl...
> Hello,
> How compatible is database Backup from MSSQL 7 to 2000?
> Database has a lot of Procedures. Can there be syntax Problems?
> Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)
> Regards,
> Arto
> --
> Arto Ylikotila arto.ylikotila@.santamargarita.fi
>|||Another issue I know is replacement of all SUSER_NAME calls with
SUSER_SNAME; if you use direct queries to syslogins and sysusers system
tables then you should replace joins made by id with joins made by sid (but
better use system procedures instead)
Database backup from MSSQL7 fully compatible with 2000... moreover you may
attach DB from MSSQL7 directly to MSSQL2000, and all the needed internal
changes will be made by MSSQL2000 itself. Note that you won't be able to
attach DB back onto MSSQL7 after using it as 2000's DB. Same thing with
2000's backups - they can't be restored with MSSQL7 engine
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u5QWmD0NEHA.680@.TK2MSFTNGP11.phx.gbl...
> There is always a possibility, but it is unlikely that you need to do any
significant code changes, if at all.
> One thing is datatype comparisons in WHERE clause, where SQL Server
converted the constant side to the column
> side. Today, SQL Server does the conversions according to the documented
"datatype precedence" in Books[vbcol=seagreen]
> Online.
> "Arto Ylikotila" <arto.ylikotila@.santamargarita.fi> wrote in message
> news:%23GX1XB0NEHA.3380@.TK2MSFTNGP11.phx.gbl...|||Hi,
SQL 7.0 Backups are fully compatible with SQL 2000.
For SQL 2000 (I assume that SP3a and post fixes are applied ) MS recommends
MDAC versions > 2.6x.
We had several problems with clients that has mdac versions < 2.6x (speciall
y sql servers with multiple instances and also have some localization probl
ems).
Regards..

Migration from 7 to 2000

Hello,
How compatible is database Backup from MSSQL 7 to 2000?
Database has a lot of Procedures. Can there be syntax Problems?
Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)
Regards,
Arto
Arto Ylikotila arto.ylikotila@.santamargarita.fi
There is always a possibility, but it is unlikely that you need to do any significant code changes, if at all.
One thing is datatype comparisons in WHERE clause, where SQL Server converted the constant side to the column
side. Today, SQL Server does the conversions according to the documented "datatype precedence" in Books
Online.
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Arto Ylikotila" <arto.ylikotila@.santamargarita.fi> wrote in message
news:%23GX1XB0NEHA.3380@.TK2MSFTNGP11.phx.gbl...
> Hello,
> How compatible is database Backup from MSSQL 7 to 2000?
> Database has a lot of Procedures. Can there be syntax Problems?
> Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)
> Regards,
> Arto
> --
> Arto Ylikotila arto.ylikotila@.santamargarita.fi
>
|||Another issue I know is replacement of all SUSER_NAME calls with
SUSER_SNAME; if you use direct queries to syslogins and sysusers system
tables then you should replace joins made by id with joins made by sid (but
better use system procedures instead)
Database backup from MSSQL7 fully compatible with 2000... moreover you may
attach DB from MSSQL7 directly to MSSQL2000, and all the needed internal
changes will be made by MSSQL2000 itself. Note that you won't be able to
attach DB back onto MSSQL7 after using it as 2000's DB. Same thing with
2000's backups - they can't be restored with MSSQL7 engine
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u5QWmD0NEHA.680@.TK2MSFTNGP11.phx.gbl...
> There is always a possibility, but it is unlikely that you need to do any
significant code changes, if at all.
> One thing is datatype comparisons in WHERE clause, where SQL Server
converted the constant side to the column
> side. Today, SQL Server does the conversions according to the documented
"datatype precedence" in Books[vbcol=seagreen]
> Online.
> "Arto Ylikotila" <arto.ylikotila@.santamargarita.fi> wrote in message
> news:%23GX1XB0NEHA.3380@.TK2MSFTNGP11.phx.gbl...
|||Hi,
SQL 7.0 Backups are fully compatible with SQL 2000.
For SQL 2000 (I assume that SP3a and post fixes are applied ) MS recommends MDAC versions > 2.6x.
We had several problems with clients that has mdac versions < 2.6x (specially sql servers with multiple instances and also have some localization problems).
Regards..

Migration from 7 to 2000

Hello,
How compatible is database Backup from MSSQL 7 to 2000?
Database has a lot of Procedures. Can there be syntax Problems?
Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)
Regards,
Arto
--
Arto Ylikotila arto.ylikotila@.santamargarita.fiThere is always a possibility, but it is unlikely that you need to do any significant code changes, if at all.
One thing is datatype comparisons in WHERE clause, where SQL Server converted the constant side to the column
side. Today, SQL Server does the conversions according to the documented "datatype precedence" in Books
Online.
--
Tibor Karaszi, SQL Server MVP
http://www.karaszi.com/sqlserver/default.asp
"Arto Ylikotila" <arto.ylikotila@.santamargarita.fi> wrote in message
news:%23GX1XB0NEHA.3380@.TK2MSFTNGP11.phx.gbl...
> Hello,
> How compatible is database Backup from MSSQL 7 to 2000?
> Database has a lot of Procedures. Can there be syntax Problems?
> Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)
> Regards,
> Arto
> --
> Arto Ylikotila arto.ylikotila@.santamargarita.fi
>|||Another issue I know is replacement of all SUSER_NAME calls with
SUSER_SNAME; if you use direct queries to syslogins and sysusers system
tables then you should replace joins made by id with joins made by sid (but
better use system procedures instead)
Database backup from MSSQL7 fully compatible with 2000... moreover you may
attach DB from MSSQL7 directly to MSSQL2000, and all the needed internal
changes will be made by MSSQL2000 itself. Note that you won't be able to
attach DB back onto MSSQL7 after using it as 2000's DB. Same thing with
2000's backups - they can't be restored with MSSQL7 engine
"Tibor Karaszi" <tibor_please.no.email_karaszi@.hotmail.nomail.com> wrote in
message news:u5QWmD0NEHA.680@.TK2MSFTNGP11.phx.gbl...
> There is always a possibility, but it is unlikely that you need to do any
significant code changes, if at all.
> One thing is datatype comparisons in WHERE clause, where SQL Server
converted the constant side to the column
> side. Today, SQL Server does the conversions according to the documented
"datatype precedence" in Books
> Online.
> "Arto Ylikotila" <arto.ylikotila@.santamargarita.fi> wrote in message
> news:%23GX1XB0NEHA.3380@.TK2MSFTNGP11.phx.gbl...
> > Hello,
> >
> > How compatible is database Backup from MSSQL 7 to 2000?
> > Database has a lot of Procedures. Can there be syntax Problems?
> >
> > Should I change ODBC 3.70 to ODBC 2000 (Sql server versions)|||Hi
SQL 7.0 Backups are fully compatible with SQL 2000
For SQL 2000 (I assume that SP3a and post fixes are applied ) MS recommends MDAC versions > 2.6x
We had several problems with clients that has mdac versions < 2.6x (specially sql servers with multiple instances and also have some localization problems)
Regards.

Monday, February 20, 2012

Migrating to SQL Server 2005;

Hi all,

I have a Database in SQL Server 2000 with several objects (tables, views , stored procedures , functions ).

Is there any specific procedure or tool by which I could migrate the entire database to SQL Server 2005.

Any help would be appreciated.

Thanks,

Hari Haran ArulmozhiAs far as I have seen, backup/restore works as an upgrade path.