I am creating an application where there is main DB and where other data is stored in secondary databases. The secondary databases follow a "plugin" approach. I use SQL Server.
A simple installation of the application will just have the mainDB, while as an option one can activate more "plug-ins" and for every plug-in there will be a new...
As I see, TDE and EKM mechanisms are available only in Enterprise edition. How can I encrypt data in tables in Standard edition of SQL Server 2008?
...
Hello,
is there any way to make a certain session execute all commands as a certain user? I cannot use the execute as clause because it mustn't be hardcoded.
I need something along the lines of this pseudocode:
ALTER SESSION sessionid SET EXECUTING_USER=someuser
...
Hi guys,
I'm building multi tenant application with shared table structure using Microsoft SQL Server.
I wonder if it possible to pass tenantID parameter via sql server connection. I don't want to create separate user account for each tenant.
Currently I see two ways: via ApplicationName or WorkstationID
Best regards,
Alexey Zakharov...
Hey, I recently am working on an projekt that uses the "SQL Server Driver for PHP", i wanted to upgrade the existing driver to the new version (2.0), because I need some of the functions that have been implemented there.
Now i replaced the old .dll in the php/ext directory and restarted the webserver. But now i recieve the following er...
Hi
I want to realize a query with the Visual Studio 2008 build in Query Builder for a TableAdapter similar like following (MSSQL 2008):
select * from [MyDB].[dbo].[MyView] where UNIQUE_ID NOT IN ('MyUniqueID1','MyUniqueID2')
How do I have to set the Filter in my query in order to call it with the myTableAdapter.GetDataExceptUniqueIds...
Hi, i'm developing text ads system. Some small clone of Google Ads
Updated image so all field names would be seen
if you don't seen diagram, click here
Here is diagram with common tables.
Basically make it short, advertiser can have up to 10 variant of same campaign with different text variations, can geo-target his ads and unique im...
Create table testxml
(xmldata xml)
declare @var nvarchar(max)
set @var = N'الوفاق الوطني المخ'
insert into testxml
select @var
After inserting , i am getting data from table like
select * from testxml
---------------------
????????
Can you provide me the solution?
...
So we have a piece of software which has a poorly written SQL statement which is causing every row from a table to be returned. There are several million rows in the table so this is causing serious memory issues and crashes on our clients machine. The vendor is in the process of creating a patch for the issue, however it is still a fe...
I would like to generate a Data Dictionary for a SQL Server 2008 database that has one row for each field, and the following columns:
table_name
field_name
data_type
link_table (for when the field in question is a foreign key)
link_field (for when the field in question is a foreign key)
I can get the first 3 columns with something like...
In short - is it a good design solution to implement most of the business logic in CLR stored procedures?
I have read much about them recently but I can't figure out when they should be used, what are the best practices, are they good enough or not.
For example, my business application needs to
parse a large fixed-length text file, ...
The prevailing wisdom in webservices/web requests in general is to design your api such that you use as few requests as possible, and that each request returns therefore as much data as is needed
In database design, the accepted wisdom is to design your queries to minimise size over the network, as opposed to minimizing the number of qu...
Hi, I'm trying to set up Microsoft SQL Server Reporting Services. I open the Reporting Services Configuration Manager, and it asks for a Server name. Thing is, I don't know the server name, because as far as I know haven't set a report server up yet. So, how do you set one up for Microsoft SQL Server 2008 R2? There seems to be plenty of ...
Hello,
I have table like following
PK num1 num2 numsdiff
1 10 15 ?
2 20 25 ?
3 30 35 ?
4 40 45 ?
i need to get Subtract of 20 - 15 and 30 - 25 and 40 - 35 and so on by select query from this table.
any ideas?.
thanks
...
I am looking for T-SQL code to list all tables in all databases in SQL Server (at least in SS2005 and SS2008; would be nice to also apply to SS2000). The catch, however, is that I would like a single result set. This precludes the otherwise excellent answer from Pinal Dave:
sp_msforeachdb 'select "?" AS db, * from [?].sys.tables'
The ...
Hi
i have a huge database, around 1 TB in size, most of the space is consumed by a table which stores images, the tables has right now almost 800k rows.
server response time has increased, i would like to know which techniques should i use or you recomend, partitioning? o how to reorganize the table
every row is accessed by the image ...
I'm wondering if this is a bad practice or if in general this is the correct approach.
Lets say that I've created a view that combines a few attributes from a few tables.
My question, what do I need to do so I can query against this view as if it were a table without worrying about performance?
All attributes in the original tables ...
We have a .NET 3.5 Web Service (not WCF) running under IIS. It must use identity impersonate="true" and Integrated Windows authentication in order to authenticate to third-party software. In addition, it connects to a SQL Server database using ADO.NET and SQL Server Authentication (specifying a fixed User ID and Password in the connectio...
Is there an SQL Server equivalent to Oracle's RETURNING statement?
I'm wondering if the OUTPUT clause would help.
...
I have SQL Server 2005 stored procedure. Someone one is calling my stored procedure within a transaction. In my stored proc I'm logging some information (insert into a table). When the higher level transaction rolls back it removes my insert.
Is there anyway I can commit my insert and prevent the higher level rollback from removing my i...