Copy DB For Testing Purposes

Mar 22, 2004

I have a DB I want to make a copy of for testing purposes so we don't crash our production DB. I want the new "Test" DB to reside in the same SQL Server Group on the same SQL server. I have tried the Copy DB wizard but it will not allow you to copy the DB to the same server. What is the best way to do this?

View 3 Replies


ADVERTISEMENT

Data Files For Testing Purposes

Feb 12, 2006

Can anyone give any advice to finding db files for testing. CSV files or what have you. I want to have some nice fun and repetitive Transact practice in creating db's and users etc. I have seen some online but I wondered first if anyone here used a site in particular that they could recommend. Would be nice to have files that may be standard (csv) and in another db format that I could use, mix it up some.

View 2 Replies View Related

Importing Report Content Direct To SQL Server For Testing Purposes

Jan 8, 2007

Hi

I have what seems a simple requirement. We want to import the contents of a SQL Server 2005 Reporting Services report into a SQL Server 2005 database, in order to perform some checks on reports displayed to users. Is there an easy way to achieve this? XML would seem appropriate, but I can't find a step-by-step guide on how to achieve this. Any pointers/suggestions would be appreciated.



Thanks



Neil

View 4 Replies View Related

For Reporting Purposes

May 30, 2008

Hi,

I'm working in a bank and I'm creating a report for my company. I just started learning SQL last month. I hope this forum would help me. Here's my problem:

I have date for the last 6 months. I want to filter current quarter and last quarter data. This means, on the next quarter, the data will automatically moves forward. Is that possible?

I would appreciate any help.

View 2 Replies View Related

Using CURSOR For INSTR Purposes

Mar 21, 2007

TASK: At my work we want to categorize and summarize all our IIS web logs and make statistics from it and such. What I need to do is take the browser type from a certain column in the table. All the information is stored in 1 column, and I figure an instr function would be best to do this. I am new to SQL, so I was told to look up the cursor function. In summary, I want to take all the IIS data and match it up against a defined table and then have a sum function for each browser.

Here are some examples of what the column data looks like: (found in the [csMethod] column

Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1)
Mozilla/4.0+(compatible;+MSIE+6.0;+Windows+NT+5.1;+SV1;+.NET+CLR+2.0.50727)
Mozilla/4.0+(compatible;+MSIE+7.0;+Windows+NT+5.1;+.NET+CLR+2.0.50727;+.NET+CLR+3.0.04506.30;+InfoPath.2;+.NET+CLR+1.1.4322)
Mozilla/5.0+(Windows;+U;+Windows+NT+5.1;+en-US;+rv:1.8.0.8)+Gecko/20061025+Firefox/1.5.0.8


I made a define table which lists an ID (primary key) and instr to search for as well as the full browser name. (define.browser)

DEFINE.BROWSER

ID# INSTR# BROWSER NAME
###############################
1___Opera+7_______Opera 7
2___Opera/9_______Opera 9
3___Safari/_______Safari
4___Firefox/1.0___Mozilla Firefox 1.0
5___Firefox/1.5___Mozilla Firefox 1.5
6___Firefox/2.0___Mozilla Firefox 2.0
7___MSIE+5.5______Microsoft Internet Explorer 5.5
8___MSIE+5________Microsoft Internet Explorer 5
9___MSIE+6________Microsoft Internet Explorer 6
10___MSIE+7________Microsoft Internet Explorer 7
11_________________OTHER BROWSER

I am having problems getting a cursor to work. Are there any good tutorials out there, or can anyone be of assistance. Thank you in advance.

View 1 Replies View Related

Users For Encrypt And Decrypt Purposes Only

Jan 13, 2006

Hi there,

Using symmetric keys and certificates in SQL2005, can one assign users permission to only decrypt or encrypt data?

Reason would be say data capturer and data reader type roles. I tried to create some with the GRANT CONTROL and GRANT VIEW for certificates and definitions on Symmetric keys, but havent been to successfull.

Would be great if someone here can offer some advise on it, and if it's possible using SQL rights.

thanks

View 6 Replies View Related

How To Limit Processors Used (for Licensing Purposes)?

Jul 18, 2007

Is it possible in SQL Server 2005 to limit the number of processors used? For cost reasons, we are consolidating servers and want to start running SQL Server 2005 on one of our dual-processor Win2K3 machines instead of the standalone machine it's currently running on. Because we have about 75 users, it's only cost effective to purchase a processor license (vs. a server license with CALs). But right now we only need and can only afford a single processor license, not two. So...

Is there any way in 2005 to limit the number of processors used so that we only need to purchase one processor license? I know in 2000 you could set this on the "Processor" tab of the "SQL Server Properties" dialog. In 2005, is this accomplished by unchecking the "Processor Affinity" and "I/O Affinity" checkboxes for processor #2 on the "Processors" page of the "Server Properties" dialog? If I uncheck these two options does that fully disable SQL Server 2005 from accessing the second processor in any way? From things I've read I can't tell if it restricts access to the second processor completely or if it just places some limitations on the ways it accesses the second processor.
Also, the licensing information for SQL Server 2005 leads me to believe that if you are going down the "processor licensing" route that you have to buy a processor license for every processor that the OS itself has access to and not just what processors SQL Server has access to. I thought I understood that in SQL Server 2000 the licensing information did allow you to buy a processor license just for each processor that SQL Server 2000 had access to, but has that changed for 2005?



Hope someone can provide some clarification on limiting processor access and the licensing implications for SQL Server 2005.



Thanks,

Scott



View 5 Replies View Related

Extracting Data From A Table For Archiving Purposes

Sep 22, 1999

Hello,

I have been placed in the position of administering our SQL server 6.5 (Microsoft). Being new to SQL and having some knowledge of databases (used to use Foxpro 2.6 for...DOS!) I am faced with an ever increasing table of incoming call information from our Ascend MAX RAS equipment. This table increases by 900,000 records a month. The previous administrator (no longer available) was using a Visual Foxpro 5 application to archive and remove the data older than 60 days. Unfortunately he left and took with him Visual Fox and all of his project files.

My question is this: Is there an easy way to archive then remove the data older than 60 days from the table? I would like to archive it to a tape drive. We need to maintain this archive for the purposes of searching back through customer calls for IP addresses on certain dates and times. We are an ISP, and occasionally need to give this information to law enforcement agencies. So we cannot just delete it.

Sorry this is so long...

Thanks,

Brian R
WESNet Systems, NOC

View 1 Replies View Related

1:m Database Relation Flattened For Reporting Purposes

Jul 20, 2005

--Example Schema posted at end of message:---For reporting purposes, I need to build a single comma delimited string ofvalues from the "many" tableof a database.The easiest way to see what I want is to look at the sample after mysignature.By the way, this is actually a busines problem, not homework! I justcreated a simpleexample using class and persons because everyone is familiar with thatrelationship.I have two tables on the 'one' side of the relationship: PERSON and CLASSThe ENROLLMENT table resolves the many to many relationship between PERSONand CLASS.(I know that a real system would be date effective, etc, but this is just asimple example.that will show my problem). ENROLLMENT has one row for each Class in which aPerson is enrolled.Look at the sample report: I have to "flatten" the join result and listthe class titles in acomma delimited string. I am stuck with this reporting requirement, and Iam NOT going to denormalizethe tables.One way to accomplish the result is to use a cursor to step through the rowsand build a "Classes"string with concatenation. I don't much like this option. I am not writingthe front end code,but I want to make it easy for the developer. Ideally, I would like to givehim a flattened viewso he can just do a simple join and run his report.I believe that what I want cannot be accomplished with ANSI SQL. However,does MS SQL have someextensions that could help me do the job? Failing that, how could I write astored procedure that wouldreturn the personID and the "Classes" string in a format that would bejoinable to the other tables?Thanks,Bill MacLeanP.S. Some people like to see actual database scripts as samples instead ofa textual representation.I have pasted in a script that creates sample tables and populates them.--Sample Tables and Reports:TABLE PERSONPersonID LastNM FirstNM--------- ----------- ---------1 Smith John2 Jones Sara3 Smith LucilleTABLE CLASSClassID ClassNM----------- ------------------10 SQL Server 10120 C++25 Object Oriented Design40 Inorganic Chemistry50 Organic Chemistry80 Early Lit.TABLE ENROLLMENTPersonID ClassID-------- ---------1 102 101 401 803 203 25SAMPLE REPORTPerson ID Name Classes--------- ----------------------- -----------------------------------------------------------------1 Smith, John SQL Server 101, Inorganic Chemistry,Early Lit.2 Jones, Sara SQL Server 1013 Smith, Lucille C++, Object Oriented Design/************************************************** ********SQL Server Script/************************************************** ********/CREATE TABLE [dbo].[CLASS] ([ClassID] [int] NOT NULL ,[ClassNM] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL) ON [PRIMARY]GOCREATE TABLE [dbo].[ENROLLMENT] ([PersonID] [int] NOT NULL ,[ClassID] [int] NOT NULL) ON [PRIMARY]GOCREATE TABLE [dbo].[PERSON] ([PersonID] [int] NOT NULL ,[LastNM] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL ,[FirstNM] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL) ON [PRIMARY]GOALTER TABLE [dbo].[CLASS] WITH NOCHECK ADDCONSTRAINT [PK_CLASS] PRIMARY KEY CLUSTERED([ClassID]) ON [PRIMARY]GOALTER TABLE [dbo].[ENROLLMENT] WITH NOCHECK ADDCONSTRAINT [PK_ENROLLMENT] PRIMARY KEY CLUSTERED([PersonID],[ClassID]) ON [PRIMARY]GOALTER TABLE [dbo].[PERSON] WITH NOCHECK ADDCONSTRAINT [PK_PERSON] PRIMARY KEY CLUSTERED([PersonID]) ON [PRIMARY]GOALTER TABLE [dbo].[ENROLLMENT] ADDCONSTRAINT [FK_ENROLLMENT_CLASS] FOREIGN KEY([ClassID]) REFERENCES [dbo].[CLASS] ([ClassID]),CONSTRAINT [FK_ENROLLMENT_PERSON] FOREIGN KEY([PersonID]) REFERENCES [dbo].[PERSON] ([PersonID])GO-- Insert rwo for each CLASSINSERT INTO CLASS VALUES (10,'SQL Server 101');INSERT INTO CLASS VALUES (20,'C++');INSERT INTO CLASS VALUES (25,'Object Oriented Design');INSERT INTO CLASS VALUES (40,'Inorganic Chemistry');INSERT INTO CLASS VALUES (50,'Organic Chemistry');INSERT INTO CLASS VALUES (80,'Early Lit.');-- Insert row for each PERSONINSERT INTO PERSON VALUES (1, 'Smitn','John');INSERT INTO PERSON VALUES (2, 'Jones','Sara');INSERT INTO PERSON VALUES (3, 'Smith','Lucille');--Insert row for each ENROLLMENTINSERT INTO ENROLLMENT VALUES (1,10);INSERT INTO ENROLLMENT VALUES (1,40);INSERT INTO ENROLLMENT VALUES (1,80);INSERT INTO ENROLLMENT VALUES (2,10);INSERT INTO ENROLLMENT VALUES (3,20);INSERT INTO ENROLLMENT VALUES (3,25);

View 3 Replies View Related

Can I Use SQL Server 2005 Express For Training Purposes?

Apr 9, 2008

Hi,

I work for a training company, and we'd like to run a SQL Server course. Can we use SQL Server 2005 Express, or would we have to buy a full license?

Ian

View 1 Replies View Related

Power Pivot :: How To Create Incrementing Sub Counter For (sort By Column) Purposes

Nov 16, 2015

I have a table ComponentPeriod. In it we have the combination of a component (e.g. A,B,C ) and a period (2014 Q1, 2014 Q2, 2014 January etc)I want the periods to be in descending order (2015 Q4, 2015 Dec, 2015 Nov, 2015 Oct, 2015 Q3 ... etc) and so I need to create a sequential number series to allow this to happen (as we can only order in the client tools by a single column - and so I guess the technique I'm looking for is used a lot to produce these types of "order by" columns)

I have done this in the past using

Period_Sequence =
calculate
(countrows(Period)
,filter
(Period
, Period[Start_Date] <= earlier(Period[Start_Date])
&& Period[Duration_String] = earlier(Period[Duration_String])
)
)

Which was fine when I was referring to a table where Periods where distinct directly but now I have denormalised this for ComponentPeriod so I need something a little more sophisticated Whats the best way to get a sequence with perhaps some partitions in across a subset of distinct columns (I guess from SUMMARIZE or similar)

E.g. I want

Period_Name, Type, Sequence
2015 Q4, Quarter, 1
2015 Dec, Month, 2
2015 Nov, Month, 3
2015 Oct, Month, 4
2015 Q3, Quarter, 5
2015 Sep, Month, 6
etc

even though there may be multiple records in ComponentPeriod that have the period 2015 Q4, but I want them all to have the value Sequence value of 1? I've got as far as:

Period_Sequence Desc =
calculate
(countrows(summarize(ComponentPeriod, ComponentPeriod[Period_End_Date]))
,filter
( ComponentPeriod
, ComponentPeriod[Period_End_Date] >= earlier(ComponentPeriod[Period_End_Date])
)
)

But this doesn't distinguish between the different types. I need an equivalent of the t-sql -

row_number() over (order by Period_End_Date desc, case when 'P3M' then 1 when 'P1M' then 2 end asc

View 7 Replies View Related

I Have A Database On A Network Drive That I Use For Archiving Purposes, But When The Server Is Rebooted The Database Becomes Suspect.

Mar 31, 2007

I created the db with the attached script and I am able to access ituntil I reboot the server. I've tried enabling flag 1807 via the SQLserver service and the startup parameters of the instance. In allcases the database always come up suspect after a reboot. There wasone instance where I was able to recover, but I am not sure how thathappened.Does anyone have an idea of how I can reboot the server without thedatabase becomming suspect?USE MASTERGODBCC TRACEON(1807)GO--DBCC TRACEOFF(1807)--DBCC TRACESTATUS(1807)GOCREATE DATABASE ReadyNAS ON( NAME = ReadyNAS_Data,FILENAME = '\NAS1NASDiskSQL ServerReadyNASReadyNAS_Data.mdf',SIZE = 100MB,MAXSIZE = 20GB,FILEGROWTH = 20MB)LOG ON ( NAME = ReadyNAS_Log,FILENAME = '\NAS1NASDiskSQL ServerReadyNASReadyNAS_Log.ldf',SIZE = 20MB,MAXSIZE = 100MB,FILEGROWTH = 10MB)

View 5 Replies View Related

The Remote Copy Of Database X Has Not Been Rolled Forward To A Point In Time That Is Encompassed In The Local Copy

May 11, 2006

Hi,

I set up DB mirror between a primary (SQL1) and a mirror (SQL2); no witness. I have a problem when I issue command:


alter database DBmirrorTest
Set Partner = N'TCP://SQL2.mycom.com:5022';
go


The error message is:

The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy of the database log.

I have the steps below prior to the command. (Note that both servers' service accounts use the same domain account. The domain account I login to do db mirror setup is a member of the local admin group.)

1. backup database DBmirrorTest on SQL1

2. backup database log

3. copy db and log backup files to SQL2

4. restore db with norecovery

5. restore log with norecovery

6. create endpoints on both SQL1 and SQL2

CREATE ENDPOINT [Mirroring]

STATE=STARTED

AS TCP (LISTENER_PORT = 5022, LISTENER_IP = ALL)

FOR DATA_MIRRORING (ROLE = PARTNER)

7. enable mirror on mirror server SQL2

:connect SQL2

alter database DBmirrorTest

Set Partner = N'TCP://SQL1.mycom.com:5022';

go

8. Enable mirror on primary server SQL1

:connect SQL1

alter database DBmirrorTest

Set Partner = N'TCP://SQL2.mycom.com:5022';

go

This is where I got the error.

The remote copy of database "DBmirrorTest" has not been rolled forward to a point in time that is encompassed in the local copy



Thanks for any help,

KT

View 8 Replies View Related

Detach-copy-attach: Can Not Copy Files - Getting Access Denied

Feb 28, 2008



Hi!
I did:
alter database mydb set single_user with rollback immediate;
exec sp_detach_db @dbname='mydb', @keepfulltextindexfile='true';

then I tried to copy files to new location on other drives, same server but got
>>Cannot copy <myfile>: Access is denied
Make sure the disk is not full or write-protected and that the file is not currently in use<<

I also tried rename of file without success.
I also tried with db service stoppet (not preferred) without success.

How to find out, which process locks the files?
Best regards

View 7 Replies View Related

Testing In IIS?

Jul 20, 2007

I have a website and database in Access, how do i set it up so i can test it in IIS using SQL server?

View 5 Replies View Related

Copy? Export? How To Copy Stored Procedures

Aug 30, 2005

How do I transfer/copy the stored procedures in my Test DB to my LIVE DB?  IT won't allow me to export keeps giving me an error. 

View 4 Replies View Related

Copy A Database With Copy The .mdf File And Attaching It With A New Name?

Nov 4, 2006

Hello,

if i have a given database (a model) and i want to copy this database in the same database instance. Is it ok to copy the mdf and ldf file and attach the files with a new database name in the same instance.

Or is the datebase name part of the .mdf file?

Regards
Markus





View 6 Replies View Related

Testing Transactions

May 21, 2008

I am using SqlServer 2005  Express Edition.  I have written a  stored procedure that has a transaction to make sure that it rolls back in case of failure.  Is there a way to test that the transaction works. I don't now how to cause an error that would cause the transaction to roll back and raise the error with the details of the exception.
 Thanks,
laura

View 2 Replies View Related

Need Help With Testing Query In Asp.

Dec 6, 2005

hello everyone i was hoping to get some help.
i have sql server2000 and iis5.1 running and im using vbscript through asp.
i have a table that has two keys so that together they make a unique key.
so i am trying to test my table in asp so that if there is a duplicate unique key inserted then show an
error...
Can anyone help me?

View 5 Replies View Related

Testing For NT And SQL Availability

Apr 13, 2001

I want to run remote procs from a local - central proc, but don't want to crash my proc if the remote NT Server or SQL Server is not available.
So, I want to test for NT and SQL availability first.

Here's my code.
====================
DECLARE
@DBName varchar(22),
@QueryString NVARCHAR(130),
@Resultsint,
@ResultsTxtvarchar(31)

/* I find the server-dbasename name in a lookup table, and then build dynamic script */
SELECT @DBName = "<SRVRNAME~DBASENAME>"
SELECT @QueryString = N'master..xp_cmdshell "ECHO >'
+ SUBSTRING(@DBName, 1,6)
+ 'pipesqlquery", no_output'
EXEC @Results = sp_executesql @QueryString

SELECT @Results /* <-- testing here.... */

=====================

If the NT / SQL is running, "@Results" should = 0 (success on the ECHO to the PIPE)
If the NT / SQL is NOT running, "@Results" should = 1 (error on the ECHO to the PIPE)

If I test in QA, I get the expected "@Results" values.

If I run the proc, I get "@Results" = 0 for both events, and them my proc fails on the remote proc call if the NT / SQL is NOT running.

I don't know how to write DMO in TSQL to try that.
I have also tried using 'odbcping' too.

HINTS? Better way to test remote NT / SQL is NOT running?

Thanks in advance.

View 1 Replies View Related

STRESS TESTING

May 1, 2001

Hi,
Is there anyway to test the loadtesting/Stress testing on SQLSERVER. I wanted to executes a Store procedure with concurrent users.

Thanks
JK

View 1 Replies View Related

Stress Testing

Dec 24, 2002

Anyone have a tool or script to run to test a SQL server under heavy stress?

View 1 Replies View Related

Testing Knowledge Of SQL And DTS

Mar 31, 2004

Hi,
I need help to test person's skills for
knowledge of SQL stored procedures
and DTS

Could someone point on good resources.


Thank you

Alex

View 4 Replies View Related

Testing Replication

May 7, 1999

i have performed all the steps for the replication there are two problems i encounytring
(i) how to check whether the replication is working or not
(ii) can replication on the subscribing server automatically create the table which publishing server is publshing
(iii)please tell me someother forums for sql server


what my knowledge says that in replication if i modify the data at one place it should automatically be modified in the subscribing server but this thing is also not happening (its not flashing any error message as such)
please tell me what all things i need to do to make sure that everything starts working

waiting for reply
ashish bhatnagar

View 1 Replies View Related

OLAP Testing

Jan 15, 2007

Hi Guyz ,

I'm new to this forum and as well as new to OLAP testing . I would like to know OLAP testing and guidance for SQL server anlaysis services .

I have been trying install SQL server 2000 in my system but it not going through, Can anybody send information how to install SQL server and how to play with sample database.

View 2 Replies View Related

Testing Queries

May 22, 2007

Has anyone ever heard of using Response.Write to test sql queries in the query designer? Here is the actual suggestion I was given recently:

Response.write your sql query. Copy the query to your db query tool and run the query. Adjust the query as necessary to return the recordset you desire. When you have the proper query, adjust your asp code.

The query editor/designer doesn't like certain symbols and extraneous code. So how exactly can you use Response.Write with a sql query without getting errors in designer?

View 4 Replies View Related

SQL 2005 Testing

Jul 23, 2005

I've begun some testing with the June beta of SQL 2005. One problemI've hit is with scalar-valued functions. The error I often get whenexecuting functions is "Select statements included within a functioncannot return data to a client.". These same functions are workingfine under SQL 2000.Has anybody seen this behavior or know what the deal is?

View 7 Replies View Related

Unit Testing

Oct 1, 2005

I've started researching on Unit Testing and I must admitI had never heard of Unit Testing until a couple of monthsago. Obviously I am interested in Unit Testing StoredProcedures.I read the TSQLUnit documentation (not all of it) and i also raninto a newsgroup post saying TSQLUnit is very small comparedto NUnit. The conclusion I am making out of this post is thatI should rather spend time resarching/reading about NUnit thanTSQLUnit. Is that a good assessment?I would like to you what you use and if you use actuallyUnit Testing or some other method? I ran into White Box/Black BoxQA testing. All these are new to me. Any good place to read about"Extreme Programming"? I ran into one link that I saved it at work.That's one place i will read more.Any links, documentation or books you would suggest?I searched Amazon and I didn't find anything interestingregarding SQL Server and Stored Procedures.Thank you

View 1 Replies View Related

Web Application Testing

May 25, 2006

I am running windows xp pro on my home computer and would like to test andatabase driven ASP .NET web application. I need to be able to create an SQLdatabase which will be assessed by the web application. I already have alocal IIS Server up and running.At work, I use SQL Enterprise Manager. I wanted to download it on my homecomputer but cannot find it anywhere on the net.How can I test my web applications at home on a person computer?Thanks.Jess

View 1 Replies View Related

Testing If Value Is Null

Mar 31, 2008

Hi,How do I write a query where if a column, "value," is NULL I returnthe phrase "No value entered" but otherwise return the column's value,even if it is the empty string? I'm tried to modify this simple querySELECT value FROM meta_dataThanks, - Dave

View 2 Replies View Related

Performance Testing

Feb 20, 2008



can any one guide me how should i do performance testing on database size for sql server.
I dont know how to read the execution plan, though i have read many document but still i am not clear.
For are the reports which shows the performance has been down and its all accurate.

View 26 Replies View Related

Unit Testing

Jun 20, 2005

Well was wondering this weekend. How do you do unit testing with SSIS? Is anyone trying it?

View 9 Replies View Related

Beta Testing SP1

Feb 6, 2006

Is it possible to get a list of all the fixes and enhancements that are going into SP1 for SSIS? This will make it alot easier to test seeing as we will know what we are looking for.

Regards

-Jamie

View 1 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved