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

Tuesday, March 27, 2012

Advice needed: DW and ETL tools

Hi!
I'm involved in building a medium sized ware house with MS SQLServer 2000=20
as the backend. I've been searching for some good tools for SQLServer to=20
help me with the demanding tasks of planning and building the database and =
(preferrably the same tool) making the mappings and data transformations=20
when populating the database, but still I've not come across any that has=20
satisfied my needs. Oracle has a great tool for this called Oracle=20
Warehouse Builder, but haven't seen anything like it for MS databases.=20
Therefore I'm asking: Does anyone know about a tool that can be used in=20
planning, deploying and maintaining a data warehouse built on a MS=20
SQLServer 2000? Doesn't matter if it has a price tag on it or not
S=F6ren Hakola
FinlandI think that anyone that uses SQL Server to deploy a Data Warehouse... uses
SQL Server 2000 capabilities only. And it's cheeper )
- Diagram: create logic models with direct link to the tables
- Tables: Info repository
- Data Transformation Services (DTS): ETL, data transformation (populate the
tables)
- Jobs: schedule DTS for automatic ETL
- Analysis Services: If you desire to work with a MOLAP tool
Other tools:
Data Stage (Unix and Windows, all databases) - Top tool, expensive
Informatica (Unix and Windows, all databases) - Top tool, expensive|||Thanks for the response. I'll check those out!
Greetings
S.sql

Thursday, March 22, 2012

AdventureWorks Install

I am using sqlserver 2005 express edition and have downloaded the
AdventureWorksDB.msi. I have installed it and it created 3 files:
AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
no tables appear under system tables. Is there something I am missing here?
No, it's normal in SQL Server 2005. System tables are hidden and you can't
see or modify them directly.
Regards
Pawel Potasinski
Uytkownik "Richard" <rich_a_wms@.yahoo.com> napisa w wiadomoci
news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>I am using sqlserver 2005 express edition and have downloaded the
> AdventureWorksDB.msi. I have installed it and it created 3 files:
> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
> AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
> no tables appear under system tables. Is there something I am missing
> here?
>
>
|||I have another DB (storeDB) on the server and I am able to see all the
tables under Databases > System Databases > storeDB > Tables > System
Tables, but I am unable to see the System Tables under AdventureWorks. I am
going through the tutorial and it's asking me to create the following query:
SELECT * FROM Production.Product;
GO
and I receive this error message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'Production.Product'.
I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
2005.
Any help would be appreciated.
Regards, Richard
"Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...

> No, it's normal in SQL Server 2005. System tables are hidden and you can't
> see or modify them directly.
> --
> Regards
> Pawel Potasinski
>
> Uytkownik "Richard" <rich_a_wms@.yahoo.com> napisa w wiadomoci
> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>
|||On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
[vbcol=seagreen]
> I have another DB (storeDB) on the server and I am able to see all the
> tables under Databases > System Databases > storeDB > Tables > System
> Tables, but I am unable to see the System Tables under AdventureWorks. I am
> going through the tutorial and it's asking me to create the following query:
> SELECT * FROM Production.Product;
> GO
> and I receive this error message:
> Msg 208, Level 16, State 1, Line 1
> Invalid object name 'Production.Product'.
> I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
> 2005.
> Any help would be appreciated.
> Regards, Richard
> "Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
> news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
Looks like a permissions issue. If you are just testing, make your account
you log in as a Server Role of Sysadmin (God-level rights).
Chuck Lathrope
www.sqlwebpedia.com
|||Thanks, I changed permissions, but I still can't see the tables. The strange
thing is that there are 3 files in the Data folder under the MSSQL folder
for AdventureWorks: AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~
164MB) and AdventureWorks_log.idf (~1MB). The other DB's on the server only
have 2 files (.mdf and .idf) for each database. There are no _Data.mdf
files.
Regards, Richard
"Chuck Lathrope" <computerguy_chuck@.fixmehotmail.com> wrote in message
news:rugaxfto4xox$.1xm17ldm6wy7j$.dlg@.40tude.net.. .
> On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
>
> Looks like a permissions issue. If you are just testing, make your account
> you log in as a Server Role of Sysadmin (God-level rights).
> Chuck Lathrope
> www.sqlwebpedia.com

AdventureWorks Install

I am using sqlserver 2005 express edition and have downloaded the
AdventureWorksDB.msi. I have installed it and it created 3 files:
AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
no tables appear under system tables. Is there something I am missing here?No, it's normal in SQL Server 2005. System tables are hidden and you can't
see or modify them directly.
--
Regards
Pawel Potasinski
U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>I am using sqlserver 2005 express edition and have downloaded the
> AdventureWorksDB.msi. I have installed it and it created 3 files:
> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
> AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
> no tables appear under system tables. Is there something I am missing
> here?
>
>|||I have another DB (storeDB) on the server and I am able to see all the
tables under Databases > System Databases > storeDB > Tables > System
Tables, but I am unable to see the System Tables under AdventureWorks. I am
going through the tutorial and it's asking me to create the following query:
SELECT * FROM Production.Product;
GO
and I receive this error message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'Production.Product'.
I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
2005.
Any help would be appreciated.
Regards, Richard
"Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
> No, it's normal in SQL Server 2005. System tables are hidden and you can't
> see or modify them directly.
> --
> Regards
> Pawel Potasinski
>
> U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>>I am using sqlserver 2005 express edition and have downloaded the
>> AdventureWorksDB.msi. I have installed it and it created 3 files:
>> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
>> AdventureWorks_log.idf (~1MB). When I added the database to the
>> sqlserver,
>> no tables appear under system tables. Is there something I am missing
>> here?
>>
>|||On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
> I have another DB (storeDB) on the server and I am able to see all the
> tables under Databases > System Databases > storeDB > Tables > System
> Tables, but I am unable to see the System Tables under AdventureWorks. I am
> going through the tutorial and it's asking me to create the following query:
> SELECT * FROM Production.Product;
> GO
> and I receive this error message:
> Msg 208, Level 16, State 1, Line 1
> Invalid object name 'Production.Product'.
> I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
> 2005.
> Any help would be appreciated.
> Regards, Richard
> "Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
> news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
>> No, it's normal in SQL Server 2005. System tables are hidden and you can't
>> see or modify them directly.
>> --
>> Regards
>> Pawel Potasinski
>>
>> U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
>> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>>I am using sqlserver 2005 express edition and have downloaded the
>> AdventureWorksDB.msi. I have installed it and it created 3 files:
>> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
>> AdventureWorks_log.idf (~1MB). When I added the database to the
>> sqlserver,
>> no tables appear under system tables. Is there something I am missing
>> here?
>>
>>
Looks like a permissions issue. If you are just testing, make your account
you log in as a Server Role of Sysadmin (God-level rights).
Chuck Lathrope
www.sqlwebpedia.com|||Thanks, I changed permissions, but I still can't see the tables. The strange
thing is that there are 3 files in the Data folder under the MSSQL folder
for AdventureWorks: AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~
164MB) and AdventureWorks_log.idf (~1MB). The other DB's on the server only
have 2 files (.mdf and .idf) for each database. There are no _Data.mdf
files.
Regards, Richard
"Chuck Lathrope" <computerguy_chuck@.fixmehotmail.com> wrote in message
news:rugaxfto4xox$.1xm17ldm6wy7j$.dlg@.40tude.net...
> On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
>> I have another DB (storeDB) on the server and I am able to see all the
>> tables under Databases > System Databases > storeDB > Tables > System
>> Tables, but I am unable to see the System Tables under AdventureWorks. I
>> am
>> going through the tutorial and it's asking me to create the following
>> query:
>> SELECT * FROM Production.Product;
>> GO
>> and I receive this error message:
>> Msg 208, Level 16, State 1, Line 1
>> Invalid object name 'Production.Product'.
>> I have a connection the AdventureWorks DB. I'm obviously new to SQL
>> Server
>> 2005.
>> Any help would be appreciated.
>> Regards, Richard
>> "Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
>> news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
>> No, it's normal in SQL Server 2005. System tables are hidden and you
>> can't
>> see or modify them directly.
>> --
>> Regards
>> Pawel Potasinski
>>
>> U¿ytkownik "Richard" <rich_a_wms@.yahoo.com> napisa³ w wiadomo¶ci
>> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>>I am using sqlserver 2005 express edition and have downloaded the
>> AdventureWorksDB.msi. I have installed it and it created 3 files:
>> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
>> AdventureWorks_log.idf (~1MB). When I added the database to the
>> sqlserver,
>> no tables appear under system tables. Is there something I am missing
>> here?
>>
>>
> Looks like a permissions issue. If you are just testing, make your account
> you log in as a Server Role of Sysadmin (God-level rights).
> Chuck Lathrope
> www.sqlwebpedia.com

AdventureWorks Install

I am using sqlserver 2005 express edition and have downloaded the
AdventureWorksDB.msi. I have installed it and it created 3 files:
AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
no tables appear under system tables. Is there something I am missing here?No, it's normal in SQL Server 2005. System tables are hidden and you can't
see or modify them directly.
Regards
Pawel Potasinski
Uytkownik "Richard" <rich_a_wms@.yahoo.com> napisa w wiadomoci
news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>I am using sqlserver 2005 express edition and have downloaded the
> AdventureWorksDB.msi. I have installed it and it created 3 files:
> AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~ 164MB) and
> AdventureWorks_log.idf (~1MB). When I added the database to the sqlserver,
> no tables appear under system tables. Is there something I am missing
> here?
>
>|||I have another DB (storeDB) on the server and I am able to see all the
tables under Databases > System Databases > storeDB > Tables > System
Tables, but I am unable to see the System Tables under AdventureWorks. I am
going through the tutorial and it's asking me to create the following query:
SELECT * FROM Production.Product;
GO
and I receive this error message:
Msg 208, Level 16, State 1, Line 1
Invalid object name 'Production.Product'.
I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
2005.
Any help would be appreciated.
Regards, Richard
"Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...

> No, it's normal in SQL Server 2005. System tables are hidden and you can't
> see or modify them directly.
> --
> Regards
> Pawel Potasinski
>
> Uytkownik "Richard" <rich_a_wms@.yahoo.com> napisa w wiadomoci
> news:u4xAciayHHA.748@.TK2MSFTNGP04.phx.gbl...
>|||On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
[vbcol=seagreen]
> I have another DB (storeDB) on the server and I am able to see all the
> tables under Databases > System Databases > storeDB > Tables > System
> Tables, but I am unable to see the System Tables under AdventureWorks. I a
m
> going through the tutorial and it's asking me to create the following quer
y:
> SELECT * FROM Production.Product;
> GO
> and I receive this error message:
> Msg 208, Level 16, State 1, Line 1
> Invalid object name 'Production.Product'.
> I have a connection the AdventureWorks DB. I'm obviously new to SQL Server
> 2005.
> Any help would be appreciated.
> Regards, Richard
> "Pawel Potasinski" <pawel.potasinski@.gmail.com> wrote in message
> news:OLCmDdcyHHA.1776@.TK2MSFTNGP03.phx.gbl...
>
Looks like a permissions issue. If you are just testing, make your account
you log in as a Server Role of Sysadmin (God-level rights).
Chuck Lathrope
www.sqlwebpedia.com|||Thanks, I changed permissions, but I still can't see the tables. The strange
thing is that there are 3 files in the Data folder under the MSSQL folder
for AdventureWorks: AdventureWorks.mdf (~ 2MB), AdventureWorks_Data.mdf (~
164MB) and AdventureWorks_log.idf (~1MB). The other DB's on the server only
have 2 files (.mdf and .idf) for each database. There are no _Data.mdf
files.
Regards, Richard
"Chuck Lathrope" <computerguy_chuck@.fixmehotmail.com> wrote in message
news:rugaxfto4xox$.1xm17ldm6wy7j$.dlg@.40tude.net...
> On Thu, 19 Jul 2007 12:53:50 -0700, Richard wrote:
>
> Looks like a permissions issue. If you are just testing, make your account
> you log in as a Server Role of Sysadmin (God-level rights).
> Chuck Lathrope
> www.sqlwebpedia.com

Sunday, March 11, 2012

Advanced Editor for DataReader Source / SQLServer 2005

I want to import data from a remote MySql Database

So, I created an New Connection (ADO.Net), connection Test is successful but when I try to set the sql string in the advanced editor i get the following error:

Error at Data Flow Task [DataReader Source [2182]]: System.Data.Odbc.OdbcExeption: ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
......
bei System.Data.Odbc.OdbcDataReader.NextResult(Boolean.disposing, Boolean allresults)
bei System.Data.Odbc.OdbcDataReader.Close(Boolean Disposing)
bei System.Data.Odbc.OdbcDataReader.Close()
bei Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.ReinitializeMetaData()
bei Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.ReinitializeMetaData(IDTSManagedComponentWrapper90 wrapper)


the sql string is very simple, this should not be the problem:

SELECT Objektnr FROM m02a_tblObjektstamm

Thank you very much for your support

Martin

Could you try to run this query through this provider using any other client?

Thanks.

|||I has the same problem!
if you found the solutions,please tell me.Thanks for you.|||As Bob was asking above, do you get the same error when running your query through a different client, such as a C# application or a query tool? This information would help narrow down whether this is an issue related to the query, to ADO.NET or to SSIS.|||I am having this exact problem as well. The query I've entered in the SqlCommand field in the DataReader Source Edit dialog works fine from the MySQL command-line on other platforms, other boxen. It would then have to be related to .NET Provider for ODBC or SSIS.
|||I should be more clear: I'm using MySQL ODBC 3.51.15, the latest version. It comes with a command line utility (myodbc3m) I can use to manually verify the ODBC connection/configuration that SSIS is using to connect; and it works fine. This seems to exonerate the ODBC driver, ODBC configuration, and database server itself, I would think.
|||Downgrading the MySQL ODBC driver from 3.51.15 to 3.51.12 solved this problem for me. Doesn't make any sense to me.
|||Thanks for the feedback, and for going through this prosess of elimination. I'm not sure what the difference is here either (I don't do much with MySQL) but at least you've gotten past the error.

Advanced Editor for DataReader Source / SQLServer 2005

I want to import data from a remote MySql Database

So, I created an New Connection (ADO.Net), connection Test is successful but when I try to set the sql string in the advanced editor i get the following error:

Error at Data Flow Task [DataReader Source [2182]]: System.Data.Odbc.OdbcExeption: ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
ERROR [HY010][MySQL][ODBC 3.51 Driver][mysqld-4.1.10a]
......
bei System.Data.Odbc.OdbcDataReader.NextResult(Boolean.disposing, Boolean allresults)
bei System.Data.Odbc.OdbcDataReader.Close(Boolean Disposing)
bei System.Data.Odbc.OdbcDataReader.Close()
bei Microsoft.SqlServer.Dts.Pipeline.DataReaderSourceAdapter.ReinitializeMetaData()
bei Microsoft.SqlServer.Dts.Pipeline.ManagedComponentHost.ReinitializeMetaData(IDTSManagedComponentWrapper90 wrapper)


the sql string is very simple, this should not be the problem:

SELECT Objektnr FROM m02a_tblObjektstamm

Thank you very much for your support

Martin

Could you try to run this query through this provider using any other client?

Thanks.

|||I has the same problem!
if you found the solutions,please tell me.Thanks for you.|||As Bob was asking above, do you get the same error when running your query through a different client, such as a C# application or a query tool? This information would help narrow down whether this is an issue related to the query, to ADO.NET or to SSIS.|||I am having this exact problem as well. The query I've entered in the SqlCommand field in the DataReader Source Edit dialog works fine from the MySQL command-line on other platforms, other boxen. It would then have to be related to .NET Provider for ODBC or SSIS.
|||I should be more clear: I'm using MySQL ODBC 3.51.15, the latest version. It comes with a command line utility (myodbc3m) I can use to manually verify the ODBC connection/configuration that SSIS is using to connect; and it works fine. This seems to exonerate the ODBC driver, ODBC configuration, and database server itself, I would think.
|||Downgrading the MySQL ODBC driver from 3.51.15 to 3.51.12 solved this problem for me. Doesn't make any sense to me.
|||Thanks for the feedback, and for going through this prosess of elimination. I'm not sure what the difference is here either (I don't do much with MySQL) but at least you've gotten past the error.

Advance programmers only

hi ,
I am using ASP.NET with SQL Server. I have a function ABC() which creates,open ,and then dispose sqlserver's connection .
I am using ABC() twice in one .aspx page ,my friend who build this function argued that this function will open only one connection in everypage ,no matter how many times we call function ABC() in a single page ,while i denies .
Please tell me ,because our whole company database acces relies on this single ABC() function.

Thanks in AdvanceYou don't need an advanced programmer for this one. Open() and Close() rely on Connection Pooling, and you'd be surprised how many connections "open" but really share one that's already opened.

If you have a function that's ABC(), you should really have a means of OpenConnection() and CloseConnection() available that calls the Connection.Dispose() method to clear out your memory also.

You should be ok to open/close the connection a few times in an aspx page.|||::while i denies .

Read the documentation :-)

::my friend who build this function argued that this function will open only one connection in
::everypage

Your friend is wrong.

You are wrong.

:-)

ABC opens, uses, then disposes the method.

Now, if you did a decent job with the connection string (a.k.a. as astandard connection string), then basically SQL Connections are pooled. This means when YOU close the SQL Connection, it will NOT be closed, but will go back into the pool, ready for reuse (and being closed a couple of minutes later).

The idea behind this is - rightly - that opening a NEW connection is pretty slow (password authentication, setting up streams etc.). So, when you open / close connections often, keeping it around is much more efficient. Sadly, managing this from an application's point of view is hard (has to be obeyed everywhere etc.), so this went into the system. Connection Pooling was part of the infrastructure for a long time before .NET came around.

So, when this is in place, then basically ABC () may NOT OPEN a connection, but return one already stored. Basically for this the connection string has to be identical :-) Note that this pool is cross page if the connection strings are identical - which is why I sy your friend is wrong. Because the one connection you "opened" further up in the page may be reused right now by another page, resulting in your page openring a second connection and expanding the pool.

NOW - when you have Transactions enabled on the bpage, and the page is thus running under COM# guidance, then things are a little harder. Because COM+ spawns a transaction, a disposed connection can ntot go back into the general pool befor ethe page completes - it thus stays bound to the page (actually to the transaction context the page runs in). So the second call to ABC () would not get A connection back (note the emphasis on "A"), but THE connection - the same connection, as it basically is unused at the moment and still bound to the transactional context.

To read up in the dcumentation:

* For the non COM+ cas: look for "Connection pooling".
* For the COM+ case - well, read the COM+ documentation. Note that ServicedComponent subclasses just implement COM+ for .NET, so you better go back to the original COM+ documentation if you want to get details of inner workings. A third party book is strongly advisable.

::Please tell me ,because our whole company database acces relies on this single ABC()
::function.

Given that the reuse of existing connections is totally transparent and does not change anything on the level of your appplication, could you elaborate how you think this can break your application?

Thursday, March 8, 2012

aduit connections to SQL Server

On sql 2005 is there any audit logs on by default that log connections to sq
l
server and what database the connection was to.
If not on, is there one that you can turn on.
Not to long ago we had some records deleted out of the sql database
mysteriously. I am trying to find out how that happened and to keep it from
happening again.There is a default trace in SQL Server 2005 that is enabled
by default. You can find information about the default trace
in books online and this link has more info:
http://www.mssqltips.com/tip.asp?tip=1111
-Sue
On Wed, 14 Feb 2007 08:49:05 -0800, Andrew
<Andrew@.discussions.microsoft.com> wrote:

>On sql 2005 is there any audit logs on by default that log connections to s
ql
>server and what database the connection was to.
>If not on, is there one that you can turn on.
>Not to long ago we had some records deleted out of the sql database
>mysteriously. I am trying to find out how that happened and to keep it from
>happening again.|||Andrew
In addition on Sue's reply
> Not to long ago we had some records deleted out of the sql database
> mysteriously. I am trying to find out how that happened and to keep it
> from
> happening again.
You can use
1) DDL Triggers
2) Event notifications
"Andrew" <Andrew@.discussions.microsoft.com> wrote in message
news:8B1D1BB3-9EC2-4C31-87FA-064A1FB5C2E0@.microsoft.com...
> On sql 2005 is there any audit logs on by default that log connections to
> sql
> server and what database the connection was to.
> If not on, is there one that you can turn on.
> Not to long ago we had some records deleted out of the sql database
> mysteriously. I am trying to find out how that happened and to keep it
> from
> happening again.
>

ADP Problem

Hi All,

I have a server that contains sqlserver 2000 and ms access 2000.
Everything were working fine when i ran my adp file in the server side,
and i faced some problem when i ran it on the client computer.

After checking my adp file, i found all of my stored procedures added by
comma and number at the behind. For example i have a stored procedure
p_rpt_supp_list in the server, but i found p_rpt_supp_list;1 in my ms
access.

Does anyone know how to solve this?

Thanks in advance,
Rudy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!Hi

The number is the version number see:
http://msdn.microsoft.com/library/d...create_4hk5.asp

This can be seen as the number column in syscomments see books online:
mk:@.MSITStore:C:\Program%20Files\Microsoft%20SQL%2 0Server\80\Tools\Books\tsq
lref.chm::/ts_sys-c_2y2b.htm

According to SQL Server 2000 Performance Tuning Technical Reference (P322)
;1 is assummed no number is stated. If version 1 is hard coded, then the
only way I can think of re-creating a version 1 is to drop all versions of
the procedure and recreate it (without a version number of explicitly at
version 1).

John

"rudy susanto" <rsantolee@.yahoo.com.sg> wrote in message
news:401f2a8d$0$70306$75868355@.news.frii.net...
> Hi All,
> I have a server that contains sqlserver 2000 and ms access 2000.
> Everything were working fine when i ran my adp file in the server side,
> and i faced some problem when i ran it on the client computer.
> After checking my adp file, i found all of my stored procedures added by
> comma and number at the behind. For example i have a stored procedure
> p_rpt_supp_list in the server, but i found p_rpt_supp_list;1 in my ms
> access.
> Does anyone know how to solve this?
>
> Thanks in advance,
> Rudy
>
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||Hi John,

I never created any stored procedures using ; separator.

I always drop the procedure if it's exists before creating it.

The problem is office 2k (without service pack) but everything is
working fine in office xp.

Thank very much for your response John. :)

Warmest Regards,
Rudy

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!|||Hi

I am not sure what is happening then as your stored procedures will
always be a version 1. You may want to try SQL Profiler and view what
commands are being sent to the server. If you can update/patch the
version of office it may help.

John

rudy <rudy@.mail.com> wrote in message news:<4026f768$0$193$75868355@.news.frii.net>...
> Hi John,
> I never created any stored procedures using ; separator.
> I always drop the procedure if it's exists before creating it.
> The problem is office 2k (without service pack) but everything is
> working fine in office xp.
> Thank very much for your response John. :)
> Warmest Regards,
> Rudy
> *** Sent via Developersdex http://www.developersdex.com ***
> Don't just participate in USENET...get rewarded for it!|||rudy susanto (rsantolee@.yahoo.com.sg) writes:
> I have a server that contains sqlserver 2000 and ms access 2000.
> Everything were working fine when i ran my adp file in the server side,
> and i faced some problem when i ran it on the client computer.
> After checking my adp file, i found all of my stored procedures added by
> comma and number at the behind. For example i have a stored procedure
> p_rpt_supp_list in the server, but i found p_rpt_supp_list;1 in my ms
> access.

That may just be the way Access lists the procedures. As John said, the ;1
is there. Saying

EXEC my_proc;1

is the same as

EXEC my_proc

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

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

Friday, February 24, 2012

ADO.NET and SQL Server Data Paging

I had to built a custom data paging control for my asp.net app and SQL
Server.
This is what I'm doing:
1. do a SELECT to a SqlDataReader
2. create a DataTable with data from GetSchema()
3. loop trough the datareader using .Read() to the point I want to start
4. add data to DataTable with max of [pageSize] records
5. close the data reader and return
The question is:
Isn't looping reader.Read() doing nothing to go to start point where I
want start getting data too expensive? Although DataReader is fast,
won't ".Read()" get the row data from the server to the client? If so,
if I need to get data from record 10000 ahead, it is actually reading
all 10 thousand rows of data, so it is a big waste of resources.
Maybe someone who knows more about the internals of the DataReader can
answer this.
Since SQL Server doesn't support "LIMIT" like keywords, if there is a
better way to page data in sql server, I would like to know.
Thanks.
Provided you are using an incrementing number, like an Identity column, you
can store first and last and then use a DataSet and bind (avoid reader to
fill a DataTable and make the code a bit simpler). If you really like using a
Reader (MS does under the hood), it is not a problem.
Using the "pointers" you are storing, you can easily request data from that
point. If you like persisting the data rather than requesting each time, read
the DataTable as XML and pull the subset you want to paint on the screen.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Natan Vivo" wrote:

> I had to built a custom data paging control for my asp.net app and SQL
> Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast,
> won't ".Read()" get the row data from the server to the client? If so,
> if I need to get data from record 10000 ahead, it is actually reading
> all 10 thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.
>
|||You can think about following query:
SELECT TOP PAGE_SIZE * FROM TABLE_NAME WHERE KEY_ID > last_ID ORDER BY KEY_ID
HTH
Elton Wang
elton_wang@.hotmail.com
"Natan Vivo" wrote:

> I had to built a custom data paging control for my asp.net app and SQL
> Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast,
> won't ".Read()" get the row data from the server to the client? If so,
> if I need to get data from record 10000 ahead, it is actually reading
> all 10 thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.
>
|||Take a look at:
http://www.aspfaq.com/show.asp?id=2120
Rick Sawtell
MCT, MCSD, MCDBA
|||Check out http://www.aspfaq.com/show.asp?id=2120 for various paging methods
Personally, I build parameterized dynamic SQL on the client side using the
query technique below. The primary key (or unique columns) are specified in
the WHERE and ORDER BY clauses.
use Northwind
--first page
SELECT TOP 10 OrderID, CustomerID, OrderDate
FROM Orders
ORDER BY OrderID ASC
--next page
SELECT TOP 10 OrderID, CustomerID, OrderDate
FROM Orders
WHERE OrderID > 10257 --last OrderID from currently displayed page
ORDER BY OrderID ASC
--prev page
SELECT OrderID, CustomerID, OrderDate
FROM
(
SELECT TOP 10 OrderID, CustomerID, OrderDate
FROM Orders
WHERE OrderID < 10258 --first OrderID from currently displayed page
ORDER BY OrderID DESC
) AS a
ORDER BY OrderID ASC
Hope this helps.
Dan Guzman
SQL Server MVP
"Natan Vivo" <nvivo@.terra.com.br> wrote in message
news:u8ZuMXznFHA.3256@.TK2MSFTNGP12.phx.gbl...
>I had to built a custom data paging control for my asp.net app and SQL
>Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast, won't
> ".Read()" get the row data from the server to the client? If so, if I need
> to get data from record 10000 ahead, it is actually reading all 10
> thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.
|||You can use this
Dim oConnection As New SQLConnection("Provider...
oConnection.Open
Dim oDataAdapter As New SqlDataAdapter("SELECT ...", oConnection)
Dim oDataSet As DataSet = New DataSet
oDataAdapter.Fill(oDataSet, CurrentPageSize, PageSize, mstrTableName)
If you have 400 records and you need the first 100 records then
CurrentPageSize = 0 and PageSize = 100
If you need the next 100 records then CurrentPageSize = 100 and PageSize =
100
Good luck
Marc R.
"Natan Vivo" <nvivo@.terra.com.br> a crit dans le message de news:
u8ZuMXznFHA.3256@.TK2MSFTNGP12.phx.gbl...
>I had to built a custom data paging control for my asp.net app and SQL
>Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast, won't
> ".Read()" get the row data from the server to the client? If so, if I need
> to get data from record 10000 ahead, it is actually reading all 10
> thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.
|||Cowboy (Gregory A. Beamer) - MVP wrote:
> Provided you are using an incrementing number, like an Identity column, you
No, I am not. That is why I needed to create my own pagination. There is
no way to determine what is beeing paginated neither the type of the
field in order by.. It may be text, may be number...
Does anyone know if the reader.Read() will actually read the data? if
yes, than probably there is no better way to do this. My inplementation
is pretty like using dataset, saving that i don't need to instantiate a
DataAdaper or neither a DataSet..
Thanks.

ADO.NET and SQL Server Data Paging

I had to built a custom data paging control for my asp.net app and SQL
Server.
This is what I'm doing:
1. do a SELECT to a SqlDataReader
2. create a DataTable with data from GetSchema()
3. loop trough the datareader using .Read() to the point I want to start
4. add data to DataTable with max of [pageSize] records
5. close the data reader and return
The question is:
Isn't looping reader.Read() doing nothing to go to start point where I
want start getting data too expensive? Although DataReader is fast,
won't ".Read()" get the row data from the server to the client? If so,
if I need to get data from record 10000 ahead, it is actually reading
all 10 thousand rows of data, so it is a big waste of resources.
Maybe someone who knows more about the internals of the DataReader can
answer this.
Since SQL Server doesn't support "LIMIT" like keywords, if there is a
better way to page data in sql server, I would like to know.
Thanks.Provided you are using an incrementing number, like an Identity column, you
can store first and last and then use a DataSet and bind (avoid reader to
fill a DataTable and make the code a bit simpler). If you really like using
a
Reader (MS does under the hood), it is not a problem.
Using the "pointers" you are storing, you can easily request data from that
point. If you like persisting the data rather than requesting each time, rea
d
the DataTable as XML and pull the subset you want to paint on the screen.
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
***************************
Think Outside the Box!
***************************
"Natan Vivo" wrote:

> I had to built a custom data paging control for my asp.net app and SQL
> Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast,
> won't ".Read()" get the row data from the server to the client? If so,
> if I need to get data from record 10000 ahead, it is actually reading
> all 10 thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.
>|||You can think about following query:
SELECT TOP PAGE_SIZE * FROM TABLE_NAME WHERE KEY_ID > last_ID ORDER BY KEY_
ID
HTH
Elton Wang
elton_wang@.hotmail.com
"Natan Vivo" wrote:

> I had to built a custom data paging control for my asp.net app and SQL
> Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast,
> won't ".Read()" get the row data from the server to the client? If so,
> if I need to get data from record 10000 ahead, it is actually reading
> all 10 thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.
>|||Take a look at:
http://www.aspfaq.com/show.asp?id=2120
Rick Sawtell
MCT, MCSD, MCDBA|||Check out http://www.aspfaq.com/show.asp?id=2120 for various paging methods
Personally, I build parameterized dynamic SQL on the client side using the
query technique below. The primary key (or unique columns) are specified in
the WHERE and ORDER BY clauses.
use Northwind
--first page
SELECT TOP 10 OrderID, CustomerID, OrderDate
FROM Orders
ORDER BY OrderID ASC
--next page
SELECT TOP 10 OrderID, CustomerID, OrderDate
FROM Orders
WHERE OrderID > 10257 --last OrderID from currently displayed page
ORDER BY OrderID ASC
--prev page
SELECT OrderID, CustomerID, OrderDate
FROM
(
SELECT TOP 10 OrderID, CustomerID, OrderDate
FROM Orders
WHERE OrderID < 10258 --first OrderID from currently displayed page
ORDER BY OrderID DESC
) AS a
ORDER BY OrderID ASC
Hope this helps.
Dan Guzman
SQL Server MVP
"Natan Vivo" <nvivo@.terra.com.br> wrote in message
news:u8ZuMXznFHA.3256@.TK2MSFTNGP12.phx.gbl...
>I had to built a custom data paging control for my asp.net app and SQL
>Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast, won't
> ".Read()" get the row data from the server to the client? If so, if I need
> to get data from record 10000 ahead, it is actually reading all 10
> thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.|||You can use this
Dim oConnection As New SQLConnection("Provider...
oConnection.Open
Dim oDataAdapter As New SqlDataAdapter("SELECT ...", oConnection)
Dim oDataSet As DataSet = New DataSet
oDataAdapter.Fill(oDataSet, CurrentPageSize, PageSize, mstrTableName)
If you have 400 records and you need the first 100 records then
CurrentPageSize = 0 and PageSize = 100
If you need the next 100 records then CurrentPageSize = 100 and PageSize =
100
Good luck
Marc R.
"Natan Vivo" <nvivo@.terra.com.br> a crit dans le message de news:
u8ZuMXznFHA.3256@.TK2MSFTNGP12.phx.gbl...
>I had to built a custom data paging control for my asp.net app and SQL
>Server.
> This is what I'm doing:
> 1. do a SELECT to a SqlDataReader
> 2. create a DataTable with data from GetSchema()
> 3. loop trough the datareader using .Read() to the point I want to start
> 4. add data to DataTable with max of [pageSize] records
> 5. close the data reader and return
> The question is:
> Isn't looping reader.Read() doing nothing to go to start point where I
> want start getting data too expensive? Although DataReader is fast, won't
> ".Read()" get the row data from the server to the client? If so, if I need
> to get data from record 10000 ahead, it is actually reading all 10
> thousand rows of data, so it is a big waste of resources.
> Maybe someone who knows more about the internals of the DataReader can
> answer this.
> Since SQL Server doesn't support "LIMIT" like keywords, if there is a
> better way to page data in sql server, I would like to know.
> Thanks.|||Cowboy (Gregory A. Beamer) - MVP wrote:[vbcol=seagreen]
> Provided you are using an incrementing number, like an Identity column, you[/vbcol
]
No, I am not. That is why I needed to create my own pagination. There is
no way to determine what is beeing paginated neither the type of the
field in order by.. It may be text, may be number...
Does anyone know if the reader.Read() will actually read the data? if
yes, than probably there is no better way to do this. My inplementation
is pretty like using dataset, saving that i don't need to instantiate a
DataAdaper or neither a DataSet..
Thanks.

Thursday, February 9, 2012

Admin a SQLServer environment from an Oracle DBA perspective?

Hey all,

Recently we had a small re-org which combined DBA teams,
specifically Oracle and SqlServer. Just wondering if anyone has
documentation/presentations, etc that show's how to admin a SQLServer
environment from an Oracle DBA perspective?

I guess, something that map's each DB's concepts to each other. As
an Oracle DBA how to troubleshoot/support the environment, etc...

Thanks!

DaveDave wrote:

>Hey all,
> Recently we had a small re-org which combined DBA teams,
>specifically Oracle and SqlServer. Just wondering if anyone has
>documentation/presentations, etc that show's how to admin a SQLServer
>environment from an Oracle DBA perspective?
>I guess, something that map's each DB's concepts to each other. As
>an Oracle DBA how to troubleshoot/support the environment, etc...
>Thanks!
>Dave
>
Get Tom Kyte's book 'Expert one-on-one Oracle".

I won't do what you ask. But the first three chapters will point out to
you in graphic detail
the areas on which you will need to focus.

The two database products are so totally different I can't imagine how
one would try to
administer them together. One has limited row level locking and low
escalation. The other
has no similar concept. One has infinite log files the other does not.
One has a multi-versioning
architecture the other does not. One has autonumbering the other
sequences. One has packages
the other does not. One has ... and on and on and on and on.

One person can manage both. But they need to view them as they are, Each
with its own
concepts and architecture. With more differences than similarities.

--
Daniel Morgan
http://www.outreach.washington.edu/...oad/oad_crs.asp
http://www.outreach.washington.edu/...aoa/aoa_crs.asp
damorgan@.x.washington.edu
(replace 'x' with a 'u' to reply)|||Daniel Morgan <damorgan@.x.washington.edu> wrote in message news:<1068163438.675023@.yasure>...

> Get Tom Kyte's book 'Expert one-on-one Oracle".

Oppps... maybe my post wasn't clear.. Were Oracle DBA's inheriting SQL
Server databases, not the other way around. :)

I've read a "Teach yourself in 24 hours SQL Server" book by Sams but I
need to put together some docs for the rest of our group. I'm just
curious if anyone has done that before? ie, Point out to an Oracle
DBA how to administer a SQL Server environment.

Thanks
Dave|||Dave wrote:

>Daniel Morgan <damorgan@.x.washington.edu> wrote in message news:<1068163438.675023@.yasure>...
>
>>Get Tom Kyte's book 'Expert one-on-one Oracle".
>>
>>
>>
>Oppps... maybe my post wasn't clear.. Were Oracle DBA's inheriting SQL
>Server databases, not the other way around. :)
>I've read a "Teach yourself in 24 hours SQL Server" book by Sams but I
>need to put together some docs for the rest of our group. I'm just
>curious if anyone has done that before? ie, Point out to an Oracle
>DBA how to administer a SQL Server environment.
>Thanks
>Dave
>
I did read your post the other way around. I am not aware of any good
books that approach
the subject from the other standpoint.

Given that SQL Server affeccionados proclaim their product's management
ease ... perhaps
you can just ignore it. ;-)

--
Daniel Morgan
http://www.outreach.washington.edu/...oad/oad_crs.asp
http://www.outreach.washington.edu/...aoa/aoa_crs.asp
damorgan@.x.washington.edu
(replace 'x' with a 'u' to reply)|||The article below explains many of the differences in architecture and
terminology. Although written for SQL 7, it mostly applies to SQL 2000
as well.

http://msdn.microsoft.com/library/d.../oracle2sql.asp

The products are totally different in some areas but similar in others.
In any case, you'll need to wear different DBA hats.

Feel free to post your SQL Server specific questions here or to
microsoft.public.sqlserver.server. Many of us work with Oracle as well
and can assist you in managing your SQL Server databases.

--
Hope this helps.

Dan Guzman
SQL Server MVP

--------
SQL FAQ links (courtesy Neil Pike):

http://www.ntfaq.com/Articles/Index...epartmentID=800
http://www.sqlserverfaq.com
http://www.mssqlserver.com/faq
--------

"Dave" <shoad316@.hotmail.com> wrote in message
news:78cf0572.0311061359.587be850@.posting.google.c om...
> Hey all,
> Recently we had a small re-org which combined DBA teams,
> specifically Oracle and SqlServer. Just wondering if anyone has
> documentation/presentations, etc that show's how to admin a SQLServer
> environment from an Oracle DBA perspective?
> I guess, something that map's each DB's concepts to each other. As
> an Oracle DBA how to troubleshoot/support the environment, etc...
> Thanks!
> Dave