I've a list of long running queries on production servers(MS SQL Server 2005) and the most time consuming query is something like this -
SELECT TABLE_CATALOG,TABLE_SCHEMA ...
FROM sys.spt_check_constbytable_rowset
I've been trying to find any object named sys.spt_check_constbytable_rowset in all DBs (including sys DBs) but no luck.
Could anyone please provide some information about this sys.spt_check_constbytable_rowset
This list is provided by the client, so i'm not sure how they've got it- DB trace or something else.
Thanks in advance
I was facing the same issue on my production server.
By looking deeper into it, I found that this type of queries comes from the SSIS package validation process where it is actually validation the objects and other schema information, some time it also executes from different server through linked server.
Thanks
Related
Thanks in advance for any help.
We have a particular database on a SQL Server 2012 box along with about 20 other databases.
What I require is a method/script/audit (open minded about the solution) that will simply track anyone who logs in (successfully / unsuccessful) to this one particular database on the server (the single database is the key as the end user does not want information on any of the other databases that sit on the server), it also has to log time the attempt was made and it must track the logins via SQL Server or the application itself that is attached to the database.
Once we have this information we need to simply store that somehow. I say somehow as the storing part depends on the solutions recommended to me, so I’m open minded about this too.
Any help would be great as I'm scratching my head on this one.
There's actually a tool built into SQL Management Studio for this.
Please see the attached link for Configure Login Auditing
Once it has been setup, all events will be recorded in the error log.
I have looked at a few stackoverflow forum posts but nothing fits (or atleast I dont think so) what I need help with.
I'm looking for general advise, my company has 'tasked' me to look at moving some data from tables stored in our parent companies databases into a database of our own that has all the information we need in one place.
For instance if we want information that related to one thing, we may have to pull data from several different databases. I think I can get my head around the moving of the data and create a sql query to do it, however we're currently using SQL express as our SQL db (the company is more than happy to buy/create a SQL server but as far as we can see SQL express does what we need it too (feel free to correct me)).
I need to look at scheduling the data move for every hour or few hours to keep the data 'up to date' for when reports are generated using the data.
I have looked at a few programs but the as the queries and the database is on a server 2008 r2 system some of the 'programs' don't like it as they were last updated pre 2010 etc. I have also installed SQL management suite 2012 due to SQL server agent but I cant even get that worked (Service is enabled and I have restarted the DB just still nothing within suite).
I'm not looking (however happy to take the help) for a 'Do this and that and that' type reply but more than happy to accept that amount of help but if you guys / gals can point me in the right direction.
Summary:
-Combining data already on databases from our parent company into a table / DB of our own making
-Currently using SQL Express but willing to upgrade to something else that does the job
-Schedule the data moves for every X hours (Windows scheduling?)
-automating the entire thing so don't have to manually do the moves.
Help on any of the points above would be greatly appreciated and I would 'love you long time' for the help.
JB
There are a bunch of limitations for SQL Express. One of them is that SQL Agent is not supported. SSIS like SQL Agent is not supported.
http://msdn.microsoft.com/en-us/library/cc645993.aspx
Do not fret, you can always schedule a job with Windows Scheduler.
http://windows.microsoft.com/en-US/windows/schedule-task#1TC=windows-7
As for moving the data, it is up to you to select a solution.
1 - Write a PowerShell application to perform the Extract, Translate, and Load (ETL).
http://technet.microsoft.com/en-us/library/cc281945(v=sql.105).aspx
2 - Use the SQLCMD to perform logic like calling stored procedures.
http://technet.microsoft.com/en-us/library/ms162773.aspx
3 - Use BCP to dump and load data.
http://craftydba.com/?p=1245
http://craftydba.com/?p=1255
http://craftydba.com/?p=1584
http://craftydba.com/?p=1690
It is funny how youngsters think they need to spend a-lot of $ to create a solution for a business.
However, Microsoft does supply you with a-lot of free tools.
You just have to put them together for a solution.
PS: I remember about 10 years ago I created a custom ETL solution using VBSCRIPT. Unlike power shell, it is installed on old and new programs.
Good luck!
You can create a console application which executes that particular stored procedure which handles your logic. ( http://dotnet.dzone.com/articles/basics-stored-procedures-net )
Of course using SSIS is much easier but it's not available in SQL Server Express Edition.
I think you should have a look at Integartion Services, which is not available for Express Edition. Have a look at this article to get started with SSIS.
We have spent in total around 50 hours trying to debug our linked server connection from sql server 2012 to pervasive sql.
Needless to say, pervasive is the issue.
We are ONLY running select queries like this:
select * from [sqlserver].[pervasiveserver].[db]..[myremotetable]
We are so frustrated with this, that I do not even want to discuss the errors that we are getting. Several experts said that it's probably related to a bad pervasive odbc driver.
We have SSRS reports whose datasource points to the sql server.
Can you suggest an alternative method to linked servers in this case? Our main task is to be able to select from a pervasive database using SSRS?
I would build SSIS packages to import the data into tables with the same/similar names in a new SQL Server database.
SSIS is usually more solid with ODBC drivers and has much richer error handling to get through those niggly issues. You can make a speedy start using the SSMS Import Data Wizard and saving it's results as an SSIS Package.
Keeping the same table names minimizes your SSRS rework.
The tables in SQL Server can also be indexed to deliver fast report performance.
Before giving up on linked servers, see if you have better results with using openquery instead of fully qualified tsql. We have a linked server from sql server to redbrick, another pair that doesn't play nicely together, but using openquery solves all these problems.
You will probably have to write a stored procedure for every query as opposed to putting the sql into your report.
I have created a simple members database in ASP.NET with login and create account features. Can anyone give an example of the correct connection string that I would need to use to connect to this database remotely. Any answers would be greatly appreciated.
Based on the tag I'm guessing you're using SQL Server 2005. See: http://www.connectionstrings.com/sql-server-2005.
You didn't specify anything about the database (is it SQL Server, Access, MySql, etc).
much less the server name, database name, etc.
However, until specifics are posted, here is a nice general resource for figuring out your connection strings:
http://www.carlprothman.net/Default.aspx?tabid=81
We are doing a feasibility on what we're going to propose as a solution to a client who wants to migrate to a .NET based solution. Part of the data resides in UniData. What is required can be achieve using the following tool:
http://www.welland.com/export.html
The above product ETLs data from UniData to SQL Server.
As a first step, we want to be sure that there are no hitches in getting the data through SSIS from UniData to SQL Server.
Since we don't have an environment to test this we have to check mostly on the net. But most of the discussions regarding UniDate and SSIS don't look like the problem got solved. The main problem seems to be that people aren't able to get hold of a proper ODBC driver. If the data is converted into XML, then it looks like it's working fine.
Has anyone done this and know that this can go through without any problems?
Cannot say I've done it, but Rocket Software has 2-user license versions of UniData available for download, so at least you would have a system to test on.
We are actually working on this process now -- Unidata to SQL through SSIS. We worked with Rocket Software to get the OLE DB working... ODBC was never fast enough and before there was not OLE DB... Now there is. You have to do some work on the UNIDATA side once the OLE DB is install but that is an answer for another day. So far we have no issues except the work to get it setup.