I have a system log with NULL gaps between a sequence of numbers...see "BEFORE" sample below.
The number of gaps between the Sequence_ID's are arbitrary, but generally less then 50 records.
I'd like enumerate the gaps to produce the "AFTER" result, but do it with a single query or view, not through procedures.
I've been playing with windowed functions and groupings with no success. I'm guessing it'll need some recursive CTE logic, but I haven't been able to figure it out the correct loop.
I have a problem enumerating SQL server instances on a 64 bits server W2K3 R2 SP2, running SQL 2000 sp4 (32 bits), SQL 2005 Express sp2 (32 bits) and SQL 2005 Developer sp2 (64 bits). I am using the same way as the sample (found on SQLDev.net) ListSQLSvr application to enumerate the instances.
In my case i have the following instances defined:
When i enumerate the SQL instances for the entire network like this:
ListSQLSvr -X All instances appear (including the instances from other machines in the network, as expected)
When i enumerate the SQL instances on my local machine like this: ListSQLSvr -S MYPC -X Only the 32 bits instances appear..
When compiling the ListSQLSvr application to target 64 bit, the result on the local macine shows only the 64 bits instances !?!?
I am using this enumerating code in my installer to fill a listbox and depending on what kind of SQL instance (32 or 64 bits) is selected by the user, I install the correct extended stored procedure and register accourdingly (note the difference between a 32 extended Proc and a 64 bit extended Proc). In this case I only need the local SQL instances since i want to install the correct extended proc.
Since the installer (MSI file) is one-for-all (32 and 64 bits OS's) it runs the code from a Custom Action DLL in 32 bits. Resulting in showing only the 32 bits instances. When I would use the 64 bit installer and make my CA DLL to target 64 bits, I would only see the 64 bits instances. But i would like to see and use all instances in my 32 bit installer and take the appropriate action to install the correct extended Proc.
I think it has to do with some internals of ODBC (SQLBrowseConnect() most likely); When using a local enumeration it uses Shared Memory and when enumerating the entire network (or any other machine) it uses TCP/IP? If this is true, is there a way to bypass this someway? Or if this isn't true, does anyone know any solution to the problem described?
Regards,
Albert van Peppen Senior System Engineer Insad Grafisch b.v.
I need to find out whether SQL Server client components are installed on a machine through my application.
For that I was expecting "SOFTWARE\Microsoft\Microsoft SQL Server\90" registry key. BUT If I install just native client drivers, this key is not getting created.
What could be another approch to determine whether system has required client components.
Also I need to list all the SQL Server 2005 servers available in the network. (Similar to the Servers combo box being populated while DSN creation in ODBC Admin tool). There are several approches.
1) Use NetServerEnum API 2) Use SQLBrowseConnect ODBC API 3) Use SQLDMO Object 4) OSQL utility.
We have (after several weeks of testing in all kind of environments) send out a new version of our application to several of our customers. Within days problems where drippin in; After looking for the problem on various customer situations we found a problem which I think is rather disturbing and very odd. I'll describe the situation, on which we finally managed to recreate the problem, here.
In my problem I use the following configuration:
Windows 2003 (standard edition) AD network with 2 domain controllers, multiple Windows XP workstations, some without SQL instances, some with SQL 2000 instances, some with SQL 2005 instances and even one with SQL 7 running. All run a 32 bit OS.
Tools to reproduce:
ListSQLSvr application (found on SQLDev.net) to enumerate the instances.
Problem description: -------------------------------------------------- I am running the machine called DEV001, which has SQL 2000 (instancename DRUMIS) and SQL 7.0 (has no instancename so this is the root instance) installed.
In any 'normal' situation all the runnings SQL instances are visible on the network like this:
Notice that the browser service might be off on DEV002, you can still see the EXPRESS instance and a new root instance has appeared (though it doesn't exist!)??
After restarting the Browser service all is OK again.
When I turn on Hide Server in the SQL 2000 TCP/IP properties (or turn it on in the registry [HKEY_LOCAL_MACHINESOFTWAREMicrosoftMicrosoft SQL ServerDRUMISMSSQLServerSuperSocketNetLibTcp] "TcpHideFlag"=dword:00000001) on the DEV002 computer something real scary is happening.. The list looks as follows:
When someone has entered a database (for example the backoffice database on INSADBACKOFFICEEXACT) the list looks as follows (for a short moment; 5 secs or so):
Notice now that ALL instances are gone and no extended information is available. In the Query Analyser and in the SQL Management Studio when browsing you'll see this as well! When someone is accessing a database instance it appears for a few seconds again.
Since our installation and applications rely on selecting a existing instance it will fail in the above situations (or at least not showing all available instances).
In my opinion this is a bug somewhere! Note that even when the SQL Services are stopped on DEV002 (leaving the Browser service running) it still seems to block out ALL instance on the ENTIRE network!
I don't mind that one INSTANCE or even the entire MACHINE is hidden from the network, but ALL instances on ALL machines??
And the SQL Browser issue also worries me a bit since it does not stop the possibily to browse the SQL instances; it removes the SQL2000 instances but adds a root instance which doesn't even exist! Also the extended info is stripped.
Can anyone help me solve this/advise?
Also mind that in any situation there might run a lot of computers with a lot of SQL instances and I cannot tell our customers to find which machine has the SQL TCP/IP properties set to Hide... It even seems that in some situations SBS 2003 does the hiding automatically on Install? And if so, when and why?
Regards,
Albert van Peppen Senior System Engineer Insad Grafisch b.v.
Please let me know if I am on the right track here.
I have an Execute SQL Task that selects multiple rows from an OLE DB connection, each row containing 3 columns (data types = string, Int32, Int32). In this task ResultSet = "Full result set" and Result Set > Result Name = 0, Variable Name = [User::viewInfo] which is a user variable with Data Type = Object.
I want to use a Foreach Loop Container to enumerate over the result set rows that are contained in the [User::viewInfo] variable described above. For each resultset row I want to breakout the 3 column values and assign them to 3 corresponding variables that can be referenced in a Data Flow in the Foreach Loop.
Current settings for the Foreach Loop Container: Collection > Enumerator = "Foreach ADO Enumerator", Collection > Enumerator Configuration > ADO object source variable = [User::viewInfo], Enumeration mode = "Rows in the first table". On the Variable Mappings page I select the 3 corresponding user variables I want the rowset column values assigned to, with indexes starting at 1 (not 0).
So, here is the scenario. I have a server that is running a MSDE 2000 instance (8.0.2039). Runs just fine. I install another database, this one is SQL 2005 Express (9.0.3042). Both are installed as part of application setups. Now, for various reasons, I have to uninstall the MSDE 2000 application and reinstall it. After the reinstall, the SQL Browser service no longer enumerates the MSDE instance, only the 2005 instance. As a workaround I fixed the MSDE port on the server and the clients, and it works fine. It also works fine when the application is run from the local computer without a fixed port.
I'm having trouble with my configurations. All of my configurations are targeting variables and the various properties are all set to expressions containing the targeted variables. I would like (during debugging) to dump out all of the variables.
Is there a way to access all variables from a script task? It looks like you have to enumerate the variables you want in the ReadOnlyVariables or ReadWriteVariables properties. I'd rather not miss one by forgetting to list it.
Hi, I have installed reporting services on 2 servers now and each time I click: "Report Server Virtual Directory", "Report Manager" "Virtual Directory" or "Web Service Identity" in the Reporting Services Configuration Manager I get the following error: "An error occurred while enumerating the websites on "SERVER1". If "SERVER1" is a remote server, try changing the firewall settings in the operating system to allow the enumeration. The exception details are: Library not registered. After this I cannot change any settings under these configuration items.
The servers I have tried installing are running Server2003 R2 SP1 x32 & x64.
I have tried changing service accounts, reinstalling IIS, reinstalling Reporting Services, changing website permissions and IIS configuration but I keep getting this same error.
The server is not a remote server nor is there a firewall present. As the error states there is a unregistered library but I don't know which one.
We have a SQLServer 2005 Enterprise merge replication publication with SQL Mobile 3.0 subscribers (Windows Mobile 5.0 and 6.0). We do not use pre-computed partitions due to trigger performance issues with an SSIS/ETL application that supplies data to the merge database. We do use the "Optimize" (=true) option, though we have tried this both ways with no significant differences. We use filters and joins for each worker ID (as HOST_ID) from the subscriptions.
The sync times become increasingly worse after we run the snapshot and bring the publication online. I have tried rerunning the snapshots, this helps little, as it often behaves like the subscription was set to reinitialize and forces a big sync (reload of all data) to the subscriber. We have tried much of the obvious (e.g., flattening filters and joins, adding indexes, etc.).
When users are synchronizing, we watch replication monitor and notice that a lot of time is spent processing "enumerating inserts and updates for article [any article]", especially processing the many generations and batches. This is true for any follow-up syncs after the 1st big sync (initializing the subscription).
I read several posts regarding the batches and generations of changes, and decided to try increasing the €œDownloadGenerationsPerBatch€?. I tried adding this parameter to the snapshot agent job, and the job fails each time with a vague message, even with the default value of 100. How do you change this parameter for SQLServer 2005 Enterprise?
When I proposed start to use SQL Server 2005 for new VS 2005 web sites, one of my co-workers responded that we will update the old SQL Server 2000 databases to SQL Server 2005 when we are ready to use 2005 SQL Server.
Questions: 1. Any expected problems to upgrade old 2000 databases to new 2005 SQL Server? 2. I have installed both 2005/Management Studio Express and 2000/Enterprise Manager in my PC. Any expected problems when running both 2000 and 2005 SQL Server at the same database server? 3. What is the best configuration for running SQL Server 2005 when we have old 2000 databases? Upgade or not upgrade?
Dear Readers,Is it possible, like in Access, to link to tables in other SQL databases that are on the same server? I have a query that I originally had in Access that queered from multiply databases. It did this by having those other tables in the other databases linked to the database that had the query.
While I was out of the office the Lan Team moved one of my SQL Server2000 servers to a new network domain. Since then the maintenance jobhas not ran.The error log for the SQL Agents has the message listed in the subjectline. I have not found any useful articles on the MS SQL Serversite. Anyone know what might be wrong and how to fix it.HTH -- Mark D Powell --
Which tool can I use for structure editing of SQL Server Compact 3.5 databases? I'm installed SQL Server Compact 3.5. I have SQL Server Management Studio Express which was installed with SQL Server 2005 Express. Unfortunately this SSMS can create and open only 3.1 databases.
This question is about SQL Server 2005: I have been trying to figure out how to copy tables and stored procedures between 2 databases (on the same server) using SQL Server Management Studio. I have tried right clicking on the table name, "script table as", "drop to", "clipboard", then I click on the 2nd database, and then click on the "tables" . I change the name of the database and click "execute". This creates the table but does not copy the data. I have also tried "create to" "clipboard" and "insert to" "clipboard" and cannot seem to be able to figure out how to get the results that I want. I am new at this but need to get the tables with the data copied along with the stored procedures, even if I have to do them one at a time. When I was using SQL Server 2000, I was able to use DTS to copy objects to other databases easily. Can someone please tell me a way to accomplish what I need to do? I have gotten information here before that was very useful and was hoping that someone can help me again.Thank you so much. Carol Quinn
have a Prod Server A having TDE enabled on 2 of those databases. I have a Prod Server B having TDE enabled on 3 of those databases. Now I have to create a single Dev server Server C for all the above 5 databases residing on the two servers. So how can I restore all the 5 database backup files on server C.
Does it mean that I need to copy the certificates and Keys from both the Prod server to this Dev Box and then restore the backup files. Once done, I can enable the encryption ON on those 5 database on Dev box or is there any different approach.Also how will tempdb behave in this scenario.
I have another question : 1) Restoring SQL Server Databases after uninstalling and reinstalling SQL Server.
Two days ago there was some problem with Norton Antivirus, so Windows 98 restored itself to a previous state. The SQL Server name was not available when I tried to start again, so I had to uninstall and reinstall SQL Server. I started a new Database just a week before this happened (the change from Access to SQL Server as I stated in the other thread http://www.dbforums.com/showthread.php?threadid=987880) and after reinstallation I could not access the Database any more - even while it is in the Data directory. I did not have any backup to restore from - I just started creating tables, so there was only the Log file created and the MDF database file. I tried to import it for a while to the new server, but as the database is not shown in the new server, it was unable to import like I hoped. So how do you restore it back to SQL Server when you have no backup and only the (undamaged) MDF database file if you only have one server? I had to recreate the Database from scratch again - I don't want it to happen again.
I don't have any idea about upgrading databases.I am been given this task. It would be great if you let me know what are all the things to be considered upgrading the sql server 2000 databases to sql server 2005.
We have a server hosting about 150/200 webpages. The webpages content are provided by Access databases. Now we are planning to change to other platform, but we are not sure about the most suitable solution to our business in cost/performance terms.
We work in .NET platform, so in a first sight the most suitable database to work is SQL Server. The licenses for this platform costs nearly 6000 $ per CPU (our server is built with 4), so it's necessary to evaluate if really other cheaper or even free databases (as Firebird, MySQL, Oracle -don't know how cost this platform-) could be suitable for our server.
Which advantages have SQL Server 2005 over the rest of databases?. You think the budget necessary for Microsoft's database could be profitable at long range?
Hi I have been a bit of an idiot. I was using MSDE. I de-installed it and installed SQL Server Developer Ed 2000. I then copied my MSDE databases to the SQL Server data folder, but the SQL SErver cannot see them. Can anybody tell me how to sort this out please.
Does anyone know of any performance considerations when dealing with data that resides in two databases on the same server?
We use one database as a staging area for bulk loaded data. Once we are happy with the data we insert or update the equivalent tables in the "real" database but performance is terrible when the tables are joined across the databases. The execution plan indicates that the clustered key is used on the real database and a covering index on the staging database.
Are there any rules of thumb or gotchas that I should remind myself of when joining between databases?
TIA
======================================= If Tyranny and Oppression come to this land, it will be in the guise of fighting a foreign enemy. -James Madison, fourth US president (1751-1836)
Hi,We are about to move to SQL Server 2000, as we already have a licencedcopy of it. However, as i understand it you licence by the number ofusers (where else can i find out what the options are with it). The bigquestion is: We want it to run two seperate databases, we dont want theadmin of one to be able to have admin of the other, or be able to usethe other database. Is this possible, if so where might I be able tofind out more about it.Thanks in advance for any helpDavid
I have 2 web applications running on 2 W2K servers. Each server has a local SQL server(2000). We are about to upgrade the servers to Windows 2003. The web applications are running classic ASP and VB COM+ objects. We are going to take the opportunity to seperate SQL from the web server. What will end up with is 2 web servers running the applications and a single database server with 2 databases servering up the data. We will upgrade the SQL2K to SQL2K5.
My question is how will the SQL performance be affected? What's the best place to locate the COM+ objects? What kind of pitfalls do I need to be aware of?
Hi everyone, First of all I'd like to say I'm new to the forums, and in fact new to ASP.net. I've had a couple of applications running in VB.net for the last year or so that I now am looking to move on and into ASP.net (main reason is to do with implementation to remote sites in foreign countries). I'm currently following through the "Working with data and ASP.net 2.0" walkthrough on this site, which I must say has been a great help. I'll start with the background stuff first I have my main database on an SQL server. I also have 2 other databases on there - Customer and Employee. The reason for these are that they are shared amongst my VB applications and I kept them as seperate databases so that one database is all that needs to be administered and maintained, and these changes are then seen on both apps (takes away redundant data as well). In my main database, main table, is a field called CustomerID. This value relates to the CustomerID in the Customer table. In my VB app all I do is have the user select a customer name, and then the customer ID value is copied to the CustomerID field of my main table when inserting / updating a row. This is simply accomplished with 2 SQL connections and 2 dataAdapters. I also use 2 dataSets - one for Customer, one for WorkRequests (the main database)... I use ComponentOne stuff so that my grid will show the CustomerName instead of the CustomerID etc, and the same applies when I use my Employee database - I run many dataAdapters to this for things such as Account Manager, Technologist, Creator, UpdatedBy etc etc. Now, I'm new to VS 2005 - my apps were created in VS 2003 and .net 1.1. Can I easily re-create my apps in ASP.net? My primary goal at the moment is to make sure I can load a row, and display the "lookup" values instead of the "integer" value. As my tables are in seperate databases, I would like to know the best way of accomplishing this, if it is of course possible. Help and advice much appriciated. Kind Regards, Luke
Hi, I have several databases on one MSQL Server which I want to transfer to new server. So, basically it is tranferring all contents of sql server databases on one server to another one. I know I can use import Wizard, but it will take long time, is there a more better way to do this.
Hi, I have a problem that I have never considered before. I am developing with C#.Net, Visual Studio.Net ans SQL Server on Windows Server 2003. Recently we have been upgrading our servers and have installed 2 servers (Live and Dev). The live server is Win Server 2003 Standard while the Dev server is 2003 enterprise. Both servers are running their own versions of SQL Servers (both 2002). What I need to know, is there a way to copy or 'sync' the dev database to the live without over-writing the live data. I need to be able to copy the dev db structure (the tables anf fields) but not over-write the live data with the dev data (the live data changes rapidly and none can be lost). These 'syncs' would happen 2-3 times a month so the 2 db's, at the time of sync, will look very different so a simple copy of the live data to the dev db is not possible. Does SQL Server have a wizard or utility? I have not been able to find one. Thanks, Justin
Is it possible to merge/sync 2 "part time connected" Sql Server databases? I basically want to keep one of my in office databases synced with a database on my hosting provider. (Said hosting provider does not offer SQL Server's built in Merge Replication) Can anyone recommend a 3rd party application that does this if one exists?