Microsoft's SQL Server is a relational database management system (RDBMS) that runs as a server providing multi-user access to a number of databases. It originated from the Sybase SQL Server codebase, which is why both products use the extension of SQL called Transact-SQL (T-SQL).

learn more… | top users | synonyms (2)

0
votes
2answers
27 views

How to set host_name() value in a Sql Server Stored Procedure?

We have existing triggers which read the workstation id property of the connection string using host_name(). There are existing PowerBuilder client applications connecting to the database directly ...
0
votes
0answers
8 views

SQL server - copying tables, constraints and indexes from one database server to another server [duplicate]

An accidental DBA, We have sql server 2012 on both of our payroll production server and development server. We have to copy few tables and indexes and constraints from the production database to the ...
1
vote
0answers
21 views

READ_COMMITTED_SNAPSHOT locking on Non-Clustered Index

I'm in a big trouble with one database instance of a MS SQL Server 2008 R2! I have the structure bellow that I've created it to simulate my real problem. USE [sor] GO ALTER DATABASE [sor] SET ...
0
votes
1answer
38 views

How Can I restore a database to a point of time without Old backup? [duplicate]

I have a database in full recovery mode with five tables. I accidentally deleted one table. I don't have any old backups. Can I restore the database with five tables?
1
vote
1answer
56 views

Database design for an online babyShop ,Toy shop

Hi i'm designing a database for a toy shop this shop offer many products with different categories. boystoys,girlstoys,puzzles,beds,stroller, etc i designed my database as it is consists of 5 tables ...
0
votes
0answers
15 views

How To Log Select Statements from 1 User On 1 Table Into a Permanent Log Table

We have a centralized authentication library that 100+ applications use to authenticate users. That library has its own DB credentials. It would be extremely useful to log every time that library/user ...
4
votes
2answers
166 views

Migrate all databases from one SQL Server 2005 to another

We have a production SQL Server 2005 server on which we are hosting 200 databases. We want to host these databases on our new server. On new server SQL Server 2005 is installed and is ready. I want ...
3
votes
1answer
88 views

Generate Agent Job Report

We have a few jobs that run nightly that the status has to be reported every hour. I am trying to find in MSDB where I can capture the information below hourly and send out an excel file. Server ...
0
votes
0answers
24 views

Remote linked servers

I have a SQL Server 2008R2, and I want to connect remotely to a SQL Server 2012SP1, for which I am given: IP: 12.34.56.78 Login: john Password: pw1 Database: TESTDB Table: test_table The remote ...
1
vote
0answers
32 views

Non clustered index on multiple columns

I have a table which has around 50 columns. But there are only 6 columns on which we perform regular search. When I am trying to create a non clustered index on it I am getting the warning of 900 ...
0
votes
1answer
19 views

Table data synchronisation across two databases

I have two databases that need a couple of tables to be kept in synchronisation. I'm not sure the best way to achieve this as I don't want to write triggers as they often get forgotten about and data ...
0
votes
1answer
28 views

How can I log the way in which a job was started?

Using SQL Server Agent, I've created a Job that runs some SQL. This SQL does some work on one database, then adds a row to a logging table on a separate database. The Job is run on a couple of ...
0
votes
1answer
89 views

What are alternatives to Replication to distibute data (Microsoft SQL Server)

Is anyone knowledgeable of alternatives to SQL Server replication? I have a scenario where separate databases will share a lot of the same data which complex queries will match against. We want to ...
1
vote
2answers
54 views

Specifying per-table recovery mode

I have a table that is used for log data; the data is only INSERTed, never UPDATEd. The table has no business data whatsoever, and thus it is not a problem if I cannot recover it in case of a ...
1
vote
1answer
68 views

Can I change the default settings for SQL Server Replication

Is there a way to change the default setting in SQL Server replication? Example when I create an new article I want to have the create Non-Cluster set to true all the time.
10
votes
3answers
485 views

Will increased network latency cause table locks in MS SQL Server?

If I'm making a single call to an MSSQL database over a high-latency network, will table locks occur due to that latency? Say I query table A for some records, and SQL has to return that data over a ...
0
votes
4answers
1k views

Best table schema to store daily hits for many items?

In my Sql Server 2005 database, I'm considering two ways of creating a table to track daily views on 100,000 items: Option 1) Each day would insert a new row for each item. So the table columns would ...
2
votes
1answer
69 views

Replicating a SQL Server database & Optimization

We got a database of approximately 100-120 GB on a server with 128GB ram, while the db is sitting on an 256 GB SSD drive. The bulk of the database space is spent on the tables below: Page_contents ...
0
votes
1answer
100 views

Error updating zoned field from SQL Server stored procedure linked server to iSeries

I'm trying to update a table on an iSeries (AS400) within a SQL Server stored procedure using linked server, but it is failing when trying to update a column defined as zoned. In my stored ...
0
votes
1answer
122 views

Copying a table in SQL Server database to Oracle database

I am new to database management. I need to copy a particular table "Attendance" in SQL Server database to Oracle database. There is no connection between the two databases. Also, "Attendance" is ...
2
votes
1answer
120 views

SQL Server Error log - strange date

The dates in the SQL Server error log look very strange. A subset for messages between Sep/29/2014 8:00 am and Sep/29/5:40pm show a date of Feb/16/2014. Have you seen this before? Any idea why the ...
2
votes
2answers
44 views

Can SQL Server 2014 Standard Edition Trial be upgraded to a full Core license?

If I install a copy of SQL Server 2014 Standard Trial edition can that version be upgraded (in place without a full re-install) to the full version (core license) afterwards? I'd love to get this ...
3
votes
1answer
1k views

Azure SQL Administrator Can't Access Master Database

I created an SQL server and database. I can log in to the database manage page with my administrator account, and manage the database I created, but when I try to look at the master database, it says: ...
0
votes
2answers
44 views

Update specific records of table based on subquery's output (sql server)

have this query which produce below output : select sec.site,sec.Name,sec.Freq from ( select Name from sec group by name having count(Freq) > 3)as dt inner join sec on dt.Name = sec.Name where ...
0
votes
0answers
16 views

“ORA-00936: missing expression” setting up Oracle Publisher in MSSQL

I'm trying to set up an Oracle publisher in SQL Server so I can perform replication. I've gotten connected to Oracle, the drivers work great (I have other linked servers), I can select an article I ...
0
votes
1answer
459 views

Selecting from an excel spreadsheet into SQL Server table

This question has been asked before but I tried giving full admin rights to the SQL Server user on C:\temp\ folder location (I am using Windows authentication into SQL Server Express). So for the ...
0
votes
0answers
12 views

Service Broker received an error message on this conversation

I will first have to say, I am still trying to wrap my brain around all the components of the Service Broker and how they work together, so it's very likely I'm missing something obvious... it's just ...
0
votes
0answers
26 views

how to disable and enable foreign key constraints for a table in sql server [duplicate]

can i disable the foreign key constraints for temporary time in SQL SERVER 2014? and how to enable the same constraints back? also i don't want to enable or disable constraints for all tables. i want ...
0
votes
1answer
59 views

How to create a view joining 2 tables? [on hold]

I've got two tables that I'm trying to create a view from. The problem that I', having is that the column that I would join on doesn't have all of the same values in both tables. Here are my table ...
1
vote
2answers
36 views

VLF, Shrink and Simple Recovery

We currently have a transaction log thats been growing incrementally and has too many VLF files. I am going to follow a process of shrinking and then re-growing the log file to a suitable size to ...
3
votes
2answers
6k views

Can I install SQL Server 2012 on a machine with 2008 R2 already?

I have been using SQL Server 2008 R2 for quite a while, and it is working great. Now I need to use SQL Server 2012. Will this effect my existing databases? How much risk is involved in installing SQL ...
0
votes
2answers
101 views

View with left joins are very slow

I have a view based on join of 3 tables and and query on view is taking 10 mins to fetch the results. Can anybody help me in reducing the time taken to fetch results? VIEW CREATE view ...
0
votes
0answers
12 views

How to load data in InfiniDB from SQL Server [on hold]

i am trying to create the my datawarehouse in InfiniDB. but my OLTP is in Sql Server 2014. are there any tools available to Extract data from Sql Server, transform them and load into InfiniDB or ...
0
votes
2answers
132 views

Is it possible to speed up this PARTITION BY query?

I've got a timeserie table. Each datapoint has also a statut field which indicates its providing source. I'd like to request last available datapoint as of date T but there could be several results, ...
2
votes
1answer
2k views

Unable to open BCP host data-file error

Having problem using BCP via xp_cmdshell. I exported the table data to a file as .dat but when I try to import the file to a new table, I am getting the below error. The SQL Server service and the ...
0
votes
0answers
50 views

Optimize query with sql server

I have the following query .its execution took 15 min .It is too much slowly . Is there a way to optimize it ? Query SELECT Id,Fees,WeekOfMonth,CONVERT(NVARCHAR(MAX), StartDate, 103) AS ...
3
votes
3answers
3k views

How can I search the full text of a stored procedure for a value?

I use the following script to search the text of all stored procedures when I want to find specific values. SELECT ROUTINE_NAME, ROUTINE_TYPE FROM INFORMATION_SCHEMA.ROUTINES WHERE ROUTINE_DEFINITION ...
6
votes
3answers
428 views

rebuild on clustered index, why does datasize shrink?

When we did a rebuild on a clustered index on a table that have about 15gb data in it and the datasize shrunk to 5gb, how can this be? What kind of "data" is removed? Data size i mean the "data" ...
0
votes
1answer
56 views

Convert multiple databases into schemas SQL Server

Due to a high amount of databases being created on my project and the rising cost per databases I had the following question: Is there a way to convert multiple databases in SQL Server into one ...
3
votes
2answers
77 views

How does the PowerShell SQLPS SQLSERVER provider detect central management servers in SQLRegistration\Central Management Server Group

I'm experiencing odd behavior with the PowerShell SQLSERVER provider and the SQLRegistration\Central Management Server Group directory. Below are the behaviors. I would like to know how the SQLSERVER ...
0
votes
1answer
98 views

Need Advice on Normalizing Database

I have a group of database tables that lack normalization. They all have a similar primary key called 'doc_index', which is either a PK by itself or part a composite PK. As you can see below, there ...
0
votes
0answers
28 views

why I can't delete old transaction log backup files with an existing scheduled job?

I have a job scheduled in my SQL Server Agent 2008 R2 that runs every 30 minutes, Its part of a maintenance plan that runs: A daily full database backups, differential every hour, and transaction log ...
0
votes
0answers
19 views

Best index to apply for modifier query in i2b2

Below is a query being run by a tool called i2b2. I'm unable to change how the query is run. What can I do to the indices in "observation_fact" and/or "modifier_dimension" tables so that this query ...
0
votes
1answer
69 views

How to get more information from dm_exec_query_stats

I am running SQL server 2012 on windows azure VM (windows server 2012) I suspected that some of my web appliactions are attacked via SQL injection, So far i could not trace the relevant text with my ...
3
votes
2answers
179 views

Foreign key without referenced columns specification

I noticed in the SQL Server documentation that the list of referenced columns is not a required parameter of a foreign key constraint: <column_constraint> ::= [ CONSTRAINT constraint_name ...
0
votes
1answer
46 views

Why do my backup policies fail when a database's guest user is disabled?

I'm attempting to implement Policy Based Management on a SQL Server 2012 instance also acting as a Central Management Server using the Enterprise Policy Management Framework. The job running the ...
10
votes
2answers
8k views

What is the actual behavior of compatibility level 80?

Could somebody provide me with a better insight about the compatibility mode feature? It is behaving different than I expected. As far as I understand compatibility modes, it is about the ...
1
vote
0answers
30 views

SQLCMD cannot find the SQL Server remotely

I am trying to use SQLCMD to remotely detach a database but for some reason it can't find the server. From the workstation, I can connect to the database instance (which is the default instance) using ...
0
votes
3answers
185 views

Force spool to avoid creating temp tables?

I have the following query which join pivoted data of several very big tables and it runs very slow. I tried to created the temp table for each pivoting and it runs much faster. Is it a way to force ...
5
votes
1answer
124 views

How do I track logins, connections, user accounts, queries, …?

I am a BI person who has been asked to step in and pretend I am a DBA. I am not a novice with databases but AM a novice at the admin type stuff. We have a SQL Server database that is going to be ...