Search Results

Search found 28900 results on 1156 pages for 'sql 2005'.

Page 72/1156 | < Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >

  • How to get parameter values for dm_exec_sql_text

    - by Ted Elliott
    I'm running the following statement to see what queries are executing in sql server: select * from sys.dm_exec_requests r cross apply sys.dm_exec_sql_text(r.sql_handle) where r.database_id = DB_ID('<dbname>') The sql text that comes back is parameterized: (@Parm0 int) select * from foo where foo_id = @Parm0 Is there any way to get the values for the parameters that the statement is using? Say by joining to another table perhaps?

    Read the article

  • SQL Rotating numbers

    - by vinodacharyabva
    I want to create a rotating logic in sql like consider there are 3 numbers 1,2,3 then first week 1,2 will be selected next 3,1 next 2,3 and so on..... if there are 4 numbers 1,2,3,4 then 1,2 next 3,4 next 1,2 so on... Like that i want to generate the numbers in sql server.Please help me.

    Read the article

  • Summarising (permanently) data in a SQL table

    - by Cylindric
    Geetings, Stackers. I have a huge number of data-points in a SQL table, and I want to summarise them in a way reminiscent of RRD. Assuming a table such as ID | ENTITY_ID | SCORE_DATE | SCORE | SOME_OTHER_DATA ----+-----------+------------+-------+----------------- 1 | A00000001 | 01/01/2010 | 100 | some data 2 | A00000002 | 01/01/2010 | 105 | more data 3 | A00000003 | 01/01/2010 | 104 | various text ... | ......... | .......... | ..... | ... ... | A00009999 | 01/01/2010 | 101 | ... | A00000001 | 02/01/2010 | 104 | ... | A00000002 | 02/01/2010 | 119 | ... | A00000003 | 02/01/2010 | 119 | ... | ......... | .......... | ..... | ... | A00009999 | 02/01/2010 | 101 | arbitrary data ... | ......... | .......... | ..... | ... ... | A00000001 | 01/02/2010 | 104 | ... | A00000002 | 01/02/2010 | 119 | ... | A00000003 | 01/01/2010 | 119 | I want to end up with one record per entity, per month: ID | ENTITY_ID | SCORE_DATE | SCORE | ----+-----------+------------+-------+ ... | A00000001 | 01/01/2010 | 100 | ... | A00000002 | 01/01/2010 | 105 | ... | A00000003 | 01/01/2010 | 104 | ... | A00000001 | 01/02/2010 | 100 | ... | A00000002 | 01/02/2010 | 105 | ... | A00000003 | 01/02/2010 | 104 | (I Don't care about the SOME_OTHER_DATA - I'll pick something - either the first or last record probably.) What's an easy way of doing this on a regular basis, so that anything in the last calendar month is summarised in this way? At the moment my plan is kind of: For each EntityID For each month Find average score for all records in given month Update first record with results of previous step Delete all records that aren't the first I can't think of a neat way of doing it though, that doesn't involve lots of updates and iteration. This can either be done in a SQL Stored Procedure, or it can be incorporated into the .Net app that's generating this data, so the solution doesn't really need to be "one big SQL script", but can be :) (SQL-2005)

    Read the article

  • How to get SQL Profiler to monitor trigger execution

    - by firedfly
    I have a trace setup for SQL Server Profiler to monitor SQL that is executed on a database. I recently discovered that trigger execution is not included in the trace. After looking through available events for a trace, I do not see any that look like they would include trigger execution. Does anyone know how to setup a trace to monitor the execution of triggers?

    Read the article

  • SSIS - 'Execute SQL' Task and Record Sets

    - by Mick Walker
    Hi, How can I access a 'RecordSet' within a 'Execute SQL' task when using SSIS? I have looked at the parameter mapping options within the Execute SQL Task Editor and cannot find a type of object to allow me to pass the variable holding my record set to the task.

    Read the article

  • How can I programmatically drop a SQL Server database from .NET code

    - by Craig Shearer
    I'm trying to drop a SQL Server database from .NET code. I've tried using the SMO classes but get an exception saying the database is in use. Then I tried executing a query (opening a SqlConnection, executing a SqlCommand), along the lines of: ALTER DATABASE foo SET SINGLE_USER WITH ROLLBACK IMMEDIATE (pause) DROP DATABASE foo But still I get an exception saying the database is in use. How do I do this? (Or, how does SQL Server Management Studio implement the Drop database and close existing connections?)

    Read the article

  • Unique id of a column

    - by Kayes
    Hi. Does each column of a table in SQL Server have a unique id? I've looked into sys.columns and the column_id there is merely the order of the columns which changes if the order of the column is changed. I'd like to know if SQL Server maintains a unique id for each column as it does for each table and other objects. And if it does, how can I get that? Thanks.

    Read the article

  • How can I make exception handling for all existing SQL server 2005 Stored Procedures, view and funct

    - by Space Cracker
    we have a portal that have SQL server 2005 database that contain about 1750 stored procedures , 250 view and 200 function and 95% of them not have handling exception in their code .. we search about any way that allow us making such a global exception handling in SQL that receive any exception happen in any SP,view or function and stored it in a table we made .. is there something like this in SQL server 2005 or we must write exception handling code on each item ?

    Read the article

  • how to get the comma seperated values of the column stored in the Sql server

    - by Innova
    how to get the comma separated values stored in the Sql Db into a individual values e.g in sql DB the column is stored with comma values as shown below, EligiblGroup A11,A12,A13 B11,B12,B13 I need to get EligibleGroup A11 A12 A13 B11 B12 ... I have written a query that will fetch me some list of employees with employee name and elibigle group XXX A11 YYY B11 ZZZ C11 I need to check that the employees(XXX,YYY,ZZZ) eligiblegroup falls within this EligiblGroup A11,A12,A13 B11,B12,B13 and retrun me only that rows.

    Read the article

  • MS SQL tuning tools for finding overload

    - by SkyFox
    I use MS SQL server as a DBMS for my very big corporate DB (with different financial data). And some times my system go down. I don't understand why. What programs/tools I can use for finding process/program/thread, that overload my SQL-server? Thanks for all answers!

    Read the article

  • Error configuring SQL Reporting Services 2005 on Windows 7

    - by Omu
    I've installed SQL Server 2005 with Reporting Services on Windows 7 Ultimate x64 and when I try to configure it when clicking on "Windows Service Identity" I get this error message: There was an error while switching panels. The most likely cause is an error retrieving WMI properties. The exception details are: InvalidArgument=Value of '1' is not valid for 'SelectedIndex'. Parameter name: SelectedIndex Here is a screenshot: EDIT: This problem disappeared after I installed SP3 for SQL Server. I have problems on the next panes though.

    Read the article

  • SQL Server 2005, Huge LDF file.

    - by Scott Jackson
    Hi, I have a database running on SQL Server 2005. The database is 20Gb and the LDF file is 35Gb ! I'm now running low on disk space and want to shrink the log file. How can I do this and how can I stop this happening again ? Many thanks Scott

    Read the article

  • Sql Server Managmenet Studio Alternative - Are there any?

    - by JohnM2
    I am looking for lightweight MS SQL Server Managmenet Studio (2005) alternative (open source/freeware is a bonus). Something more like HeidiSQL for MySQL. LINQPad is not an option (although it's great for learning Linq). It can only query database (and has many cons for my needs). I am looking for management/alteration functionality also, not only making queries and viewing the results.

    Read the article

  • What ports does Management Studio use to connect to SQL Server (2005)

    - by Martin
    I have SQL Server 2005 operating on a remotely hosted server and wish to access it from my own machine using management studio The firewall on the remote server is allready setup to allow all traffic from my external IP - and that works great. However I have a load balancing router that has a second line attached to it - unfortunatly the second line has a dynamic external IP. I need to therefore set up a rule in the router to always send data from Management studio on the first line - but I need to know the port numbers. Can you advise?

    Read the article

  • Creating CLR Assembly in SQLServer 2005

    - by jangwenyi
    I am getting the following error message when I try install my .NET assembly int SqlServer 2005. My .NET assembly references 'ChilkatDotNet2.dll' assembly. Msg 6544, Level 16, State 1, Line 1 CREATE ASSEMBLY for assembly 'myassembly' failed because assembly 'chilkatdotnet2' is malformed or not a pure .NET assembly. Unverifiable PE Header/native stub. Any ideas how to resolve, workaround?

    Read the article

  • How to connect from ruby to MS Sql Server

    - by apetrov
    Hi Crowd! I'm trying to connect to the sql server 2005 database from *NIX machine: I have the following configuration: Linux 64bit ruby -v ruby 1.8.6 (2007-09-24 patchlevel 111) [x86_64-linux] important gems: dbd-odbc (0.2.4) dbi (0.4.1) active record sql server adapter - as plugin ruby-odbc 0.9996 (installed without any options.) unixODBC is installed freeTDS is installed cat /etc/odbcinst.ini [FreeTDS] Description = TDS driver (Sybase/MS SQL) Driver = /usr/lib/libtdsodbc.so Setup = /usr/lib/odbc/libtdsS.so CPTimeout = CPReuse = FileUsage = 1 DSN: DRIVER=FreeTDS;TDS_Version=8.0;SERVER=XXXX;DATABASE=XXX;Port=1433;uid=XXX;pwd=XXXX;" or DRIVER=/usr/lib/libtdsodbc.so;TDS_Version=8.0;SERVER=XXXX;DATABASE=XXX;Port=1433;uid=XXX;pwd=XXXX;" I receive the following error: >>ActiveRecord::Base.sqlserver_connection({"mode"=>"ODBC", "adapter"=>"sqlserver", "dsn"=>my_dns) DBI::DatabaseError: IM002 (0) [unixODBC][Driver Manager]Data source name not found, and no default driver specified from /usr/lib/ruby/1.8/DBD/ODBC/ODBC.rb:95:in `connect' from /usr/lib/ruby/1.8/dbi.rb:424:in `connect' from /usr/lib/ruby/1.8/dbi.rb:215:in `connect' from /opt/ublip/rails/current/vendor/plugins/activerecord-sqlserver-adapter/lib/active_record/connection_adapters/sqlserver_adapter.rb:47:in `sqlserver_connection' It looks like ODBC unable to find appropriate ODBC driver, but I have no ideas why. I had a problem with /usr/lib/libtdsodbc.so which is empty in default debian package free-tds dev, but i solved it with remove broken package and installation from sources. Will appreciate any thought! Thanks & Regards Note: I'm albe to connect using the same steps on mac 10.5

    Read the article

  • SQL Server 2005 user permissions

    - by karl
    I have created a database and some dbo.tables. Now I want to create a user that are can read and write to these tables, but not modify or drop. However I want this user to be able to create own tables and let him do what he want with these. Is this possible? Could someone explain how this can be done?

    Read the article

  • Debugging SQL Server Slowness: Same Database, Different Servers

    - by Craig Walker
    For a while now we've been having anecdotal slowness on our newly-minted (VMWare-based) SQL Server 2005 database servers. Recently the problem has come to a head and I've started looking for the root cause of the issue. Here's the weird part: on the stored procedure that I'm using as a performance test case, I get a 30x difference in the execution speed depending on which DB server I run it on. This is using the same database (mdf) and log (ldf) files, detached, copied, and reattached from the slow server to the fast one. This doesn't appear to be a (virtualized) hardware issue: he slow server has 4x the CPU capacity and 2x the memory as the fast one. As best as I can tell, the problem lies in the environment/configuration of the servers (either operating system or SQL Server installation). However, I've checked a bunch of variables (SQL Server config options, running services, disk fragmentation) and found nothing that has made a difference in testing. What things should I be looking at? What tools can I use to investigate why this is happening?

    Read the article

  • sp_OACreate error on SQL Server 2005

    - by Johnny Lamho
    hi there, I have a stored procedure and trying to run "sp_OACreate" but fall over with the following message: Msg 50000, Level 16, State 1, Procedure HTTP_REQUEST, Line 26 sp_OACreate on MSXML2.XMLHttp.4.0 failed That occurs because I am setting a variable to get the return value of sp_OACreate and raise the above error if the return value is not 0. Now, the return value I get is "-6" but i don't know why it is happening? Any help on this would be good to help make this work.

    Read the article

  • [sql server 2005]how to list all table name in T-SQL

    - by shrimpy
    SELECT name FROM sys.databases -- this can list all database name in the server user database SELECT * FROM INFORMATION_SCHEMA.TABLES -- these two line can list the table for one particular database but how to do something in order can have the result like the following Database Table --------- ------------- db1 t1 db1 t2 db2 t1 ... ... -thx

    Read the article

< Previous Page | 68 69 70 71 72 73 74 75 76 77 78 79  | Next Page >