Go Premium for a chance to win a PS4. Enter to Win

x

Microsoft SQL Server 2008

49K

Solutions

17K

Contributors

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the  Always On technologies and support for unstructured data types.

Share tech news, updates, or what's on your mind.

Sign up to Post

I have an SSRS report....it was working fine it seemed in that I was handling blanks...but then I reliazed I had nulls in my data...and since then I have not been able to get it to work.

Here is how im handling nulls.  I will show you all the where clauses..im essentially handling them all the same.  

I will also provide the dataset for two of them so you can see how im manipulating the dropdown.

In the where clauses below..it was working with blanks....
In the native linked for example..if the  user selects all...I changed it so is null should be part of all....not sure if thats correct ..but I need is null to show in those params.

In the others I added the coalesce...that also does not seem to be working.  In my report I change the value in the dropdown for a blank to the word 'None'...and that is why you see my use of none here.  I do not pass the choice for null in my dropdowns...but the situation needs to be handled so isnull values would appear just as if they were blanks.

CAST(c.cUdf4 as DateTime) between @DateClientCreatedStart and @DateClientCreatedEnd 
AND
(((@NativeLinked = 'Native' or @NativeLinked= 'Linked') and t2.[Native/Linked] = @NativeLinked) or ((@NativeLinked = 'All') and t2.[Native/Linked] is null or  @NativeLinked = 'Native' or @NativeLinked= 'Linked'))
And 
(((@ActiveClient = 0 or @ActiveClient= 1) and c.lActive = @ActiveClient) or ((@ActiveClient = 2) and @ActiveClient = 0 or @ActiveClient= 1 or c.lActive is null))
And 

Open in new window

0
Free Tool: Site Down Detector
LVL 11
Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

hi experts
I have a server that is already making the backup and I want to save it somewhere else (Shared Path), it is understood that I should create a folder and give the permissions to (NT SERVICE \ MSSQLSERVER), but it does not take it, because that I must be on my own PC or server, in these cases as it is done, since it is understood that the backup of the database must not be on the same server.
0
Hello guys,

I need to create a user and allow it only to see some views,

How could I do that?

thanks
Alex
0
Dear EE,

We have two servers.

1) Citrix XenApp 6.5.
2) Database Server MS SQL 2008 R2.

We need to publish SSMS (SQL SERVER MANAGEMENT STUDIO) on our Citrix Xen App 6.5. Please tell me is it POSSIBLE or NOT.

If possible please confirm HOW we can do that thanks.

Thanks
NETSOL-NOS
0
Hi
I am looking for a simple solution to replicate production 2008 SQL DB's  into Lab 2008 SQL  server continuously..

Can someone recommend a simple solution to do this please?

Thanks
0
Hi there,
    We are facing some trouble in executing few queries which takes more time(1:30) in Production server but whereas in lower environment(staging DB) its takes just 7 seconds to bring 10 records of data. To test this issue , I have taken the copy of Production DB and restored it in the same lower environment where the staging DB is located. When i tested the query against the production copy, again it was taking more or less same time 01:25 sec to execute.

1)I observed that that the execution plans is different from both the databases . Not sure why it is ?

2)I have tried updating the stats and rebuild the indices. Again the same time to execute and no change in execution plan.

3) Can somebody shed some lights on this issue? Is this because of the job which i configured few months back to perform rebuild indexed and Statistics update?

thanks
Deepak
0
Our SQL Server 2008 DB seems to slow down in the afternoon.   I am wondering if the auto grow settings within SQL are incorrect and if they could be adjusted to greatly improve our performance.  I believe it is either that or we just need faster hardware.  I pulled a query of growth events.  Here is a very small snippet with some of the slowest times:

Data File Auto Grow      DB      DB_CurrentVersion_Data      10/17/2017      29:43.5      29:43.8      246000
Data File Auto Grow      DB      DB_CurrentVersion_Data      11/9/2017      33:17.4      33:17.6      226000
Data File Auto Grow      DB      DB_CurrentVersion_Data      11/9/2017      33:22.0      33:22.3      220000

Data File Auto Grow      tempdb      tempdev      11/11/2017      35:52.9      35:53.1      206000

I also pulled the growth report from within mgmt studio, and see that in the afternoon there are thousands of growth events, 1 Mb each.  Sometimes 4 or 5 per second.  This is an OLTP database, but reports have to be pulled while it is running as well.  The size of the database (on disk) seems to increase rapidly as well.

Thanks!
0
I have several  Maintenance Plans that I am moving from one server to another 69 to be exact, I need to change the server connection string on the DTX package. I  know I can do it by opening each package as it is XML and do a find and replace but that is very tedious. I have tried the following code but it doesn't change the connection string.
use msdb
 
DECLARE @oldservername as varchar(max)
SET @oldservername='AMCHARAPP1\DYNAMICSGP'
 
-- set the new server name to the current server name
 
declare @newservername as varchar(max)
set @newservername= 'AMCHARAPP2'
 
declare @xml as varchar(max)
declare @packagedata as varbinary(max)
-- get all the plans that have the old server name in their connection string
DECLARE PlansToFix Cursor
FOR
SELECT    id
FROM         sysssispackages
WHERE     (CAST(CAST(packagedata AS varbinary(MAX)) AS varchar(MAX)) LIKE '%server=''' + @oldservername + '%')
 
OPEN PlansToFix
 
 
declare @planid uniqueidentifier
fetch next from PlansToFix into @planid
 
while (@@fetch_status<>-1)  -- for each plan
 
begin
if (@@fetch_status<>-2)
begin
select @xml=cast(cast(packagedata as varbinary(max)) as varchar(max)) from sysssispackages where id= @planid  -- get the plan's xml converted to an xml string
 
declare @planname varchar(max)
select @planname=[name] from  sysssispackages where id= @planid  -- get the plan name
print 'Changing ' + @planname + ' server from ' + @oldservername + ' to ' + @newservername  -- print out what change is happening
 
set

Open in new window

0
Hi,

We ahave created multiple file groups in SQL Server 2008 R2 with initial size 10 GB.
Now i want to create an alert on file groups like, if available space less than 20% it should trigger an alert (some sql job kind of alert)
so that immidiately i will allocate more free space to that file group.
0
Here's the situation:
I'm reviewing the relatively large number of SSRS reports our company has created over the years with the intention of eventually archiving or deleting reports which are no longer being used. I currently have a stored procedure in place which is combining information from the ExecutionLog3 view with information from the Catalog table in the ReportServer database. As new records are selected, they are inserted into a log table I created. As reports which have already been logged are executed, the existing records in the log table are updated with the most recent execution date/time. Records which haven't been executed in the time since I've started logging the data have a default date of 1/1/1900. This way, I have a table which contains 1 record for each report in the Catalog, updated regularly to show the most recent date/time that report was executed. This all works well...

However, when the time comes to actually start archiving or deleting reports based on this information, I'm concerned that I might remove reports which aren't showing as having been recently executed, only to learn they were being used as drill-though or subreports and that I was only grabbing execution dates/times from the execution log for main reports.

This is all running on SQL Server 2008 R2.

Here's the question:
How can I create a SQL script that will identify subreports and drill-through reports being used by other main reports?
0
New feature and membership benefit!
LVL 11
New feature and membership benefit!

New feature! Upgrade and increase expert visibility of your issues with Priority Questions.

I have a question related to OLE Automation (reference: Why not enable 'OLE Automation Procedures' )

I need to use OLE Automation to interact with the Windows File System.  I do not want to leave OLE Automation "turned on" because of Security Risks so......

Is there a way to turn OLE Automation On at the beginning of a Stored Procedure and then turn it back off at the end of the procedure?   The Procedure will run on a timed cycle from a SQL Agent job.

Thanks in advance!
0
I am try to connect conquestdicomserver with sql Server 2008 R2 manually and also trying to editing "dicom.ini" file.. but this is not working..

Any One can help me..please.... Thanks in Advances

Here is DICOM.INI file code .

i am using window32

Sql Server Name :- GMDahri-PC
databse    Name :- conquest
login         Name :- conquest
password            :- conquest1415
sa                        :- 123




# This file contains configuration information for the DICOM server
# Do not edit unless you know what you are doing

[sscscp]
MicroPACS                = sscscp

# Network configuration: server name and TCP/IP port#
MyACRNema                = NICVDPACS
TCPPort                  = 5678

# Host(ignored), name, username and password for ODBC data source
SQLHost                  = localhost
SQLServer                = conquestpacs_s
Username                 = conquest
Password                 = conquest1415
DoubleBackSlashToDB      = 0
UseEscapeStringConstants = 0

# Configure server
ImportExportDragAndDrop  = 1
ZipTime                  = 05:
UIDPrefix                = 1.2.826.0.1.3680043.2.135.736588.40949073
EnableComputedFields     = 1

FileNameSyntax           = 4

# Configuration of compression for incoming images and archival
DroppedFileCompression   = un
IncomingCompression      = un
ArchiveCompression       = as

# For debug information
PACSName                 = NICVDPACS
OperatorConsole          = 127.0.0.1
DebugLevel…
0
MY QUERY IS
SHOW DATABASES;

THEN SHOW  ERROR

Msg 2812, Level 16, State 62, Line 1
Could not find stored procedure 'SHOW'.  
   WHY SHOW THIS ERROR PLZ HELP ME.
0
Hi,

I wanted to understand what will be the impact of performance on server if i set Max Pool size =500 and Connection Lifetime=60 seconds in connection string specified in web.config

Is it dangerous to set connection max pool size as well as connection lifetime=60s ? I added this configuration as I was getting exception thrown for default connection max pool size i.e 200 so had to increase it to 500 though i am closing my connection properly as explained in other forums as well as Microsoft docs?

Thanks,

Krutik Sheth
0
Hi.  Do you know how I can translate the .vbs to vb.net for SSIS 2008?   There’s a lot of logic in the .vbs files so I am concerned about not translating it right.   Please provide specific examples of a .vbs and the end result SSIS .dtsx package so I can follow, not just guidelines.

I am using:
-  Visual Studio 2008
- SQL SERVER 2008R2
0
What statement would you use to remove all rows from a table
0
I was trying to install MS SQl server 2008R2 on windows Server 2012R2.
But the installation was successfull with following error message.

What problem could i face in future ?

Error Message-----------------------
Note : PkgMgr.exe has been deprecated.Please update your scripts to use DISM.exe to install,COnfigure, and update features and packages
and packages for windows.

See http://go.microsoft.com/fwlink/?LinkID=195329 for more information.

Operation failed with 0x8007000B
---------------------------
0
Hi,
I have created user and given permssion to  db_owner for Test database.
But user complaining user can't create stored procedure or View.
I have given grant using following command but still user can't create store procedure.
What iam missing

use [App_Test]
GRANT EXECUTE ON SCHEMA::[dbo] TO [user1]
GRANT EXECUTE ON DATABASE:: App_Test  TO [user1]

USE  [App_Test]
GRANT CREATE PROCEDURE TO [user1]    
GRANT SELECT, INSERT, UPDATE, DELETE, ALTER, EXECUTE, VIEW DEFINITION ON SCHEMA::dbo TO [user1]
0
Hi there,
   We have log shipping for 4 databases which are going well but however only Restore Jobs for two databases gets failed in DR environment occasionally. The error message says like this
Executed as user: xxxxxxxxx. The process could not be created for step 1 of job 0x867837754D077D4A9BFF608D000072BD (reason: 5).  The step failed.

I have configured the Job->Step->Advanced->output file to capture the error message but this error was not written in the output file as well. In fact this error doesn't seem to be happened at all as I can see the output file has only log which is written before the last run which was failed.

thanks
Deepak
0
Hire Technology Freelancers with Gigs
LVL 11
Hire Technology Freelancers with Gigs

Work with freelancers specializing in everything from database administration to programming, who have proven themselves as experts in their field. Hire the best, collaborate easily, pay securely, and get projects done right.

Hi,
I have create user "qry" and create table Sales.
I need to give access this user only sales year 2017, i don't want to show 2016<= sales.
How to do that?
Best regards
0
I've inherited a linked server which drives our website. I recently discovered that not all of our replications to that linked server are complete. I'm missing sometimes thousands of records in some tables. I think what is happening is that some of the local publications never had subscriber jobs created so the snapshots are being created, but not moved to the linked server. When I try to create a new subscription job I get an error  that the "subscription to publication <xxxx> has expired or does not exist."

How do I even begin to resolve this? Google searches are only telling me how to create the subscription but doesn't really help resolve this specific issue.

I'll provide whatever additional information you need. The full error is here:
Date            6/28/2017 9:26:59 AM
Log            Job History (SQL12-ItemMaster-repl1_Cat_to_Opt-WIN-3EB9B225E5P-1069)

Step ID            2
Server            SQL12
Job Name            SQL12-ItemMaster-repl1_Cat_to_Opt-WIN-3EB9B225E5P-1069
Step Name            Run agent.
Duration            00:00:01
Sql Severity      0
Sql Message ID      0
Operator Emailed      
Operator Net sent      
Operator Paged      
Retries Attempted      0

Message
2017-06-28 14:26:59.919 Copyright (c) 2008 Microsoft Corporation
2017-06-28 14:26:59.919 Microsoft SQL Server Replication Agent: replmerg
2017-06-28 14:26:59.919
2017-06-28 14:26:59.919 The timestamps prepended to the output lines are expressed in terms of UTC time.
2017-06-28 14:26:59.919 User-specified agent parameter values:
                  -Publisher SQL12
                  -PublisherDB …
0
The Server (win 2008) name for one of our test Server was changed , however, the server hosted an SQL Database. with the change, it has resulted in us unable to connect to the SQL Database (sql 2008). the previous username does not work anymore and i even tried connecting with windows authentication and still nothing. is there anyway to resolve this?

Regards,
Grand
0
Hello Experts,
I am trying to debug a Stored Procedure and I get the following error as soon as I Start Debugging.  Any idea what is going on?

Error Message:  Unable to start T-SQL debugging. Could not attach to sql server process on XXX.  The object exporter specified was not found.

Thank you in advance!
0
I have many columns in my report and I want to dynamically sort the columns which the user needed to sort in ascending order. How could this be done?
0
I am using MS SQL Server 2008 as my Database and I created a Stored Procedure that looks like this.

    USE [DB_Question]
    GO
   
    SET ANSI_NULLS ON
    GO
    SET QUOTED_IDENTIFIER ON
    GO
    ALTER Procedure [dbo].[Check_ExamID]
    @ExamID NVARCHAR(MAX)
    as
    SELECT * FROM TBL_ExamTimer WHERE ExamID = @ExamID

and here is my PHP code that suppost to be the target is to display data in my PHP site by using some criteria also.

    <html>
    <head>
   
    </head>
    <body>
    <?php
   
          include('config.php');
          include('adodb/adodb.inc.php');
          $db = ADONewConnection($dbdriver);
          $db->Connect($dsn, $username, $password);
          
          $procedure = $db->prepareSp('Check_ExamID');
          if (!$procedure)
        die ('Invalid or inaccessible stored procedure name');
          
          $parameter1Name = '@ExamID';
          $ok = $db->inParameter($procedure,$parameter1Name,'1234');
          $result = $db->execute($procedure);
     
   
    ?>
    </body>
    </html>

I am trying to display data where `ExamID =@ExamID` or `1234` for param of `@ExamID`

My Target here is to use my stored procedure to select data in my table and return it back in my php file but nothings happening. TYSM
0

Microsoft SQL Server 2008

49K

Solutions

17K

Contributors

Microsoft SQL Server 2008 is a suite of relational database management system (RDBMS) products providing multi-user database access functionality.Component services include integration (SSIS), reporting (SSRS), analysis (SSAS), data quality, master data, T-SQL and performance tuning. Major improvements include the  Always On technologies and support for unstructured data types.