有没有办法阻止SQL Azure数据库,以便它不会对我们的帐户收取任何费用?我不想删除它,只是在测试时它没有被使用,而不是我们将它设置为"停止",就像我们可以处理网站,云服务和VM一样.
谢谢
我有这个错误:
A connection was successfully established with the server, but then an error occurred
during the login process. (provider: Shared Memory Provider, error: 0 - No process is
on the other end of the pipe.)
(Microsoft SQL Server, Error: 233)
Run Code Online (Sandbox Code Playgroud)
我知道,这个网站上有类似的问题,答案是,启用TCP/IP和管道.但是我启用了两个,但仍然不起作用:

我使用的是Microsoft SQL Server 2012,用户拥有完全权限.
我正在运行一些运行在一大堆实体上的校正码,因为它的速度会降低,这是因为上下文中跟踪实体的数量会随着每次迭代而增加,这可能需要很长时间,所以我最后会保存更改每次迭代.每次迭代都是独立的,不会改变先前加载的实体.
我知道我可以关闭更改跟踪,但我不想,因为它不是批量插入代码,而是加载实体并计算一些东西,如果数字不正确,请设置新数字并更新/删除/创建一些额外的实体.我知道我可以为每次迭代创建一个新的DbContext,并且可能比在同一个实例中执行所有操作更快,但我认为可能有更好的方法.
所以问题是; 有没有办法清除先前在db上下文中加载的实体?
我有一个窗体,其中有很多控件(Listbox,Groupbox,Combobox,TextBox,ListBox等).每当表单的大小发生变化时,我都需要自动调整大小并自动排列控件.我需要知道Dock和Anchor之间的区别来实现它.Docking和Anchoring之间的实际区别是什么?
我想检索一个id的parentid,如果那个parentid有一个父母再次检索它,依此类推.一种层次表.
id----parentid
1-----1
5-----1
47894--5
47897--47894
Run Code Online (Sandbox Code Playgroud)
我是sql server的新手并试过,有些查询如下:
with name_tree as
(
select id, parentid
from Users
where id = 47897 -- this is the starting point you want in your recursion
union all
select c.id, c.parentid
from users c
join name_tree p on p.id = c.parentid -- this is the recursion
)
select *
from name_tree;
Run Code Online (Sandbox Code Playgroud)
它只给我一排.我还想将这些记录插入临时表变量中.我怎样才能做到这一点.提前致谢.很抱歉问这个简单的问题(虽然不是我)
我知道.类似的问题已经提出过了.
但我还没有得到确切的解决方案.
我有一个按钮点击事件,我有一个方法FillCombo().
按钮单击事件
private void button1_Click(object sender, EventArgs e)
{
try
{
cmbTemplates.Items.Clear();
lstFiles.Clear();
FillCombo();
}
catch (Exception ex)
{
MethodBase site = ex.TargetSite;
Log(ex.ToString(), site == null ? null : site.Name);
}
}
Run Code Online (Sandbox Code Playgroud)
当我调试时,我发现异常发生在FillCombo()方法中.在那之后,我得到的值site.Name作为WinIOError代替FillCombo.
我尝试了另一种方法GetExecutingMethodName(),由Chris Gessler在如何获取导致异常问题的方法的名称中回答.所以我尝试使用GetExecutingMethodName()方法发送导致异常的方法名称
Log(ex.ToString(), GetExecutingMethodName());
Run Code Online (Sandbox Code Playgroud)
但我得到的结果System.Windows.Forms.Control.OnClick不是FillCombo.
如何获取导致异常的方法的实际名称?
我有一个包含产品ID和名称的表格,另一个表格包含这些产品在特定日期的库存.比如Item1有6库存1-1-2014和8库存2-1-2014.我试图在存储过程中显示这些内容,使其看起来像一个日历,显示一个月中的所有日期以及单元格中可用的库存.展示这个的最佳方式是什么?
例如:
Name | 1-1-2014 | 2-1-2014 | 3-1-2014 | 4-1-2014
Item1 | 6 | 8 | | 6
Item2 | | 2 | 1 |
Run Code Online (Sandbox Code Playgroud)
原始表 - 名称
ID | Name
1 | Item1
2 | Item2
Run Code Online (Sandbox Code Playgroud)
原始表 - Stockdates
ID | NameID | Stock | Date
1 | 1 | 8 | 2-1-2014
2 | 2 | 2 | 4-1-2014
Run Code Online (Sandbox Code Playgroud) 在我升级了Xcode(到6.0.1)和OS X Server(到3.2.1)后,我无法弄清楚如何为配置文件添加证书,以便Xcode机器人可以找到它们.
我已成功添加配置文件,方法是将.mobileprovision文件复制到 /Library/Developer/XcodeServer/ProvisioningProfiles
但是我现在在日志中得到的错误是:
CodeSign /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos/Test.app
cd /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/Source/TEST
export CODESIGN_ALLOCATE=/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/codesign_allocate
export PATH="/Applications/Xcode.app/Contents/Developer/Platforms/iPhoneOS.platform/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/Applications/Xcode.app/Contents/Developer/usr/bin:/usr/bin:/bin:/usr/sbin:/sbin"
Signing Identity: "iPhone Distribution: Greener Pastures ApS"
Provisioning Profile: "Greener Pastures Enterprise TEST"
(03F7CD73-FB25-422E-22A4-A80F12041005)
/usr/bin/codesign --force --sign 746ADC85C62D54BEC9FA874A8D777A38D4DB95CA --keychain /Library/Developer/XcodeServer/Keychains/Portal.keychain --resource-rules=/Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos/Fnug.app/ResourceRules.plist --entitlements /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Intermediates/Fnug.build/Server\ build-iphoneos/Fnug.build/Fnug.app.xcent /Library/Developer/XcodeServer/Integrations/Caches/017d83d8975db54bc8279c2fcc0304a6/DerivedData/Build/Products/Server\ build-iphoneos/Fnug.app
746ADC85C62D54BEC9FA874A8D777A38D4DB95CA: no identity found
Command /usr/bin/codesign failed with exit code 1
Run Code Online (Sandbox Code Playgroud)
其外观如下:"我找不到指定配置文件的证书".
看起来证书应该在文件中/Library/Developer/XcodeServer/Keychains/Portal.keychain- 遗憾的是我无法编辑.
我已经尝试过使用将证书添加到文件中
sudo security import "/Users/administrator/Desktop/Greener Pastures Enterprise Distribution TEST Certificate.p12" -k /Library/Developer/XcodeServer/Keychains/Portal.keychain -A -T /usr/bin/codesign -T /usr/bin/xcodebuild -T /usr/bin/pkgbuild
Run Code Online (Sandbox Code Playgroud)
但这促使我提供"钥匙串密码".我没有(不,它不是管理员帐户的密码或证书密码).
有谁知道如何解决这一问题?
主表
x------x--------------------x
| Id | Name |
x------x--------------------x
| 1 | A |
| 2 | B |
| 3 | C |
x------x--------------------x
Run Code Online (Sandbox Code Playgroud)
详情表
x------x--------------------x-------x
| Id | PERIOD | QTY |
x------x--------------------x-------x
| 1 | 2014-01-13 | 10 |
| 1 | 2014-01-11 | 15 |
| 1 | 2014-01-12 | 20 |
| 2 | 2014-01-06 | 30 |
| 2 | 2014-01-08 | 40 |
x------x--------------------x-------x
Run Code Online (Sandbox Code Playgroud)
我LEFT JOIN和OUTER APPLY使用时得到相同的结果.
LEFT JOIN
SELECT …Run Code Online (Sandbox Code Playgroud) 目前我使用REFRESH ON DEMAND创建的Materialized视图,所以在这种情况下我需要使用以下命令显式刷新MV:
BEGIN DBMS_MVIEW.REFRESH('MV_DATA'); END;
Run Code Online (Sandbox Code Playgroud)
但是现在我需要每天刷新这个MV,所以任何人都可以帮忙写这个.我已经看到我们可以使用在MV本身中编写显式Job或使用COMPLETE/FAST REFRESH语句来刷新此MV.
提前致谢!